From 738283ddddf63bdc0328455b6d07e117ea9c1674 Mon Sep 17 00:00:00 2001 From: benji Date: Wed, 9 Sep 2015 11:53:30 +0200 Subject: [PATCH] Change skip_authenticity_token by :null_session --- app/controllers/application_controller.rb | 2 +- app/controllers/transactions_controller.rb | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 6ee6fac..3198b31 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,7 +1,7 @@ class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # 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| redirect_to root_url, alert: exception.message diff --git a/app/controllers/transactions_controller.rb b/app/controllers/transactions_controller.rb index ce60de4..01c3f0a 100644 --- a/app/controllers/transactions_controller.rb +++ b/app/controllers/transactions_controller.rb @@ -1,5 +1,4 @@ class TransactionsController < ApplicationController - def index @transactions = Transaction.all end