| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Currently, if environment doesn’t eager load code, invoking this
constant before calling #valid? on a model instance results in a
NameError.
|
| |
|
| |
|
|
|
|
| |
Rails 4.0 has removed attr_protected and attr_accessible feature in favor of Strong Parameters.
|
| |
|
|
|
|
|
|
|
|
| |
They was extracted from a plugin.
See https://github.com/rails/rails-observers
[Rafael Mendonça França + Steve Klabnik]
|
|
|
|
| |
or new protection model
|
|
|
|
| |
This will be moved out to protected_attributes gem
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Get rid of ActiveModel::Configuration, make better use of
ActiveSupport::Concern + class_attribute, etc.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Updated copyright notices for 2012
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
|
|
|
| |
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|
|
|
| |
ActiveModel::SecurePassword) to encapsulate dead-simple password usage with SHA2 encryption and salting
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
|
|
|
|
| |
We're going do it eventually, get it done before 3.0 is final.
|
| |
|
|
|
|
| |
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
|
|\ |
|
| |
| |
| |
| | |
Model.reset_callbacks(:validate) is enough. However, tests in ActiveRecord are still coupled, so moved ValidationsRepairHelper back there.
|
| | |
|
| |
| |
| |
| | |
are still in the class method.
|
|/ |
|
|
|
|
| |
adding any to the load path more than once.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* A new module (ActiveSupport::Autoload) is provide that extends
autoloading with new behavior.
* All autoloads in modules that have extended ActiveSupport::Autoload
will be eagerly required in threadsafe environments
* Autoloads can optionally leave off the path if the path is the same
as full_constant_name.underscore
* It is possible to specify that a group of autoloads live under an
additional path. For instance, all of ActionDispatch's middlewares
are ActionDispatch::MiddlewareName, but they live under
"action_dispatch/middlewares/middleware_name"
* It is possible to specify that a group of autoloads are all found
at the same path. For instance, a number of exceptions might all
be declared there.
* One consequence of this is that testing-related constants are not
autoloaded. To get the testing helpers for a given component,
require "component_name/test_case". For instance, "action_controller/test_case".
* test_help.rb, which is automatically required by a Rails application's
test helper, requires the test_case.rb for all active components, so
this change will not be disruptive in existing or new applications.
|
|
|
|
|
|
| |
deprecated error messages and add i18n_scope and lookup_ancestors.
Signed-off-by: Carl Lerche <carllerche@mac.com>
|
| |
|
| |
|
|
|
|
| |
actual serializer
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- Define to_model on AR
- Define to_model on ActiveModel::APICompliant
- Update test fixtures to be API Compliant
- Start using to_model in AP
|