Module: UtopiaData::Resource::Representer
- Included in:
- UtopiaData::Resource
- Defined in:
- lib/utopia_data/resource/representer.rb
Instance Method Summary collapse
Instance Method Details
#create_resource_representer ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/utopia_data/resource/representer.rb', line 28 def create_resource_representer representer_module = <<-MODEL module ::#{model_name}Representer include Roar::Representer::JSON include Roar::Representer::Feature::Hypermedia #{columns.map{|c| "property :#{c}" }.join("\n")} end MODEL eval representer_module end |