lib/jsonapi/formatter.rb in jsonapi-resources-0.0.6 vs lib/jsonapi/formatter.rb in jsonapi-resources-0.0.7
- old
+ new
@@ -35,15 +35,15 @@
end
end
class ValueFormatter < Formatter
class << self
- def format(raw_value, source, context)
+ def format(raw_value, context)
super(raw_value)
end
- def unformat(value, resource_klass, context)
+ def unformat(value, context)
super(value)
end
def value_formatter_for(type)
formatter_name = "#{type.to_s.camelize}Value"
@@ -80,10 +80,10 @@
end
end
class DefaultValueFormatter < JSONAPI::ValueFormatter
class << self
- def format(raw_value, source, context)
+ def format(raw_value, context)
case raw_value
when String, Integer
return raw_value
else
return raw_value.to_s
\ No newline at end of file