Permalink
Browse files

fix the declaration of the before filter

  • Loading branch information...
1 parent b9a6291 commit 498b2f2a43346747d77d422443d5de9c423eb58c @mkristian committed May 16, 2012
Showing with 1 addition and 3 deletions.
  1. +1 −0 lib/ixtlan/guard/guard_rails.rb
  2. +0 −3 lib/ixtlan/guard/railtie.rb
@@ -4,6 +4,7 @@ module ActionController
def self.included(base)
base.send(:include, InstanceMethods)
base.send(:include, GroupsMethod)
+ base.send(:before_filter, :authorize)
end
class Filter
@@ -24,9 +24,6 @@ class Railtie < Rails::Railtie
options[:logger] = logger unless defined?(Slf4r)
FileUtils.mkdir_p(app.config.guards_dir)
- controller = ::ApplicationController rescue ::ActionController::Base
- controller.send(:before_filter, :authorize)
-
app.config.guard = Ixtlan::Guard::Guard.new(options)
end

0 comments on commit 498b2f2

Please sign in to comment.