aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/models
Commit message (Collapse)AuthorAgeFilesLines
* Move model definition to test/models for test order indenendencyAkira Matsuda2014-08-281-0/+15
|
* Merge pull request #15959 from aditya-kapoor/remove-unneeded-casesRafael Mendonça França2014-07-291-13/+0
|\ | | | | remove unneeded test model for ActiveModel test cases.
| * remove unneeded test model for ActiveModel test cases.Aditya Kapoor2014-06-281-13/+0
| |
* | automatically include ActiveModel::Validations when include ↵Aditya Kapoor2014-07-032-2/+0
|/ | | | ActiveModel::SecurePassword
* Fix some validators when used on model instanceEric Hutzelman2014-02-261-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 testsGodfrey Chan2014-01-241-11/+0
|
* Rewrote the tests for has_secure_passwordGodfrey Chan2014-01-242-2/+2
|
* Unused classes in AMo testsAkira Matsuda2013-12-191-11/+0
|
* Let validates_inclusion_of accept Time and DateTime rangesAkira Matsuda2013-10-231-1/+1
| | | | fixes 4.0.0 regression introduced in 0317b93c17a46d7663a8c36edc26ad0ba3d75f85
* Convert ActiveModel to 1.9 hash syntax.Patrick Robertson2013-05-013-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 modelsYves Senn2013-01-141-0/+4
|
* Remove observers and sweepersRafael Mendonça França2012-11-281-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 testsFrancesco Rodriguez2012-10-261-0/+1
|
* AM::Serializers::Xml depends on AM::NamingFrancesco Rodriguez2012-10-261-1/+0
|
* attr_accessible and attr_protected raise an exception pointing to use plugin ↵Guillermo Iguaran2012-09-161-0/+3
| | | | or new protection model
* Remove MassAssignmentSecurity from ActiveModelGuillermo Iguaran2012-09-164-88/+7
| | | | This will be moved out to protected_attributes gem
* Integrate ActiveModel::ForbiddenAttributesProtection from StrongParameters gemGuillermo Iguaran2012-09-161-0/+7
|
* has_secure_password should not raise a 'digest missing' error if the calling ↵Robby Grossman2012-07-311-0/+11
| | | | class has specified for validations to be skipped.
* Updated tests for has_secure_password.Erich Menge2012-05-083-2/+11
|
* Rely on a public contract between railties instead of accessing railtie ↵José Valim2011-11-231-6/+2
| | | | methods directly.
* Let ActiveModel instances define partial paths.Grant Hutchins & Peter Jaros2011-07-251-0/+3
| | | | | | Deprecate ActiveModel::Name#partial_path. Now you should call #to_path directly on ActiveModel instances.
* Allow to specify mass-assignment roles as arrayAlexander Uvarov2011-06-231-1/+9
|
* Methods that return nil should not be considered YAMLJoshua Wehner2011-05-101-0/+4
|
* Allow observers to be enabled and disabled.Myron Marston2011-04-281-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 Kalderimis2011-04-241-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 Pastorino2011-02-271-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 modelsSantiago Pastorino2011-02-271-0/+4
|
* Override attributes_protected_by_default when has_secure_password is called.Tsutomu Kuroda2011-02-092-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 validatorCarl Lerche2011-02-051-0/+4
|
* Be able to pass a validator method to #validatesCarl Lerche2011-02-051-0/+4
|
* Provide a way to specify alternate option keys for validatesCarl Lerche2011-02-051-0/+4
|
* Added ActiveRecord::Base#has_secure_password (via ↵David Heinemeier Hansson2010-12-181-0/+8
| | | | ActiveModel::SecurePassword) to encapsulate dead-simple password usage with SHA2 encryption and salting
* No need to pass self as parameter here.José Valim2010-10-041-1/+1
|
* Test to_model being called in ActiveModel::Naming helpersErnie Miller2010-10-041-0/+7
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Properly interpolate i18n keys in modules [#5572 state:resolved]Rodrigo Rosenfeld Rosas2010-09-241-0/+5
|
* Better shortcut options for custom validators [#5672 state:resolved]Obie Fernandez2010-09-241-0/+13
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Prepared ActiveModel::Naming to handle cases for namespaced isolated enginesPiotr Sarnacki2010-09-031-0/+13
|
* after_validation should be called irrespective of the result of validation.Neeraj Singh2010-08-201-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 Pastorino2010-08-143-4/+3
| | | | 's/[ \t]*$//' -i {} \;)
* Reuse already existing classes for ActiveModel tests.José Valim2010-07-212-0/+5
|
* mass_assignment_security moved from AR to AMo, and minor test cleanupJosh Kalderimis2010-07-081-0/+57
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* validation macros can now be used within an instanceJosh Kalderimis2010-05-131-0/+12
|
* removed an old unused model in the AMo tests which also removes another AR ↵Josh Kalderimis2010-05-091-6/+0
| | | | dependency
* removed use of AR in AMo tests and removed testing of scopes (:on) in ↵Josh Kalderimis2010-05-082-10/+18
| | | | individual validation tests and moved them to their own test file
* test cases for record.to_xml [#458 state:resolved]Neeraj Singh2010-04-301-0/+8
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix AMo isolated tests.José Valim2010-02-221-1/+1
|
* Require persisted? in ActiveModel::Lint and remove new_record? and ↵José Valim2010-02-211-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é Valim2010-02-211-1/+7
|
* Fix typo by renaming :genre to :gender.José Valim2010-01-091-1/+1
|
* Allow validates to map some types to specific options. So now you can do:José Valim2010-01-081-1/+1
| | | | | | validates :email, :presence => true, :format => /@/ validates :genre, :inclusion => %w(m f) validates :password, :length => 6..20