From 67c36191d2f456e124eb19d64d161f6d2acea623 Mon Sep 17 00:00:00 2001 From: Didier Lafforgue Date: Tue, 17 Apr 2012 13:53:15 +0200 Subject: [PATCH] was breaking the API (tests are coming) --- lib/locomotive/action_controller/responder.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/locomotive/action_controller/responder.rb b/lib/locomotive/action_controller/responder.rb index c516e54b..8fedd51f 100644 --- a/lib/locomotive/action_controller/responder.rb +++ b/lib/locomotive/action_controller/responder.rb @@ -10,10 +10,14 @@ module Locomotive end def options + current_site = self.controller.send(:current_site) + current_account = self.controller.send(:current_locomotive_account) + ability = current_account.nil? ? nil : self.controller.send(:current_ability) + super.merge({ - :current_site => self.controller.send(:current_site), - :current_account => self.controller.send(:current_locomotive_account), - :ability => self.controller.send(:current_ability) + :current_site => current_site, + :current_account => current_account, + :ability => ability }) end