aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorKir2011-11-21 11:48:10 +0400
committerKir2011-11-21 11:48:10 +0400
commit580bc3eaad6ed578b5d33256e6eda3e282aa91cd (patch)
tree0ae8321fe716504c2050e3bbc0294844ee3f18aa /app/controllers
parentbd1ee727b44381f1755858b7e3c0bb7ddf87b0cd (diff)
downloadinboxes-580bc3eaad6ed578b5d33256e6eda3e282aa91cd.tar.bz2
Integration with Cancan
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/inboxes/base_controller.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/inboxes/base_controller.rb b/app/controllers/inboxes/base_controller.rb
index da116a0..680e38c 100644
--- a/app/controllers/inboxes/base_controller.rb
+++ b/app/controllers/inboxes/base_controller.rb
@@ -4,4 +4,10 @@ class Inboxes::BaseController < ApplicationController
def init_discussion
@discussion = Discussion.find(params[:discussion_id])
end
+
+ # Needs to be overriden so that we use Spree's Ability rather than anyone else's.
+ def current_ability
+ # raise "Loading Ability"
+ @current_ability ||= Inboxes::Ability.new(current_user)
+ end
end \ No newline at end of file