Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | 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. | ||||
* | Small clean up in Naming and TTranslation tests. | José Valim | 2009-12-23 | 2 | -0/+8 |
| | |||||
* | Changed ActiveRecord to use new callbacks and speed up observers by only ↵ | José Valim | 2009-09-08 | 1 | -3/+3 |
| | | | | | | notifying events that are actually being consumed. Signed-off-by: Joshua Peek <josh@joshpeek.com> | ||||
* | Allow validations to use values from custom readers [#2936 state:resolved] | James Hill | 2009-08-05 | 1 | -0/+17 |
| | | | | Signed-off-by: Joshua Peek <josh@joshpeek.com> | ||||
* | Dasherize XML root by default to avoid invalid tags ↵ | Joshua Peek | 2009-07-22 | 1 | -0/+4 |
| | | | | "<admin/posts>...</admin/posts>" [#2875 state:resolved] | ||||
* | Initial extraction of AMo xml serializer | Joshua Peek | 2009-07-03 | 1 | -0/+3 |
| | |||||
* | Deprecate Model#validate/validate_on_create/validate_on_update. Use ↵ | Pratik Naik | 2009-03-21 | 1 | -3/+7 |
| | | | | Model.validate :method and likewise | ||||
* | Add ActiveModel::Validations tests for regular ruby classes | Pratik Naik | 2009-03-20 | 2 | -1/+3 |
| | |||||
* | Add I18n translations to ActiveModel and move more AR specific parts to ↵ | Pratik Naik | 2009-03-20 | 1 | -0/+5 |
| | | | | ActiveRecord::Validations | ||||
* | Move relevant validation tests from Active Record to Active Model | Pratik Naik | 2009-03-20 | 3 | -0/+43 |