aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
* ensure `method_missing` called for non-existing methods passed toJay Elaraj2015-04-281-0/+5
| | | | `ActiveModel::Serialization#serializable_hash`
* pass over CHANGELOGs. [ci skip]Yves Senn2015-04-221-1/+1
|
* Add `ActiveModel::Dirty#[attr_name]_previously_changed?` andFernando Tapia Rico2015-04-211-0/+9
| | | | | | | | `ActiveModel::Dirty#[attr_name]_previous_change` to improve access to recorded changes after the model has been saved. It makes the dirty-attributes query methods consistent before and after saving.
* Fix a few typos [ci skip]Robin Dupret2015-04-051-4/+4
|
* Deprecate the `:tokenizer` option to `validates_length_of`Sean Griffin2015-03-291-0/+5
| | | | | | | | As demonstrated by #19570, this option is severely limited, and satisfies an extremely specific use case. Realistically, there's not much reason for this option to exist. Its functionality can be trivially replicated with a normal Ruby method. Let's deprecate this option, in favor of the simpler solution.
* some indenting and punctuation fixes. [ci skip]Yves Senn2015-02-231-1/+1
|
* Deprecate `ActiveModel::Errors` `add_on_empty` and `add_on_blank` methodsWojciech Wnętrzak2015-02-191-0/+5
| | | | without replacement.
* Merge pull request #18634 from morgoth/deprecate-some-errors-methodsRafael Mendonça França2015-02-181-0/+5
|\ | | | | | | Deprecate `ActiveModel::Errors` `get`, `set` and `[]=` methods.
| * Deprecate `ActiveModel::Errors` `get`, `set` and `[]=` methods.Wojciech Wnętrzak2015-02-011-0/+5
| | | | | | | | They have inconsistent behaviour currently.
* | Merge pull request #16381 from kakipo/validate-length-tokenizerRafael Mendonça França2015-02-131-0/+4
|\ \ | | | | | | | | | Allow symbol as values for `tokenizer` of `LengthValidator`
| * | Allow symbol as values for `tokenize` of `LengthValidator`kakipo2014-08-031-0/+4
| | |
* | | Move required error message and changelog to Active RecordCarlos Antonio da Silva2015-02-011-5/+0
| |/ |/| | | | | | | The new association error belongs to Active Record, not Active Model. See #18700 for reference.
* | Merge pull request #18700 from nygrenh/better-required-messageAaron Patterson2015-01-311-0/+5
|\ \ | | | | | | Provide a better error message on :required association
| * | Provide a better error message on :required associationHenrik Nygren2015-01-281-0/+5
| | | | | | | | | | | | Fixes #18696.
* | | unify CHANGELOG format. [ci skip]Yves Senn2015-01-311-32/+30
|/ /
* | use attribute assignment module logic during active model initializationEugene Gilburg2015-01-231-0/+11
| |
* | ✂️ and 💅 for #10776Sean Griffin2015-01-231-1/+1
| | | | | | | | | | Minor style changes across the board. Changed an alias to an explicit method declaration, since the alias will not be documented otherwise.
* | Extracted `ActiveRecord::AttributeAssignment` to ↵Bogdan Gusiev2015-01-231-0/+20
| | | | | | | | | | | | `ActiveModel::AttributesAssignment` Allows to use it for any object as an includable module.
* | Add ActiveModel::Errors#detailsWojciech Wnętrzak2015-01-201-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To be able to return type of validator, one can now call `details` on Errors instance: ```ruby class User < ActiveRecord::Base validates :name, presence: true end ``` ```ruby user = User.new; user.valid?; user.errors.details => {name: [{error: :blank}]} ```
* | allow '1' or true for acceptance validation.mo khan2015-01-101-0/+6
| |
* | Remove deprecated `ActiveModel::Dirty#reset_#{attribute}` and ↵Rafael Mendonça França2015-01-041-0/+5
| | | | | | | | `ActiveModel::Dirty#reset_changes`.
* | Add config to halt callback chain on return falseclaudiob2015-01-021-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This stems from [a comment](rails#17227 (comment)) by @dhh. In summary: * New Rails 5.0 apps will not accept `return false` as a way to halt callback chains, and will not display a deprecation warning. * Existing apps ported to Rails 5.0 will still accept `return false` as a way to halt callback chains, albeit with a deprecation warning. For this purpose, this commit introduces a Rails configuration option: ```ruby config.active_support.halt_callback_chains_on_return_false ``` For new Rails 5.0 apps, this option will be set to `false` by a new initializer `config/initializers/callback_terminator.rb`: ```ruby Rails.application.config.active_support.halt_callback_chains_on_return_false = false ``` For existing apps ported to Rails 5.0, the initializers above will not exist. Even running `rake rails:update` will not create this initializer. Since the default value of `halt_callback_chains_on_return_false` is set to `true`, these apps will still accept `return true` as a way to halt callback chains, displaying a deprecation warning. Developers will be able to switch to the new behavior (and stop the warning) by manually adding the line above to their `config/application.rb`. A gist with the suggested release notes to add to Rails 5.0 after this commit is available at https://gist.github.com/claudiob/614c59409fb7d11f2931
* | Deprecate `false` as the way to halt AM callbacksclaudiob2015-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | Before this commit, returning `false` in an ActiveModel `before_` callback such as `before_create` would halt the callback chain. After this commit, the behavior is deprecated: will still work until the next release of Rails but will also display a deprecation warning. The preferred way to halt a callback chain is to explicitly `throw(:abort)`.
* | Deprecate `false` as the way to halt AM validation callbacksclaudiob2015-01-021-0/+9
| | | | | | | | | | | | | | | | | | | | Before this commit, returning `false` in an ActiveModel validation callback such as `before_validation` would halt the callback chain. After this commit, the behavior is deprecated: will still work until the next release of Rails but will also display a deprecation warning. The preferred way to halt a callback chain is to explicitly `throw(:abort)`.
* | Start Rails 5 development :tada:Rafael Mendonça França2014-11-281-61/+1
| | | | | | | | | | | | | | We will support only Ruby >= 2.1. But right now we don't accept pull requests with syntax changes to drop support to Ruby 1.9.
* | [ci skip] ActiveModel CHANGELOG docs fixesAkshay Vishnoi2014-09-181-8/+11
| |
* | Fix typo [ci skip]Carlos Antonio da Silva2014-08-071-1/+1
| |
* | Allow password to contain spaces only.Yevhene Shemet2014-08-061-0/+6
|/
* Merge pull request #16210 from sonnym/assert_valid_keys_in_validateMatthew Draper2014-07-181-0/+6
|\ | | | | | | Check for valid options in validate method
| * check for valid options in validate methodsonnym2014-07-171-0/+6
|/ | | | | | | | | | | This change prevents a certain class of user error which results when mistakenly using the `validate` class method instead of the `validates` class method. Only apply when all arguments are symbols, because some validations use the `validate` method and pass in additional options, namely the `LenghValidator` via the `ActiveMode::Validations::validates_with` method.
* Deprecate `reset_#{attribute}` in favor of `restore_#{attribute}`.Rafael Mendonça França2014-07-151-2/+7
| | | | | | | | | These methods may cause confusion with the `reset_changes` that behaves differently of them. Also rename undo_changes to restore_changes to match this new set of methods.
* Deprecate ActiveModel::Dirty#reset_changes in favor of ↵Rafael Mendonça França2014-07-151-0/+7
| | | | | | | | | #clear_changes_information This method name is causing confusion with the `reset_#{attribute}` methods. While `reset_name` set the value of the name attribute for the previous value the `reset_changes` only discard the changes and previous changes.
* Rename rollback_changes to undo_changesRafael Mendonça França2014-06-301-1/+1
| | | | To avoid overload with database rollback
* Add CHANGELOG entry for #14861 and document private methods on the APIRafael Mendonça França2014-06-301-0/+5
|
* `only_integer` of `NumericalityValidator` now allows procs and symbolsRobin Mehner2014-06-221-0/+4
|
* Added changelog for #15708 [ci skip]Godfrey Chan2014-06-141-0/+7
|
* fix typo in changelog [ci skip]Vijay Dev2014-06-111-1/+1
|
* Merge pull request #15635 from kuldeepaggarwal/add-missing-changelogYves Senn2014-06-111-0/+6
|\ | | | | | | add missing changelog entry. refer [#16db90d] [ci skip]
| * add missing changelog entry. refer [#16db90d] [ci skip]Kuldeep Aggarwal2014-06-111-0/+4
|/
* formatting pass through CHANGELOGS. [ci skip]Yves Senn2014-05-161-1/+1
|
* Add singular and plural form for some validation messagesAbd ar-Rahman Hamidi2014-05-021-0/+4
|
* Enhance a bit a few changelog entries [ci skip]Robin Dupret2014-05-021-1/+2
|
* 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.