app/models/apicasso/ability.rb in apicasso-0.3.3 vs app/models/apicasso/ability.rb in apicasso-0.4.0

- old
+ new

@@ -14,18 +14,18 @@ if clearance == true # Usage: # To have a key reading all channels and all accouts # you would have a scope: # => `{read: {channel: true, accout: true}}` - can permission.to_sym, klass.underscore.to_sym + can permission.to_sym, klass.underscore.singularize.to_sym can permission.to_sym, klass.classify.constantize elsif clearance.class == Hash # Usage: # To have a key reading all banners from a channel with id 999 # you would have a scope: # => `{read: {banner: {owner_id: [999]}}}` can permission.to_sym, - klass.underscore.to_sym + klass.underscore.singularize.to_sym clearance.each do |by_field, values| can permission.to_sym, klass.classify.constantize, by_field.to_sym => values end