Skip to content

Commit 9ee1bcc

Browse files
authored
Fix generator for decimal (#82)
1 parent 8e40aef commit 9ee1bcc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/generators/jsonapi/templates/payload.rb.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ JsonapiSpecHelpers::Payload.register(:<%= file_name %>) do
3333
<%- attributes.each do |a| -%>
3434
<%- type = a.type == :boolean ? [TrueClass, FalseClass] : a.type.to_s.classify -%>
3535
<%- type = String if a.type == :text -%>
36+
<%- type = Float if a.type == :decimal -%>
3637
key(:<%= a.name %>, <%= type %>)
3738
<%- end -%>
3839
end

lib/jsonapi_compliable/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module JsonapiCompliable
2-
VERSION = "0.11.8"
2+
VERSION = "0.11.9"
33
end

0 commit comments

Comments
 (0)