Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | automatically include ActiveModel::Validations when include ↵ | Aditya Kapoor | 2014-07-03 | 2 | -2/+0 |
| | | | | ActiveModel::SecurePassword | ||||
* | Fix some validators when used on model instance | Eric Hutzelman | 2014-02-26 | 1 | -1/+2 |
| | | | | | | | | Now that Validator #setup is called from the initializer, we need a reference to the model's class to be passed in to allow the validators to continue functioning when used at the instance level. Closes #14134. | ||||
* | Removed old tests | Godfrey Chan | 2014-01-24 | 1 | -11/+0 |
| | |||||
* | Rewrote the tests for has_secure_password | Godfrey Chan | 2014-01-24 | 2 | -2/+2 |
| | |||||
* | Unused classes in AMo tests | Akira Matsuda | 2013-12-19 | 1 | -11/+0 |
| | |||||
* | Let validates_inclusion_of accept Time and DateTime ranges | Akira Matsuda | 2013-10-23 | 1 | -1/+1 |
| | | | | fixes 4.0.0 regression introduced in 0317b93c17a46d7663a8c36edc26ad0ba3d75f85 | ||||
* | Convert ActiveModel to 1.9 hash syntax. | Patrick Robertson | 2013-05-01 | 3 | -6/+6 |
| | | | | | I also attempted to fix other styleguide violations such as { a: :b } over {a: :b} and foo(b: 'bar') over foo( b: 'bar' ). | ||||
* | test for ActiveModel::Conversion#to_partial_path and namespaced models | Yves Senn | 2013-01-14 | 1 | -0/+4 |
| | |||||
* | Remove observers and sweepers | Rafael Mendonça França | 2012-11-28 | 1 | -27/+0 |
| | | | | | | | | They was extracted from a plugin. See https://github.com/rails/rails-observers [Rafael Mendonça França + Steve Klabnik] | ||||
* | fix failing isolated tests | Francesco Rodriguez | 2012-10-26 | 1 | -0/+1 |
| | |||||
* | AM::Serializers::Xml depends on AM::Naming | Francesco Rodriguez | 2012-10-26 | 1 | -1/+0 |
| | |||||
* | attr_accessible and attr_protected raise an exception pointing to use plugin ↵ | Guillermo Iguaran | 2012-09-16 | 1 | -0/+3 |
| | | | | or new protection model | ||||
* | Remove MassAssignmentSecurity from ActiveModel | Guillermo Iguaran | 2012-09-16 | 4 | -88/+7 |
| | | | | This will be moved out to protected_attributes gem | ||||
* | Integrate ActiveModel::ForbiddenAttributesProtection from StrongParameters gem | Guillermo Iguaran | 2012-09-16 | 1 | -0/+7 |
| | |||||
* | has_secure_password should not raise a 'digest missing' error if the calling ↵ | Robby Grossman | 2012-07-31 | 1 | -0/+11 |
| | | | | class has specified for validations to be skipped. | ||||
* | Updated tests for has_secure_password. | Erich Menge | 2012-05-08 | 3 | -2/+11 |
| | |||||
* | Rely on a public contract between railties instead of accessing railtie ↵ | José Valim | 2011-11-23 | 1 | -6/+2 |
| | | | | methods directly. | ||||
* | Let ActiveModel instances define partial paths. | Grant Hutchins & Peter Jaros | 2011-07-25 | 1 | -0/+3 |
| | | | | | | Deprecate ActiveModel::Name#partial_path. Now you should call #to_path directly on ActiveModel instances. | ||||
* | Allow to specify mass-assignment roles as array | Alexander Uvarov | 2011-06-23 | 1 | -1/+9 |
| | |||||
* | Methods that return nil should not be considered YAML | Joshua Wehner | 2011-05-10 | 1 | -0/+4 |
| | |||||
* | Allow observers to be enabled and disabled. | Myron Marston | 2011-04-28 | 1 | -0/+27 |
| | | | | This is useful in situations like model unit tests and the occasional rake task to backfill old data. | ||||
* | AM mass assignment security attr_accessible and attr_protected now allow for ↵ | Josh Kalderimis | 2011-04-24 | 1 | -0/+11 |
| | | | | | | | | scopes using :as => scope eg. attr_accessible :name attr_accessible :name, :admin, :as => :admin | ||||
* | Revert "Properly interpolate i18n keys in modules [#5572 state:resolved]" | Santiago Pastorino | 2011-02-27 | 1 | -5/+0 |
| | | | | | | | This breaks #6448, you should use :"module/class" as key for namespacing [#6448 state:committed] This reverts commit 8d30193b08bd2321a7a78a1f481bd5e4d4d45557. | ||||
* | failing test for i18n key collision with namespaced models | Santiago Pastorino | 2011-02-27 | 1 | -0/+4 |
| | |||||
* | Override attributes_protected_by_default when has_secure_password is called. | Tsutomu Kuroda | 2011-02-09 | 2 | -0/+19 |
| | | | | | | | attr_protected should not be called, because it nullifies the mass assignment protection that has been set by attr_accessible. Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | Optionally pass in the attribute being validated to an instance method validator | Carl Lerche | 2011-02-05 | 1 | -0/+4 |
| | |||||
* | Be able to pass a validator method to #validates | Carl Lerche | 2011-02-05 | 1 | -0/+4 |
| | |||||
* | Provide a way to specify alternate option keys for validates | Carl Lerche | 2011-02-05 | 1 | -0/+4 |
| | |||||
* | Added ActiveRecord::Base#has_secure_password (via ↵ | David Heinemeier Hansson | 2010-12-18 | 1 | -0/+8 |
| | | | | ActiveModel::SecurePassword) to encapsulate dead-simple password usage with SHA2 encryption and salting | ||||
* | No need to pass self as parameter here. | José Valim | 2010-10-04 | 1 | -1/+1 |
| | |||||
* | Test to_model being called in ActiveModel::Naming helpers | Ernie Miller | 2010-10-04 | 1 | -0/+7 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Properly interpolate i18n keys in modules [#5572 state:resolved] | Rodrigo Rosenfeld Rosas | 2010-09-24 | 1 | -0/+5 |
| | |||||
* | Better shortcut options for custom validators [#5672 state:resolved] | Obie Fernandez | 2010-09-24 | 1 | -0/+13 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Prepared ActiveModel::Naming to handle cases for namespaced isolated engines | Piotr Sarnacki | 2010-09-03 | 1 | -0/+13 |
| | |||||
* | after_validation should be called irrespective of the result of validation. | Neeraj Singh | 2010-08-20 | 1 | -0/+9 |
| | | | | | | | | I confirmed that this is the behavior on 2.3.x . [5419 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 3 | -4/+3 |
| | | | | 's/[ \t]*$//' -i {} \;) | ||||
* | Reuse already existing classes for ActiveModel tests. | José Valim | 2010-07-21 | 2 | -0/+5 |
| | |||||
* | mass_assignment_security moved from AR to AMo, and minor test cleanup | Josh Kalderimis | 2010-07-08 | 1 | -0/+57 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | validation macros can now be used within an instance | Josh Kalderimis | 2010-05-13 | 1 | -0/+12 |
| | |||||
* | removed an old unused model in the AMo tests which also removes another AR ↵ | Josh Kalderimis | 2010-05-09 | 1 | -6/+0 |
| | | | | dependency | ||||
* | removed use of AR in AMo tests and removed testing of scopes (:on) in ↵ | Josh Kalderimis | 2010-05-08 | 2 | -10/+18 |
| | | | | individual validation tests and moved them to their own test file | ||||
* | test cases for record.to_xml [#458 state:resolved] | Neeraj Singh | 2010-04-30 | 1 | -0/+8 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Fix AMo isolated tests. | José Valim | 2010-02-22 | 1 | -1/+1 |
| | |||||
* | Require persisted? in ActiveModel::Lint and remove new_record? and ↵ | José Valim | 2010-02-21 | 1 | -3/+3 |
| | | | | destroyed? methods. ActionPack does not care if the resource is new or if it was destroyed, it cares only if it's persisted somewhere or not. | ||||
* | Add to_key and to_param methods to ActiveModel::Conversion. | José Valim | 2010-02-21 | 1 | -1/+7 |
| | |||||
* | Fix typo by renaming :genre to :gender. | José Valim | 2010-01-09 | 1 | -1/+1 |
| | |||||
* | Allow validates to map some types to specific options. So now you can do: | José Valim | 2010-01-08 | 1 | -1/+1 |
| | | | | | | validates :email, :presence => true, :format => /@/ validates :genre, :inclusion => %w(m f) validates :password, :length => 6..20 | ||||
* | Allow :if, :unless, :on, :allow_nil and :allow_blank as shared options in ↵ | José Valim | 2010-01-07 | 1 | -0/+4 |
| | | | | validates. | ||||
* | Add validates method as shortcut to setup validators for a given set of ↵ | jamie | 2010-01-07 | 2 | -2/+11 |
| | | | | | | | | | | | | | | | attributes: class Person < ActiveRecord::Base include MyValidators validates :name, :presence => true, :uniqueness => true, :length => { :maximum => 100 } validates :email, :presence => true, :email => true end [#3058 status:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | No need to use ValidationsRepairHelper hack on ActiveModel anymore, ↵ | José Valim | 2009-12-23 | 1 | -1/+1 |
| | | | | Model.reset_callbacks(:validate) is enough. However, tests in ActiveRecord are still coupled, so moved ValidationsRepairHelper back there. |