Sha256: e51def35c1a867e17bdb32c4b69c2fdfbbb13f41c089e85dc540056d2a909d1f
Contents?: true
Size: 679 Bytes
Versions: 2
Compression:
Stored size: 679 Bytes
Contents
HashDealer.define(:new_test_object) do attributes({ :protected => [:id], :public => [:name, :age], }) 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 => {}}, :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
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
old_api_resource-0.3.0 | spec/support/requests/test_resource_requests.rb |
resource-0.1.0 | spec/support/requests/test_resource_requests.rb |