'protect_from_forgery' in Application controller in Rails

Rajesh Omanakuttan picture Rajesh Omanakuttan · Dec 13, 2012 · Viewed 10.8k times · Source

In the config/application_controller.rb file in my Rails application directory, I found the code below:

class ApplicationController < ActionController::Base
  protect_from_forgery
end

Can any one tell me what project_from_forgery means and why it is being used?

Answer

Pavel S picture Pavel S · Dec 13, 2012