lib/grape_entity/exposure/base.rb in grape-entity-0.5.2 vs lib/grape_entity/exposure/base.rb in grape-entity-0.6.0

- old
+ new

@@ -49,15 +49,15 @@ def valid?(entity) is_delegatable = entity.delegator.delegatable?(@attribute) || entity.respond_to?(@attribute, true) if @is_safe is_delegatable else - is_delegatable || fail(NoMethodError, "#{entity.class.name} missing attribute `#{@attribute}' on #{entity.object}") + is_delegatable || raise(NoMethodError, "#{entity.class.name} missing attribute `#{@attribute}' on #{entity.object}") end end def value(_entity, _options) - fail NotImplementedError + raise NotImplementedError end def serializable_value(entity, options) partial_output = valid_value(entity, options)