Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return boolean for is_mobile_request? #34

Merged
merged 2 commits into from Sep 5, 2013
Merged

Conversation

hstove
Copy link
Contributor

@hstove hstove commented Jul 18, 2013

I'm using Rails 4 with Ruby 2.0.0, and the helper method is_mobile_request? is returning the result of request.user_agent.to_s.downcase =~ @@mobylette_options[:mobile_user_agents].call. When the user agent doesn't match, the method returns nil. When the user agent is mobile, it returns the match in :mobile_user_agents (for iphone, this is 13).

Because of this, mobylette was not correctly rendering mobile templates. After this change, everything is working well.

@eprothro
Copy link

eprothro commented Sep 4, 2013

any update on this PR or travis build failure?

@hstove
Copy link
Contributor Author

hstove commented Sep 4, 2013

Thanks for the comment, I apologize for the failed test :person_frowning:. I've updated, and tests now pass while also working on a live app.

@eprothro
Copy link

eprothro commented Sep 4, 2013

Fantastic, @tscolari can we get this merged in?

Thanks @hstove!

tscolari added a commit that referenced this pull request Sep 5, 2013
return boolean for is_mobile_request?
@tscolari tscolari merged commit d0eb690 into tscolari:master Sep 5, 2013
@tscolari
Copy link
Owner

tscolari commented Sep 5, 2013

I'm going to dump the version soon :)

Thank you for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants