lib/representable.rb in representable-2.0.4 vs lib/representable.rb in representable-2.1.0

- old
+ new

@@ -39,11 +39,13 @@ representable_mapper(format, options).serialize(doc, options) end def representable_bindings_for(format, options) options = cleanup_options(options) # FIXME: make representable-options and user-options two different hashes. + representable_attrs.collect {|attr| representable_binding_for(attr, format, options) } + # representable_attrs.binding_cache[format] ||= representable_attrs.collect {|attr| representable_binding_for(attr, format, options) } end def representable_binding_for(attribute, format, options) format.build(attribute, represented, self, options) end @@ -58,10 +60,9 @@ def representable_mapper(format, options) bindings = representable_bindings_for(format, options) Mapper.new(bindings, represented, options) # TODO: remove self, or do we need it? and also represented! end - def representation_wrap(*args) representable_attrs.wrap_for(self.class.name, represented, *args) end \ No newline at end of file