Sha256: 4a271c7bcc0cb765e863480af3485390dbade61c945a2cef44777483153e0c00

Contents?: true

Size: 435 Bytes

Versions: 3

Compression:

Stored size: 435 Bytes

Contents

# encoding: utf-8

$:.push 'examples'; require 'helper'

class Root < RestModel
  property    :key,    id: true
  property    :locale, visible: false
  embeds_many :names,  class_name: 'Hash', visible: false
  property    :name,   values: proc {names[locale]}
end

names = {'en' => 'Woot', 'pt-BR' => 'Úia', 'es' => 'Me gusta'}

@root = Root.from_source!(locale: 'pt-BR', key: 19190839, names: names).first

inspect_rest_model(@root)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rest_model-0.1.4 examples/embeds_many/invisible.rb
rest_model-0.1.3 examples/embeds_many/invisible.rb
rest_model-0.1.2 examples/embeds_many/invisible.rb