Guest User

Untitled

a guest
May 28th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. # Detect chrome frame in application_controller.rb
  2. before_filter :chromeframe_detect
  3.  
  4. protected
  5. def chromeframe_detect
  6. ua = request.user_agent
  7. @win_ie_with_chromeframe = ua =~ /Windows NT/ and ua =~ /MSIE (\d+)/ and $1.to_i < 9 and ua =~ /chromeframe/
  8. end
Add Comment
Please, Sign In to add comment