Change skip_authenticity_token by :null_session

This commit is contained in:
benji 2015-09-09 11:53:30 +02:00
parent f1af878c9e
commit 738283dddd
2 changed files with 1 additions and 2 deletions

View file

@ -1,7 +1,7 @@
class ApplicationController < ActionController::Base class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception. # Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead. # For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception protect_from_forgery with: :null_session
rescue_from CanCan::AccessDenied do |exception| rescue_from CanCan::AccessDenied do |exception|
redirect_to root_url, alert: exception.message redirect_to root_url, alert: exception.message

View file

@ -1,5 +1,4 @@
class TransactionsController < ApplicationController class TransactionsController < ApplicationController
def index def index
@transactions = Transaction.all @transactions = Transaction.all
end end