Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest May 16th, 2018 110 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. #for application helper
  2.  
  3. def special_stylesheet_link
  4.   if session[:toggle_style]
  5.     return stylesheet_link_tag 'alternate'
  6.   else
  7.     return stylesheet_link_tag 'display'
  8.   end
  9. end
  10.  
  11.  
  12. #controller action
  13.  
  14. def toggle_style
  15.   if session[:toggle_style]
  16.     session.delete(:toggle_style)
  17.   else
  18.     session[:toggle_style] = 1
  19.   end
  20.  
  21.   redirect_to '/'
  22. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top