return boolean for is_mobile_request? #34

Merged
merged 2 commits into from Sep 5, 2013

Conversation

Projects
None yet
3 participants
@hstove
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@eprothro

eprothro Sep 4, 2013

any update on this PR or travis build failure?

eprothro commented Sep 4, 2013

any update on this PR or travis build failure?

@hstove

This comment has been minimized.

Show comment
Hide comment
@hstove

hstove Sep 4, 2013

Contributor

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

Contributor

hstove commented Sep 4, 2013

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

@eprothro

This comment has been minimized.

Show comment
Hide comment
@eprothro

eprothro Sep 4, 2013

Fantastic, @tscolari can we get this merged in?

Thanks @hstove!

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

Merge pull request #34 from hstove/master
return boolean for is_mobile_request?

@tscolari tscolari merged commit d0eb690 into tscolari:master Sep 5, 2013

1 check passed

default The Travis CI build passed
Details
@tscolari

This comment has been minimized.

Show comment
Hide comment
@tscolari

tscolari Sep 5, 2013

Owner

I'm going to dump the version soon :)

Thank you for the PR!

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