aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't enable validations when passing false hash values to ActiveModel.validatesSteve Purcell2012-05-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing a falsey option value for a validator currently causes that validator to be enabled, just like "true": ActiveModel.validates :foo, :presence => false This is rather counterintuitive, and makes it inconvenient to wrap `validates` in methods which may conditionally enable different validators. As an example, one is currently forced to write: def has_slug(source_field, options={:unique => true}) slugger = Proc.new { |r| r[:slug] = self.class.sluggify(r[source_field]) if r[:slug].blank? } before_validation slugger validations = { :presence => true, :slug => true } if options[:unique] validations[:uniqueness] = true end validates :slug, validations end because the following reasonable-looking alternative fails to work as expected: def has_slug(source_field, options={:unique => true}) slugger = Proc.new { |r| r[:slug] = self.class.sluggify(r[source_field]) if r[:slug].blank? } before_validation slugger validates :slug, :presence => true, :slug => true, :uniqueness => options[:unique] end (This commit includes a test, and all activemodel and activerecord tests pass as before.)
* Reordered changelog entryBrian Cardarella2012-04-231-2/+2
|
* Updated CHANGELOGBrian Cardarella2012-04-231-0/+2
|
* Fix my name in the CHANGELOG to follow the conventionRafael Mendonça França2012-03-091-0/+11
| | | | Also add missing entries and use the formating convention
* changelog updates for Rails 4 [ci skip]Vijay Dev2012-03-091-0/+2
|
* Add ActiveModel::Model, a mixin to make Ruby objects to work with AP inmediatlyGuillermo Iguaran2012-03-021-0/+2
|
* Add release dates to documentationclaudiob2012-03-011-1/+1
| | | | Set "March 1, 2012" as the release date for 3.2.2, 3.1.4, 3.0.12
* Update changelogs with rails 3.0-stable branch infoPaco Guzman2012-02-251-1/+47
|
* AM::Errors: allow :full_messages parameter for #as_jsonBogdan Gusiev2012-02-201-0/+2
|
* Trim down Active Model API by removing valid? and errors.full_messagesJosé Valim2012-02-071-0/+2
|
* Add release date of Rails 3.2.0 to documentationclaudiob2012-01-261-1/+1
|
* Revert "Implement ArraySerializer and move old serialization API to a new ↵José Valim2011-11-301-8/+0
| | | | | | | | | | | | | namespace." This reverts commit 8896b4fdc8a543157cdf4dfc378607ebf6c10ab0. Conflicts: activemodel/lib/active_model.rb activemodel/lib/active_model/serializable.rb activemodel/lib/active_model/serializer.rb activemodel/test/cases/serializer_test.rb
* Deprecated `define_attr_method` in `ActiveModel::AttributeMethods`Jon Leighton2011-11-291-0/+5
| | | | | This only existed to support methods like `set_table_name` in Active Record, which are themselves being deprecated.
* Revert the serializers API as other alternatives are now also under discussionJosé Valim2011-11-251-2/+0
|
* Add docs to serializers. Update CHANGELOGs.José Valim2011-11-251-1/+13
|
* Convert CHANGELOGs to Markdown format.Jon Leighton2011-11-041-0/+109
Reasons: * Markdown reads well as plain text, but can also be formatted. * It will make it easier for people to read on the web as Github formats the Markdown nicely. * It will encourage a level of consistency when people are writing CHANGELOG entries. The script used to perform the conversion is at https://gist.github.com/1339263