I have put this code to disable protect_from_forgery for test environment. 
The code is given below and i have given the code in bold. that is the one 
i'm talking about..

class ApplicationController < ActionController::Base
  
*protect_from_forgery with: :exception, unless: -> { Rails.env.test? }*
end


I have currently put this code in application controller. is there a better 
place put this code? I need some advice here.. can anyone advise me please?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/9d2c5732-f18f-40c6-8119-08258a4f7210%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to