lib/jsonapionify/api/resource/definitions/helpers.rb in jsonapionify-0.9.0 vs lib/jsonapionify/api/resource/definitions/helpers.rb in jsonapionify-0.9.1
- old
+ new
@@ -4,10 +4,10 @@
def helper(name, &block)
define_method(name, &block)
end
def authentication(&block)
- context :authentication, readonly: true do |context|
+ context :authentication, readonly: true, persisted: true do |context|
OpenStruct.new.tap do |authentication_object|
if instance_exec(context.request, authentication_object, &block) == false
error_now :forbidden
end
end