{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/23153","labels_url":"https://api.github.com/repos/rails/rails/issues/23153/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/23153/comments","events_url":"https://api.github.com/repos/rails/rails/issues/23153/events","html_url":"https://github.com/rails/rails/issues/23153","id":127849881,"number":23153,"title":"Rails 5.0.0.beta ActionController::Base RuntimeError: Invalid option key: per_form_csrf_tokens=","user":{"login":"feixionglee","id":87474,"avatar_url":"https://avatars.githubusercontent.com/u/87474?v=3","gravatar_id":"","url":"https://api.github.com/users/feixionglee","html_url":"https://github.com/feixionglee","followers_url":"https://api.github.com/users/feixionglee/followers","following_url":"https://api.github.com/users/feixionglee/following{/other_user}","gists_url":"https://api.github.com/users/feixionglee/gists{/gist_id}","starred_url":"https://api.github.com/users/feixionglee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feixionglee/subscriptions","organizations_url":"https://api.github.com/users/feixionglee/orgs","repos_url":"https://api.github.com/users/feixionglee/repos","events_url":"https://api.github.com/users/feixionglee/events{/privacy}","received_events_url":"https://api.github.com/users/feixionglee/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-21T05:40:24Z","updated_at":"2016-01-21T05:56:02Z","closed_at":"2016-01-21T05:56:02Z","body":"I create a new project based on rails 5.0.0.beta1, but server cannot start, raise this error\r\n```\r\ngems/actionpack-5.0.0.beta1/lib/action_controller/railtie.rb:59:in `block (3 levels) in <class:Railtie>': Invalid option key: per_form_csrf_tokens= (RuntimeError)\r\n```\r\n\r\n**Source file: actionpack/lib/action_controller/metal/request_forgery_protection.rb,**\r\n```ruby\r\nmodule ActionController\r\n  module  RequestForgeryProtection\r\n    extend ActiveSupport::Concern\r\n\r\n    include AbstractController::Helpers\r\n    include AbstractController::Callbacks\r\n\r\n    included do\r\n      # Sets the token parameter name for RequestForgery. Calling +protect_from_forgery+\r\n      # sets it to <tt>:authenticity_token</tt> by default.\r\n      config_accessor :request_forgery_protection_token\r\n      self.request_forgery_protection_token ||= :authenticity_token\r\n\r\n      # Holds the class which implements the request forgery protection.\r\n      config_accessor :forgery_protection_strategy\r\n      self.forgery_protection_strategy = nil\r\n\r\n      # Controls whether request forgery protection is turned on or not. Turned off by default only in test mode.\r\n      config_accessor :allow_forgery_protection\r\n      self.allow_forgery_protection = true if allow_forgery_protection.nil?\r\n\r\n      # Controls whether a CSRF failure logs a warning. On by default.\r\n      config_accessor :log_warning_on_csrf_failure\r\n      self.log_warning_on_csrf_failure = true\r\n\r\n      # Controls whether the Origin header is checked in addition to the CSRF token.\r\n      config_accessor :forgery_protection_origin_check\r\n      self.forgery_protection_origin_check = false\r\n\r\n      # Controls whether form-action/method specific CSRF tokens are used.\r\n      config_accessor :per_form_csrf_tokens\r\n      self.per_form_csrf_tokens = false\r\n\r\n      helper_method :form_authenticity_token\r\n      helper_method :protect_against_forgery?\r\n    end\r\n    ......\r\n  end\r\nend\r\n\r\n```\r\n\r\n\r\n>ActionController::Base.respond_to?(:per_form_csrf_tokens) = false\r\n>ActionController::Base.respond_to?(: forgery_protection_origin_check) = true\r\n\r\nother config_accessors works except :per_form_csrf_tokens\r\n"},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/173465022","html_url":"https://github.com/rails/rails/issues/23153#issuecomment-173465022","issue_url":"https://api.github.com/repos/rails/rails/issues/23153","id":173465022,"user":{"login":"prathamesh-sonpatki","id":621238,"avatar_url":"https://avatars.githubusercontent.com/u/621238?v=3","gravatar_id":"","url":"https://api.github.com/users/prathamesh-sonpatki","html_url":"https://github.com/prathamesh-sonpatki","followers_url":"https://api.github.com/users/prathamesh-sonpatki/followers","following_url":"https://api.github.com/users/prathamesh-sonpatki/following{/other_user}","gists_url":"https://api.github.com/users/prathamesh-sonpatki/gists{/gist_id}","starred_url":"https://api.github.com/users/prathamesh-sonpatki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prathamesh-sonpatki/subscriptions","organizations_url":"https://api.github.com/users/prathamesh-sonpatki/orgs","repos_url":"https://api.github.com/users/prathamesh-sonpatki/repos","events_url":"https://api.github.com/users/prathamesh-sonpatki/events{/privacy}","received_events_url":"https://api.github.com/users/prathamesh-sonpatki/received_events","type":"User","site_admin":false},"created_at":"2016-01-21T05:56:02Z","updated_at":"2016-01-21T05:56:02Z","body":"@feixionglee Per form CSRF token feature was added after Rails 5.0.0.beta1 was released - https://github.com/rails/rails/commit/3e98819e20bc113343d4d4c0df614865ad5a9d3a\r\n\r\nSo you can't use it in an app that is using beta1 from rubygems. You can use master branch to use this feature for now.\r\n\r\n\r\nIt will be available to use in final release.\r\n\r\n"}}