- 30 3月, 2015 1 次提交
-
-
由 Sean Griffin 提交于
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.
-
- 23 2月, 2015 1 次提交
-
-
由 Yves Senn 提交于
-
- 19 2月, 2015 1 次提交
-
-
由 Wojciech Wnętrzak 提交于
without replacement.
-
- 01 2月, 2015 2 次提交
-
-
由 Carlos Antonio da Silva 提交于
The new association error belongs to Active Record, not Active Model. See #18700 for reference.
-
由 Wojciech Wnętrzak 提交于
They have inconsistent behaviour currently.
-
- 31 1月, 2015 1 次提交
-
-
由 Yves Senn 提交于
-
- 28 1月, 2015 1 次提交
-
-
由 Henrik Nygren 提交于
Fixes #18696.
-
- 24 1月, 2015 3 次提交
-
-
由 Eugene Gilburg 提交于
-
由 Sean Griffin 提交于
Minor style changes across the board. Changed an alias to an explicit method declaration, since the alias will not be documented otherwise.
-
由 Bogdan Gusiev 提交于
Allows to use it for any object as an includable module.
-
- 21 1月, 2015 1 次提交
-
-
由 Wojciech Wnętrzak 提交于
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}]} ```
-
- 11 1月, 2015 1 次提交
-
-
由 mo khan 提交于
-
- 04 1月, 2015 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 03 1月, 2015 3 次提交
-
-
由 claudiob 提交于
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
-
由 claudiob 提交于
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)`.
-
由 claudiob 提交于
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)`.
-
- 29 11月, 2014 1 次提交
-
-
由 Rafael Mendonça França 提交于
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.
-
- 18 9月, 2014 1 次提交
-
-
由 Akshay Vishnoi 提交于
-
- 07 8月, 2014 2 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
由 Yevhene Shemet 提交于
-
- 03 8月, 2014 1 次提交
-
-
由 kakipo 提交于
-
- 18 7月, 2014 1 次提交
-
-
由 sonnym 提交于
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.
-
- 16 7月, 2014 2 次提交
-
-
由 Rafael Mendonça França 提交于
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.
-
由 Rafael Mendonça França 提交于
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.
-
- 01 7月, 2014 2 次提交
-
-
由 Rafael Mendonça França 提交于
To avoid overload with database rollback
-
由 Rafael Mendonça França 提交于
-
- 22 6月, 2014 1 次提交
-
-
由 Robin Mehner 提交于
-
- 14 6月, 2014 1 次提交
-
-
由 Godfrey Chan 提交于
-
- 11 6月, 2014 2 次提交
-
-
由 Vijay Dev 提交于
-
由 Kuldeep Aggarwal 提交于
-
- 16 5月, 2014 1 次提交
-
-
由 Yves Senn 提交于
-
- 03 5月, 2014 1 次提交
-
-
由 Abd ar-Rahman Hamidi 提交于
-
- 02 5月, 2014 1 次提交
-
-
由 Robin Dupret 提交于
-
- 28 3月, 2014 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 25 2月, 2014 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
Remove 4-1 related entries from master [ci skip]
-
- 04 2月, 2014 1 次提交
-
-
由 Yves Senn 提交于
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>' ```
-
- 30 1月, 2014 1 次提交
-
-
由 Yves Senn 提交于
-
- 27 1月, 2014 1 次提交
-
-
由 Vince Puzzella 提交于
Example: validates_presence_of :name, on: [:update, :custom_validation_context]
-
- 07 1月, 2014 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
Also improve changelog entries related to secure password to proper highlight.
-
- 15 12月, 2013 1 次提交
-
-
由 Tejas Dinkar 提交于
model.name_changed?(from: "Pete", to: "Ringo")
-