1
0
Fork 0
mirror of https://github.com/awesome-print/awesome_print synced 2023-03-27 23:22:34 -04:00

Merge pull request #292 from olleolleolle/patch-1

Sequel: avoid shadowing outer variable
This commit is contained in:
Gerry 2016-12-08 10:22:14 +11:00 committed by GitHub
commit fbe8ba610c

View file

@ -45,8 +45,8 @@ module AwesomePrint
# Format Sequel Model class.
#------------------------------------------------------------------------------
def awesome_sequel_model_class(object)
data = object.db_schema.inject({}) { |h, (name, data)| h.merge(name => data[:db_type]) }
"class #{object} < #{object.superclass} " << awesome_hash(data)
result = object.db_schema.inject({}) { |h, (name, data)| h.merge(name => data[:db_type]) }
"class #{object} < #{object.superclass} " << awesome_hash(result)
end
end