aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
* Add CHANGELOG to Active Model too [ci skip]Rafael Mendonça França2014-03-271-0/+6
|
* Point master changelogs to 4-1-stable branchCarlos Antonio da Silva2014-02-251-72/+1
| | | | Remove 4-1 related entries from master [ci skip]
* `#to_param` returns `nil` if `to_key` returns `nil`. Closes #11399.Yves Senn2014-02-041-0/+4
| | | | | | | | | | | | | | | | The documentation of `#to_key` (http://api.rubyonrails.org/classes/ActiveModel/Conversion.html#method-i-to_key) states that it returns `nil` if there are no key attributes. `to_param` needs to be aware of that fact and return `nil` as well. Previously it raised the following exception: ``` 1) Error: ConversionTest#test_to_param_returns_nil_if_to_key_is_nil: NoMethodError: undefined method `join' for nil:NilClass /Users/senny/Projects/rails/activemodel/lib/active_model/conversion.rb:65:in `to_param' /Users/senny/Projects/rails/activemodel/test/cases/conversion_test.rb:34:in `block in <class:ConversionTest>' ```
* tidy CHANGELOGs [ci skip]Yves Senn2014-01-301-2/+5
|
* Ability to specify multiple contexts when defining a validation.Vince Puzzella2014-01-271-0/+20
| | | | | | Example: validates_presence_of :name, on: [:update, :custom_validation_context]
* Use a better method name to check the requirement of password confirmationCarlos Antonio da Silva2014-01-071-3/+3
| | | | | Also improve changelog entries related to secure password to proper highlight.
* Allows you to check if an attribute has changed to a particular valueTejas Dinkar2013-12-151-0/+6
| | | | model.name_changed?(from: "Pete", to: "Ringo")
* first pass through CHANGELOGS to extract 4_1_release_notes. [ci skip]Yves Senn2013-11-281-2/+2
| | | | | | | | | | | | Extract **notable changes**, **deprecations** and **removals** from each CHANGELOG. I tried to reference the commits and pull requests for new features and deprecations. In the process I also made some minor changes to the CHANGELOGS. The 4_1_release_notes guide is declared WIP.
* Use bcrypt's public cost attr, not internal constantT.J. Schuck2013-10-101-0/+4
| | | | | | | | See: - https://github.com/codahale/bcrypt-ruby/pull/63 - https://github.com/codahale/bcrypt-ruby/pull/64 - https://github.com/codahale/bcrypt-ruby/pull/65
* Merge pull request #8791 from griffinmyers/masterRafael Mendonça França2013-10-031-0/+5
|\ | | | | | | | | | | | | Updated DirtyModel's @changed_attributes hash to be symbol/string agnostic Conflicts: activemodel/CHANGELOG.md
| * DirtyModel uses a hash to keep track of any changes made to attributesWilliam Myers2013-05-271-0/+5
| | | | | | | | | | | | | | | | | | of an instance. When using the attribute_will_change! method, you must supply a string and not a symbol or the *_changed? method will break (because it is looking for the attribute name as a string in the keys of the underlying hash). To remedy this, I simply made the underlying hash a HashWithIndifferentAccess so it won't matter if you supply the attribute name as a symbol or string to attribute_will_change!.
* | No need to abbreviate ActiveModelRafael Mendonça França2013-09-231-1/+1
| | | | | | | | [ci skip]
* | Merge pull request #10816 from bogdan/less-dirty-dirtyRafael Mendonça França2013-09-231-0/+6
| | | | | | | | Make AM::Dirty less dirty to plugin into AR or other library
* | Fix secure_password password_confirmation validationsVladimir Kiselev2013-07-241-0/+5
| |
* | Merge pull request #10774 from ↵Carlos Antonio da Silva2013-06-251-0/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | chuckbergeron/validates-inclusion-of-accuracy-for-non-numeric-ranges Greater accuracy for validates_inclusion_of on non-numeric ranges Closes #10774, fixes #10593
| * | Use Range#cover? for Numeric ranges (tests via endpoints) and use ↵Charles Bergeron2013-05-271-0/+4
| | | | | | | | | | | | | | | | | | Range#include? for non-numeric ranges added changelog message
* | | Fix regression in has_secure_password.Phil Calvin2013-05-301-0/+5
|/ / | | | | | | If the confirmation was blank, but the password wasn't, it would still save.
* | deprecate Validator#setup (to get rid of a respond_to call). validators do ↵Nick Sutterer2013-05-231-1/+3
| | | | | | | | their setup in their constructor now.
* | rails/master is now 4.1.0.betaRafael Mendonça França2013-04-291-212/+2
| |
* | use unified and clean formatting in CHANGELOGS. [ci skip]Yves Senn2013-04-121-9/+12
| |
* | Improve changelog entry for ActiveModel::Errors#full_messages_for [ci skip]Carlos Antonio da Silva2013-03-301-2/+13
| | | | | | | | Add a working example of how to use this new method.
* | Add a method full_messages_for to the Errors classshock_one2013-03-241-0/+5
| |
* | Fixed typo in activemodel/CHANGELOGPrathamesh Sonpatki2013-03-241-1/+1
| |
* | The repair_validations helper was not working correctly before becausewangjohn2013-03-191-0/+21
| | | | | | | | | | | | it only cleared the validations that created :validate callbacks. This didn't include the validates created by validates_with, so I've added a method to clear all validations.
* | Small typos here and there.Vipul A M2013-03-151-1/+1
| |
* | Fix AMo code example indent, add missing author to entry [ci skip]Carlos Antonio da Silva2013-03-091-6/+8
| |
* | `has_secure_password` is not invalid when assigning empty Strings.Yves Senn2013-03-041-0/+10
| | | | | | | | | | | | | | | | | | | | Closes #9535. With 692b3b6 the `password=` setter does no longer set blank passwords. This triggered validation errors when assigning empty Strings to `password` and `password_confirmation`. This patch only sets the confirmation if it is not `blank?`.
* | `validates_confirmation_of` does not override writer methods.Yves Senn2013-03-041-0/+15
| |
* | Update CHANGELOGSRafael Mendonça França2013-02-261-0/+3
| |
* | Preparing for 4.0.0.beta1 releaseDavid Heinemeier Hansson2013-02-251-1/+1
| |
* | did a pass over the AM changelog [ci skip]Xavier Noria2013-02-241-15/+35
|/
* This change doesn't need a CHANGELOG entry.Rafael Mendonça França2012-12-261-5/+0
| | | | [ci skip]
* Add CHANGELOG entry for #8622Rafael Mendonça França2012-12-261-0/+5
|
* Remove CHANGELOG entry for ActiveModel::Errors#add_on_presentRafael Mendonça França2012-12-211-5/+0
|
* Fix Action Mailer changelog indenation to match other changelogsCarlos Antonio da Silva2012-12-191-0/+1
| | | | Also some minor improvements to other changelogs. [ci skip]
* Improve AMo changelog example to not rely on AR [ci skip]Carlos Antonio da Silva2012-12-191-4/+8
|
* Add `ActiveModel::Validations::AbsenceValidator`, a validator to check the ↵Roberto Vasquez Angel2012-12-151-0/+19
| | | | | | absence of attributes. Add `ActiveModel::Errors#add_on_present` method. Adds error messages to present attributes.
* Convert changelogs to 1.9 hash style and fix some formatting [ci skip]Carlos Antonio da Silva2012-12-141-1/+1
|
* Reset attributes should not report changes.Renato Mascarenhas2012-12-011-0/+4
| | | | | | | | | | | When resetting an attribute, you expect it to return to the state it was before any changes. Namely, this fixes this unexpected behavior: ~~~ruby model.name = "Bob" model.reset_name! model.name_changed? #=> true ~~~
* Add CHANGELOG entries for the observes extractionRafael Mendonça França2012-11-291-0/+4
| | | | [ci skip]
* Specify type of singular association during serializationSteve Klabnik2012-11-281-0/+2
| | | | | | | | | | | | When serialising a class, specify the type of any singular associations, if necessary. Rails already correctly specifies the :type of any enumerable association (e.g. a has_many association), but made no attempt to do so for non-enumerables (e.g. a has_one association). We must specify the :type of any STI association. A has_one association to a class which uses single-table inheritance is an example of this type of association. Fixes #7471
* Merge pull request #7282 from xHire/validates_length_of_fixRafael Mendonça França2012-11-261-0/+4
|\ | | | | | | | | | | | | Length validation handles correctly nil. Fix #7180 Conflicts: activemodel/CHANGELOG.md
| * Length validation handles correctly nil. Fix #7180Michal Zima2012-11-261-0/+4
| | | | | | | | When nil or empty string are not allowed, they are not valid.
* | cleanup, removed dispensable `require` statements from `ActiveModel`Yves Senn2012-11-251-0/+5
|/
* Use BCrypt's MIN_COST in the test environment for speedier testsTrevor Turk2012-11-141-0/+4
|
* add credit to committer of pull request #6569Jan Berdajs2012-10-181-1/+1
|
* Revert "Merge pull request #7826 from sikachu/master-validators-kind"Rafael Mendonça França2012-10-021-10/+0
| | | | | | | | | | | | | | | | This reverts commit 4e9f53f9736544f070e75e516c71137b7eb49a7a, reversing changes made to 6b802cdb4f5b84e1bf49aaeb0e994b3be6028af9. Revert "Don't use tap in this case." This reverts commit 454d820bf0a18fe1db4c55b0145197d70fef1f82. Reason: Is not a good idea to add options to this method since we can do the same thing using method composition. Person.validators_on(:name).select { |v| v.kind == :presence } Also it avoids to change the method again to add more options.
* Make `.validators_on` accept `:kind` optionPrem Sichanugrist2012-10-021-0/+10
| | | | | This will filter out the validators on a particular attribute based on its kind.
* Update changelogs to add entries about strong_parameters integrationGuillermo Iguaran2012-09-191-0/+11
|
* Update Active Model xml serialization test to reflect a change in builderCarlos Antonio da Silva2012-09-071-0/+11
| | | | | | | | | | | | | | Due to a change in builder, nil values and empty strings now generates closed tags, so instead of this: <pseudonyms nil=\"true\"></pseudonyms> It generates this: <pseudonyms nil=\"true\"/> Document this change in Rails so that people can track it down easily if necessary.