app/controllers/application_controller.rb
# Prevent CSRF attacks by raising an exception.
# For APIs,  you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception.
For APIs,  you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception . For APIs you may want to use : null_session instead .
def mobile_device?
    if session[:mobile_param]
      session[:mobile_param] == "1"
    else
      request.user_agent =~ /Mobile|webOS/
    end
  end
def mobile_device? if session [ :mobile_param ] session [ :mobile_param ] == "1" else request . user_agent =~ / Mobile|webOS / end end
Prevent CSRF attacks by raising an exception.
Prevent CSRF attacks by raising an exception .