Method: CollectionJson::Item#singular_representation
- Defined in:
- lib/collection_json/item.rb
#singular_representation ⇒ Object
31 32 33 34 35 |
# File 'lib/collection_json/item.rb', line 31 def singular_representation item = {} item.merge!({href: href}) if href item.merge!({data: attributes}) if attributes.any? end |