Created
November 2, 2012 20:57
-
-
Save DemitryT/4004250 to your computer and use it in GitHub Desktop.
test.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_mobile_device? | |
if current_company | |
current_company.mobile_optimized? && !session[:full_site].present? && super || session[:mobile_view].present? | |
else | |
!session[:full_site].present? && super || session[:mobile_view].present? | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment