Sha256: 162c1d916aabc3ae935ab5716b0d5d3129cbde0478ecdb96c246bd70e7f73621

Contents?: true

Size: 744 Bytes

Versions: 1

Compression:

Stored size: 744 Bytes

Contents

HashDealer.define(:new_test_object) do
  attributes({
    :protected => [:id],
    :public => [:name, :age, [:bday, :date]],
  })
  scopes({
    :active => {:active => true},
    :paginate => {:paginate => true, :per_page => :per_page, :current_page => :current_page}
  })
  associations({
    :has_many => {:has_many_objects => {}},
    :belongs_to => {:belongs_to_object => {}, :custom_name => {:class_name => "BelongsToObject"}},
    :has_one => {:has_one_object => {}},
  })
  # Think of a use case for this
  options({
    
  })
end

HashDealer.define(:test_resource) do
  name("name")
  age("age")
end

HashDealer.define(:test_resource_errors) do
  errors({
    :name => ["can't be blank"],
    :age => ["must be a valid number"]
  })
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
api_resource-0.2.5 spec/support/requests/test_resource_requests.rb