- 20 10月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
I think it's going to be too much pain to try to transition the :active_record load hook from executing against Base to executing against Model. For example, after Model is included in Base, and modules included in Model will no longer get added to the ancestors of Base. So plugins which wish to be compatible with both Model and Base should use the :active_record_model load hook which executes *before* Base gets loaded. In general, ActiveRecord::Model is an advanced feature at the moment and probably most people will continue to inherit from ActiveRecord::Base for the time being.
-
- 12 10月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
This reverts commit 86c3dfbd. Conflicts: activerecord/lib/active_record/attribute_methods/read.rb Reason: whilst this increased performance, it also presents a DoS risk via memory exhaustion if users were allowing user input to dictate the arguments of read/write_attribute. I will investigate alternative ways to cut down on string allocations here.
-
- 27 9月, 2012 1 次提交
-
-
由 kennyj 提交于
-
- 31 8月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
This is a performance/GC optimisation. In theory, this could be optimised by the implementation (last time I checked, this would have no effect on JRuby). But in practise, this make attribute access faster.
-
- 21 8月, 2012 1 次提交
-
-
由 kennyj 提交于
-
- 03 8月, 2012 2 次提交
-
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
- 16 6月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
Get rid of ActiveModel::Configuration, make better use of ActiveSupport::Concern + class_attribute, etc.
-
- 04 6月, 2012 1 次提交
-
-
由 kennyj 提交于
-
- 28 2月, 2012 1 次提交
-
-
由 Sergey Nartimov 提交于
-
- 10 2月, 2012 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 08 2月, 2012 3 次提交
-
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
copy the columns hash to the active record instances, typecast using columns looked up on the instance
-
- 29 12月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
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.
-
- 24 12月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 04 12月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
We also need to time zone convert time zone aware attributes when accessed via read_attribute, not only when via direct access.
-
- 02 12月, 2011 3 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
This is good because it reduces duplication.
-
由 Jon Leighton 提交于
Define singleton methods on the attributes module instead. This reduces method pollution on the actual model classes. It also seems to make something faster, I am unsure why! O_o
-
- 13 4月, 2011 1 次提交
-
-
由 Prem Sichanugrist 提交于
After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now. It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`.
-
- 12 4月, 2011 1 次提交
-
-
由 David Heinemeier Hansson 提交于
-
- 11 4月, 2011 1 次提交
-
-
由 Prem Sichanugrist 提交于
There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
-
- 24 3月, 2011 1 次提交
-
-
由 Adam Meehan 提交于
Fix before_type_cast for timezone aware attributes by caching converted value on write. Also remove read method reload arg on timezone attributes.
-
- 07 2月, 2011 1 次提交
-
-
由 Akira Matsuda 提交于
Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
-
- 01 2月, 2011 1 次提交
-
-
由 Akira Matsuda 提交于
[#3973 state:committed] Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
-
- 21 11月, 2010 1 次提交
-
-
由 Josh Kalderimis 提交于
class inheritable attributes is used no more! all internal use of class inheritable has been changed to class_attribute. class inheritable attributes has been deprecated. Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 10 9月, 2010 1 次提交
-
-
由 Jeremy Kemper 提交于
Cheaper attribute reads and respond_to?. Add underscore-prefixed method aliased to the attribute name so it can be overridden but still called internally.
-
- 14 8月, 2010 2 次提交
-
-
由 Santiago Pastorino 提交于
-
由 Santiago Pastorino 提交于
-
- 03 8月, 2010 1 次提交
-
-
由 Neeraj Singh 提交于
-
- 10 4月, 2010 1 次提交
-
-
由 Santiago Pastorino 提交于
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 22 1月, 2010 1 次提交
-
-
由 Pratik Naik 提交于
This reverts commit f936a1f1. Conflicts: activerecord/lib/active_record.rb activerecord/lib/active_record/base.rb Revert "Fixed: #without_typecast should only disable typecasting on the duplicated attributes" [#3387 state:open] This reverts commit 28319964. Reason : It's not generating attribute methods properly, making object.column 5x slower.
-
- 18 10月, 2009 1 次提交
-
-
由 Eric Chapweske 提交于
Signed-off-by: NJoshua Peek <josh@joshpeek.com>
-
- 05 8月, 2009 2 次提交
-
-
由 Joshua Peek 提交于
-
由 Paul Gillard 提交于
Modified ActiveRecord::AttributeMethods to allow classes to specify attribute method prefixes and/or suffixes. Previously only suffixes were allowed. Signed-off-by: NJoshua Peek <josh@joshpeek.com>
-
- 03 8月, 2009 1 次提交
-
-
由 Joshua Peek 提交于
-
- 31 7月, 2009 2 次提交
-
-
由 Joshua Peek 提交于
-
由 Joshua Peek 提交于
-