Permalink
Browse files

remove cattr_accessor

  • Loading branch information...
ujifgc committed Oct 27, 2015
1 parent f6eb041 commit af177cc2aebb73961ae47c40b853b7601d4c88e3
Showing with 11 additions and 1 deletion.
  1. +11 −1 padrino-admin/lib/padrino-admin/access_control.rb
@@ -19,7 +19,17 @@ def registered(app)
app.helpers Padrino::Admin::Helpers::AuthenticationHelpers
app.helpers Padrino::Admin::Helpers::ViewHelpers
app.before { login_required }
app.send(:cattr_accessor, :access_control)
app.class_eval do
def access_control
@@access_control
end
def self.access_control
@@access_control
end
def self.access_control=(control)
@@access_control = control
end
end
app.send(:access_control=, Padrino::Admin::AccessControl::Base.new)
end
alias :included :registered

0 comments on commit af177cc

Please sign in to comment.