# File lib/declarative_authorization/authorization.rb, line 542 def object_attribute_value (object, attr) begin object.send(attr) rescue ArgumentError, NoMethodError => e raise AuthorizationUsageError, "Error occurred while validating attribute ##{attr} on #{object.inspect}: #{e}.\n" + "Please check your authorization rules and ensure the attribute is correctly spelled and \n" + "corresponds to a method on the model you are authorizing for." end end