aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model.rb
Commit message (Collapse)AuthorAgeFilesLines
* Bump license years for 2018Yoshiyuki Hirano2017-12-311-1/+1
|
* Add missing autoload `Type` (#31123)Ryuta Kamizono2017-11-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Attribute modules (`Attribute`, `Attributes`, `AttributeSet`) uses `Type`, but referencing `Type` before the modules still fail. ``` % ./bin/test -w test/cases/attribute_test.rb -n test_with_value_from_user_validates_the_value Run options: -n test_with_value_from_user_validates_the_value --seed 31876 E Error: ActiveModel::AttributeTest#test_with_value_from_user_validates_the_value: NameError: uninitialized constant ActiveModel::AttributeTest::Type /Users/kamipo/src/github.com/rails/rails/activemodel/test/cases/attribute_test.rb:233:in `block in <class:AttributeTest>' bin/test test/cases/attribute_test.rb:232 Finished in 0.002985s, 335.0479 runs/s, 335.0479 assertions/s. 1 runs, 1 assertions, 0 failures, 1 errors, 0 skips ``` Probably we need more autoloading at least `Type`.
* Move Attribute and AttributeSet to ActiveModelLisa Ugray2017-11-091-0/+2
| | | | | Use these to back the attributes API. Stop automatically including ActiveModel::Dirty in ActiveModel::Attributes, and make it optional.
* [Active Model] require => require_relativeAkira Matsuda2017-10-211-1/+1
| | | | This basically reverts ee5cfc01a5797f854c8441539b0cae326a81b963
* Use frozen string literal in activemodel/Kir Shatrov2017-07-161-0/+2
|
* [Active Model] require => require_relativeAkira Matsuda2017-07-011-1/+1
|
* Define path with __dir__bogdanvlviv2017-05-231-1/+1
| | | | | | ".. with __dir__ we can restore order in the Universe." - by @fxn Related to 5b8738c2df003a96f0e490c43559747618d10f5f
* Remove `ActiveModel::TestCase` from libyuuji.yaginuma2017-02-071-1/+0
| | | | | | `ActiveModel::TestCase` is used only for the test of Active Model. Also, it is a private API and can not be used in applications. Therefore, it is not necessary to include it in lib.
* [ci skip] Update Active Model copyright years.Kasper Timm Hansen2016-12-311-1/+1
| | | | | | Missed in 37d956f. Fixes #27524. [ MSathieu & Kasper Timm Hansen ]
* applies new string literal convention in activemodel/libXavier Noria2016-08-061-10/+10
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Change RangeError to a more specific ActiveModel::RangeErrorChristian Blais2016-05-031-0/+1
| | | | | | The should make it easier for apps to rescue ActiveModel specific errors without the need to wrap all method calls with a generic rescue RangeError.
* Update copyright notices to 2016 [ci skip]Rashmi Yadav2015-12-311-1/+1
|
* Remove XML Serialization from core.Zachary Scott2015-08-071-1/+0
| | | | | | | This includes the following classes: - ActiveModel::Serializers::Xml - ActiveRecord::Serialization::XmlSerializer
* Follow-up to #10776Robin Dupret2015-02-261-0/+1
| | | | | | | | | | The name `ActiveModel::AttributeAssignment::UnknownAttributeError` is too implementation specific so let's move the constant directly under the ActiveModel namespace. Also since this constant used to be under the ActiveRecord namespace, to make the upgrade path easier, let's avoid raising the former constant when we deal with this error on the Active Record side.
* Extracted `ActiveRecord::AttributeAssignment` to ↵Bogdan Gusiev2015-01-231-0/+1
| | | | | | `ActiveModel::AttributesAssignment` Allows to use it for any object as an includable module.
* Update copyright notices to 2015 [ci skip]Arun Agrawal2014-12-311-1/+1
|
* Autoload ActiveModel::StrictValidationFailedhakanensari2014-04-161-0/+1
| | | | | | Currently, if environment doesn’t eager load code, invoking this constant before calling #valid? on a model instance results in a NameError.
* Fix eager load of Serializers on Active ModelCarlos Antonio da Silva2014-01-171-2/+2
|
* update copyright notices to 2014. [ci skip]Vipul A M2014-01-011-1/+1
|
* Remove deprecated attr_protected/accessibleŁukasz Strzałkowski2013-06-271-1/+0
| | | | Rails 4.0 has removed attr_protected and attr_accessible feature in favor of Strong Parameters.
* Updated copyright notices for 2013Andrew Nesbitt2012-12-311-1/+1
|
* Remove observers and sweepersRafael Mendonça França2012-11-281-2/+0
| | | | | | | | They was extracted from a plugin. See https://github.com/rails/rails-observers [Rafael Mendonça França + Steve Klabnik]
* attr_accessible and attr_protected raise an exception pointing to use plugin ↵Guillermo Iguaran2012-09-161-0/+1
| | | | or new protection model
* Remove MassAssignmentSecurity from ActiveModelGuillermo Iguaran2012-09-161-1/+0
| | | | This will be moved out to protected_attributes gem
* Integrate ActiveModel::ForbiddenAttributesProtection from StrongParameters gemGuillermo Iguaran2012-09-161-0/+1
|
* Get rid of config.preload_frameworks in favor of config.eager_load_namespacesJosé Valim2012-08-211-3/+13
| | | | | | | The new option allows any Ruby namespace to be registered and set up for eager load. We are effectively exposing the structure existing in Rails since v3.0 for all developers in order to make their applications thread-safe and CoW friendly.
* defines a private require-hub active_support/railsXavier Noria2012-08-021-0/+1
| | | | | | | | This is a private place to put those AS features that are used by every component. Nowadays we cherry-pick individual files wherever they are used, but that it is not worth the effort for stuff that is going to be loaded for sure sooner or later, like blank?, autoload, concern, etc.
* Simplify AR configuration code.Jon Leighton2012-06-151-1/+0
| | | | | Get rid of ActiveModel::Configuration, make better use of ActiveSupport::Concern + class_attribute, etc.
* Fix the buildSantiago Pastorino2012-05-221-1/+0
|
* require active_support/lazy_load_hooks where is neededSantiago Pastorino2012-05-221-0/+1
|
* Remove useless load path modificationsSantiago Pastorino2012-05-111-2/+0
|
* Lazy load I18nSantiago Pastorino2012-05-111-2/+3
|
* Add ActiveModel::Model, a mixin to make Ruby objects to work with AP inmediatlyGuillermo Iguaran2012-03-021-0/+1
|
* Merge pull request #4248 from andrew/2012Vijay Dev2011-12-311-1/+1
|\ | | | | Updated copyright notices for 2012
| * Updated copyright notices for 2012Andrew Nesbitt2011-12-311-1/+1
| |
* | Support configuration on ActiveRecord::Model.Jon Leighton2011-12-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem: We need to be able to specify configuration in a way that can be inherited to models that include ActiveRecord::Model. So it is no longer sufficient to put 'top level' config on ActiveRecord::Base, but we do want configuration specified on ActiveRecord::Base and descendants to continue to work. So we need something like class_attribute that can be defined on a module but that is inherited when ActiveRecord::Model is included. The solution: added ActiveModel::Configuration module which provides a config_attribute macro. It's a bit specific hence I am not putting this in Active Support or making it a 'public API' at present.
* | Revert "Implement ArraySerializer and move old serialization API to a new ↵José Valim2011-11-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | namespace." This reverts commit 8896b4fdc8a543157cdf4dfc378607ebf6c10ab0. Conflicts: activemodel/lib/active_model.rb activemodel/lib/active_model/serializable.rb activemodel/lib/active_model/serializer.rb activemodel/test/cases/serializer_test.rb
* | Revert the serializers API as other alternatives are now also under discussionJosé Valim2011-11-251-2/+0
| |
* | Implement ArraySerializer and move old serialization API to a new namespace.José Valim2011-11-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The following constants were renamed: ActiveModel::Serialization => ActiveModel::Serializable ActiveModel::Serializers::JSON => ActiveModel::Serializable::JSON ActiveModel::Serializers::Xml => ActiveModel::Serializable::XML The main motivation for such a change is that `ActiveModel::Serializers::JSON` was not actually a serializer, but a module that when included allows the target to be serializable to JSON. With such changes, we were able to clean up the namespace to add true serializers as the ArraySerializer.
* | Initial implementation of ActiveModel::SerializerJose and Yehuda2011-10-151-0/+1
|/
* We're in 2011, let's update our licensePrem Sichanugrist2011-02-221-1/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Added ActiveRecord::Base#has_secure_password (via ↵David Heinemeier Hansson2010-12-181-0/+1
| | | | ActiveModel::SecurePassword) to encapsulate dead-simple password usage with SHA2 encryption and salting
* Always pull in version for frameworks (standardize autoload / require / none)wycats2010-10-101-2/+1
|
* Remove deprecations in ActiveModel.José Valim2010-08-291-1/+0
|
* mass_assignment_security moved from AR to AMo, and minor test cleanupJosh Kalderimis2010-07-081-0/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Updating copyright dates on all licensesMikel Lindsaar2010-02-011-1/+1
|
* Axe AM state machineJoshua Peek2010-01-301-1/+0
| | | | We're going do it eventually, get it done before 3.0 is final.
* Autoload AMo test caseJoshua Peek2010-01-041-3/+4
|
* Move ActiveRecord callbacks implementation to ActiveModel and make use of it.José Valim2009-12-281-0/+1
| | | | Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
* Merge commit 'josevalim/validations'Jeremy Kemper2009-12-281-3/+4
|\