lib/volt/models/persistors/store.rb
def read_new_model(method_name)
      # On stores, plural associations are automatically assumed to be
      # collections.
      options = @model.options.merge(parent: @model, path: @model.path + [method_name])
      if method_name.plural?
        model = @model.new_array_model([], options)
      else
        model = @model.new_model(nil, options)
      end

      @model.attributes ||= {}
      @model.attributes[method_name] = model

      return model
    end
# On stores, we store the model so we don't have to look it up
# every time we do a read.
On stores, we store the model so we don't have to look it up
every time we do a read.
On stores we store the model so we don ' t have to look it up every time we do a read .
def read_new_model(method_name)
      options = @model.options.merge(parent: @model, path: @model.path + [method_name])
      if method_name.plural?
        model = @model.new_array_model([], options)
      else
        model = @model.new_model(nil, options)
      end
      @model.attributes ||= {}
      @model.attributes[method_name] = model
      return model
    end
def read_new_model ( method_name ) options = @model . options . merge ( parent : @model , path : @model . path + [ method_name ] ) if method_name . plural? model = @model . new_array_model ( [ ] , options ) else model = @model . new_model ( nil , options ) end @model . attributes ||= { } @model . attributes [ method_name ] = model return model end
On stores, we store the model so we don't have to look it up
every time we do a read.
On stores we store the model so we don ' t have to look it up every time we do a read .
# On stores, plural associations are automatically assumed to be # collections.
method_name