module Authoryze::Rails::ControllerExtensions
Public Instance Methods
can()
click to toggle source
# File lib/authoryze/rails/controller_extensions.rb, line 14 def can @__can_authoryze ||= OpenStruct.new begin if resource = send(Authoryze.resource_accessor) Hash[resource.send(Authoryze.permissions_collection).map{|x| ['%s?' % x,true]}] end end end