lib/timber/contexts/organization.rb in timber-2.1.9 vs lib/timber/contexts/organization.rb in timber-2.1.10
- old
+ new
@@ -22,16 +22,16 @@
@keyspace = :organization
attr_reader :id, :name
def initialize(attributes)
- @id = attributes[:id]
+ @id = Timber::Util::Object.try(attributes[:id], :to_s)
@name = attributes[:name]
end
# Builds a hash representation containing simple objects, suitable for serialization (JSON).
def as_json(_options = {})
- {id: Timber::Util::Object.try(id, :to_s), name: name}
+ {id: id, name: name}
end
end
end
end
\ No newline at end of file