lib/happy/ext/resources.rb in happy-0.1.0.pre12 vs lib/happy/ext/resources.rb in happy-0.1.0.pre13
- old
+ new
@@ -21,14 +21,14 @@
def resource
options[:class]
end
def resource_with_permission_scope(*args)
- context.permissions.scoped_model(*args, options[:class])
+ permissions.scoped_model(*args, options[:class])
end
def require_permission!(*args)
- raise "not allowed" unless can?(*args, options[:class])
+ raise "not allowed" unless permissions.can?(*args, options[:class])
end
def set_plural_variable(v)
context.instance_variable_set "@#{options[:plural_name]}", v
end