Commit graph

951 commits

Author SHA1 Message Date
Sam Lown ca1d1cd51d Merge pull request #72 from lucasrenan/master
Adding a config generator
2011-06-24 15:59:41 -07:00
Lucas Renan 9f7ce5d49b Merge branch 'master' of git://github.com/couchrest/couchrest_model 2011-06-21 14:03:04 -03:00
Sam Lown dca47ac3b2 Merge pull request #93 from crx/persisted_behavior
#persisted? should be false after a document has been destroyed
2011-06-17 17:14:57 -07:00
Chase DuBois b3a005b86d persisted? should be false after a document has been destroyed.
See https://github.com/rails/rails/blob/master/activemodel/CHANGELOG#L72
2011-06-12 14:27:45 -04:00
Sam Lown 98772ae98a Updating history 2011-06-09 01:52:29 +02:00
Sam Lown 778e486328 Adding comparison using ids rather than hashes 2011-06-09 01:49:09 +02:00
Sam Lown 7875113d95 Merge branch 'master' of github.com:couchrest/couchrest_model
Conflicts:
	lib/couchrest/model/callbacks.rb
2011-06-09 01:10:13 +02:00
Sam Lown ca932df5ba Merge pull request #90 from kostia/validates_on
Should be able to set contextual validations
2011-06-08 16:06:04 -07:00
Sam Lown 3579e0e334 Refactoring tests and Validation callbacks 2011-06-09 01:05:22 +02:00
Kostiantyn Kahanskyi 1b5c431053 Should be able to set contextual validations
Contextual validations are active __only__ within
an appropriate context: either ”create" or ”update”.

validates(:name, :presence => true, :on => :create)

validates(:name, :presence => {:on => :update})

See http://edgeguides.rubyonrails.org/active_record_validations_callbacks.html#on

Should fix https://github.com/couchrest/couchrest_model/pull/90
2011-06-08 22:54:35 +02:00
Sam Lown ea4325f5bf Fixing assiging hashes to casted arrays properties 2011-06-08 19:14:01 +02:00
Sam Lown 7e054fd948 Merge branch 'master' of github.com:couchrest/couchrest_model
Conflicts:
	history.md
	lib/couchrest/model/property.rb
2011-06-08 18:37:00 +02:00
Sam Lown 7c7ee2c2b1 Upgrading to use CouchRest 1.1.0.pre3 and new Hash-less design 2011-06-08 18:22:35 +02:00
Marcos Tapajós d99150547c History update 2011-06-07 21:00:41 -03:00
Kostiantyn Kahanskyi 0bb00860d1 Casted array should notify changes on deletion
Otherwise there is no direct way to delete particular elements.

Workaround with assigning to another array without those elements
is pretty ugly.

* Should notify on deletion at a particular index (Array#delete_at)
* Should notify on deletion of a particular element (Array#delete)

Signed-off-by: Marcos Tapajós <tapajos@gmail.com>
2011-06-07 20:59:14 -03:00
Marcos Tapajós f244b51fbf Update History 2011-06-07 20:58:31 -03:00
Kostiantyn Kahanskyi d50d47c32a Should be able to assign a casted hash to a hash property
Fixes https://github.com/couchrest/couchrest_model/issues/68

Signed-off-by: Marcos Tapajós <tapajos@gmail.com>
2011-06-07 20:57:48 -03:00
Sam Lown a55cf56213 Merge pull request #88 from kostia/incl_docs_paginate
Should always include docs when paginating by Model##paginate
2011-06-06 04:19:44 -07:00
Kostiantyn Kahanskyi 5cee1734da Should always include docs when paginating by Model##paginate
Fixes https://github.com/couchrest/couchrest_model/issues/81
2011-06-06 12:51:02 +02:00
Sam Lown 6e025bb256 Updating history 2011-06-06 01:55:08 +02:00
Sam Lown f5be6c7679 Fixing problem with reloading models and dirty tracking 2011-06-06 01:53:36 +02:00
Sam Lown de1cab1271 Updating destroy specs for DocumentNotFound message 2011-06-05 11:26:50 +02:00
Sam Lown 634fdf8b2f Merge branch 'master' of github.com:couchrest/couchrest_model 2011-06-05 11:21:12 +02:00
Sam Lown 36157a01d3 Destroy method now freezes instead of removing ids 2011-06-05 11:21:01 +02:00
Sam Lown 84d7063608 Merge pull request #83 from pezra/init-blocks
Init blocks
2011-06-01 02:37:47 -07:00
Peter Williams 53bc7637e2 tests for #create and #create! init blocks 2011-05-31 16:31:37 -06:00
Peter Williams 9369ad96d3 Merge remote branch 'origin/master' into init-blocks 2011-05-31 16:03:21 -06:00
Peter Williams 2b9a5193b4 add init block support to #create and #create! 2011-05-31 16:03:08 -06:00
Marcos Tapajós 4e19fdfdda History update 2011-05-30 22:00:56 -03:00
Peter Williams 9b8564d9a8 Implement #get! and #find! class methods
Signed-off-by: Marcos Tapajós <tapajos@gmail.com>
2011-05-30 21:57:28 -03:00
Peter Williams f28cce1f0a Implement #get! and #find! class methods 2011-05-23 11:02:08 -06:00
Lucas Renan ccafde77ab Merge branch 'master' of git://github.com/couchrest/couchrest_model 2011-05-23 08:48:10 -03:00
Sam Lown fcd9e2ba8e Adding property build support to enable CastedArray#build 2011-05-21 14:16:39 +02:00
Sam Lown d56179aa6b Views for unique validations created on loading, not execution 2011-05-20 12:21:42 +02:00
Sam Lown 938bf2cf2c Fixing dirty tracking on collection_of association type 2011-05-20 02:15:18 +02:00
Lucas Renan a400d46333 Merge branch 'master' of git://github.com/couchrest/couchrest_model 2011-05-18 21:49:18 -03:00
Sam Lown fba1e53e20 Overriding couchrest's database delete method to ensure design cache is deleted 2011-05-19 00:37:17 +02:00
Sam Lown 9754f4633c Merge branch 'master' of github.com:couchrest/couchrest_model
Conflicts:
	lib/couchrest/model/properties.rb
2011-05-19 00:10:18 +02:00
Sam Lown 1ef25c5015 Fixing as_json to always use a simple Hash and remove nils. History updates. 2011-05-19 00:08:58 +02:00
Lucas Renan f11a99dbfb Merge branch 'master' of git://github.com/couchrest/couchrest_model 2011-05-17 22:27:00 -03:00
Sam Lown c5ae042c76 Merge pull request #74 from DAddYE/master
Remove railties dependency
2011-05-16 02:00:58 -07:00
Davide D'Agostino f8769400b6 Update Rakefile to use latest rspec. 2011-05-16 10:50:22 +02:00
Davide D'Agostino 14e96367a5 Remove dependency of railties, issue #69 2011-05-16 10:50:00 +02:00
Lucas Renan c3b7cc316d adding config generator 2011-05-15 14:41:13 -03:00
Sam Lown 3f7b1d38c1 Merge pull request #71 from pezra/init-blocks
Support providing an initialization block when creating new models
2011-05-11 23:12:59 -07:00
Peter Williams c9d2611bb7 Support providing an initialization block when creating new models 2011-05-11 13:53:28 -06:00
Sam Lown 1309fa7082 Merge pull request #70 from pezra/rails-3.1
Rails 3.1 support
2011-05-10 10:04:56 -07:00
Peter Williams 2669de9511 Use class_attribute rather than extlib_inheritable_attribute (which is removed in rails 3.1) 2011-05-09 09:47:27 -06:00
Peter Williams 2b0dc2b779 Removed unneeded require 2011-05-06 13:32:49 -07:00
Peter Williams 7f1f05cbca Dumped supported rails versions 2011-05-06 11:23:14 -07:00