lib/timber/contexts/custom.rb in timber-1.1.2 vs lib/timber/contexts/custom.rb in timber-1.1.3
- old
+ new
@@ -16,10 +16,10 @@
@type = attributes[:type] || raise(ArgumentError.new(":type is required"))
@data = attributes[:data] || raise(ArgumentError.new(":data is required"))
end
def as_json(_options = {})
- {type => data}
+ {Timber::Object.try(type, :to_sym) => data}
end
end
end
end
\ No newline at end of file