diff options
| author | mo khan <mo@mokhan.ca> | 2013-07-25 21:26:02 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2013-07-25 21:26:02 -0600 |
| commit | 926258eeccf0dba069f6eb318a225f62231a6166 (patch) | |
| tree | 5eb368b28229d59c003b483a6336cb2769ae4927 /app/controllers/application_controller.rb | |
| parent | e51b50a4348e0e6513aa01cdfbf5d5894c440f17 (diff) | |
start to upgrade to rails 4
Diffstat (limited to 'app/controllers/application_controller.rb')
| -rw-r--r-- | app/controllers/application_controller.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 1600e041..f9a5d663 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,5 +1,7 @@ class ApplicationController < ActionController::Base - protect_from_forgery + # Prevent CSRF attacks by raising an exception. + # For APIs, you may want to use :null_session instead. + protect_from_forgery with: :exception before_filter :profile_application before_filter :load_categories before_filter :load_user @@ -15,9 +17,10 @@ class ApplicationController < ActionController::Base end def load_categories - @categories = Rails.cache.fetch("categories-#{Category.count}") do - Category.all - end + #@categories = Rails.cache.fetch("categories-#{Category.count}") do + #Category.all + #end + @categories = Category.all end def load_user |
