Module: Immoscout::Models::Concerns::Renderable
- Extended by:
- ActiveSupport::Concern
- Included in:
- ApartmentBuy, Immoscout::Models::Contact, Document, HouseBuy, Parts::Address, Parts::ApiSearchData, Parts::Contact, Parts::Coordinate, Parts::Courtage, Parts::EnergyCertificate, Parts::EnergySource, Parts::FiringType, Parts::GeoCode, Parts::GeoHierarchy, Parts::InternationalCountryRegion, Parts::Price, Parts::PublishChannel, Parts::RealEstate, Parts::Url, Parts::Urls, Picture, Publish
- Defined in:
- lib/immoscout/models/concerns/renderable.rb
Overview
Includes functionality to serialize a Ruby model properly.
Instance Method Summary collapse
- #as_json ⇒ Object
- #to_json ⇒ Object (also: #to_s)
Instance Method Details
#as_json ⇒ Object
15 16 17 |
# File 'lib/immoscout/models/concerns/renderable.rb', line 15 def as_json wrapped? ? to_json_wrapped : to_json_unwrapped end |
#to_json ⇒ Object Also known as: to_s
19 20 21 |
# File 'lib/immoscout/models/concerns/renderable.rb', line 19 def to_json(*) as_json.to_json end |