-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed
Description
The code below in app/models/scorecard_authorization.rb produces the error in browser
undefined method `normalize' for #ScorecardAuthorization:0x00000005564cd0
class ScorecardAuthorization < ActiveAdmin::AuthorizationAdapter
def authorized?(action, subject = nil)
case subject
when normalize(Person)
# Only let the author update and delete posts
if action == :update || action == :destroy
subject.author == user
# If it's not an update or destroy, anyone can view it
else
true
end
else
true
end
end
end
ActiveAdmin 0.6.0
Rails 3.2.13
Metadata
Metadata
Assignees
Labels
No labels