lib/jsonapi/error.rb in jsonapi-resources-0.3.1 vs lib/jsonapi/error.rb in jsonapi-resources-0.3.2

- old
+ new

@@ -6,12 +6,16 @@ def initialize(options={}) @title = options[:title] @detail = options[:detail] @id = options[:id] @href = options[:href] - @code = options[:code] + @code = if JSONAPI.configuration.use_text_errors + TEXT_ERRORS[options[:code]] + else + options[:code] + end @path = options[:path] @links = options[:links] @status = options[:status] end end -end \ No newline at end of file +end