Module: Representable::JSON
- Defined in:
- lib/roar_extensions/representable_json_extensions.rb
Instance Method Summary collapse
Instance Method Details
#to_hash(options = {}) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/roar_extensions/representable_json_extensions.rb', line 5 def to_hash( = {}) if [:include] [:include].map!(&:to_sym) [:include] |= self.class.always_include_attributes.map(&:to_sym) end to_hash_without_always_include_attributes() end |
#to_hash_without_always_include_attributes ⇒ Object
3 |
# File 'lib/roar_extensions/representable_json_extensions.rb', line 3 alias_method :to_hash_without_always_include_attributes, :to_hash |