- 02 12月, 2011 4 次提交
-
-
由 Jon Leighton 提交于
Also make it actually work. It slows down all read_attribute accesses to map 'id' to whatever the PK actually is, inside read_attribute. So instead make sure the necessary methods are defined and that they redirect wherever they need to go.
-
由 Jon Leighton 提交于
This is good because it reduces duplication.
-
由 Jon Leighton 提交于
This makes me happy!
-
由 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
-
- 01 12月, 2011 5 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 15 11月, 2011 1 次提交
-
-
由 José Valim 提交于
-
- 06 10月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
This reverts commit ee2be435.
-
- 05 10月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
If we don't have a primary key when we ask for it, it's better to fail fast. Fixes GH #2307.
-
- 13 9月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 01 7月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 24 5月, 2011 1 次提交
-
-
由 Sebastian Martinez 提交于
-
- 19 4月, 2011 1 次提交
-
-
由 José Valim 提交于
-
- 15 4月, 2011 3 次提交
-
-
由 Jon Leighton 提交于
Return nil from read_attribute(:foo) if 'foo' is not present in the @attributes hash, but the _foo method has been defined. This brings the behaviour into line with the 3-0-stable branch and the master branch before 93641ed6 (there were previously no assertions about this which is why the change slipped through). Note that actually calling the 'foo' method will still raise an error if the attribute is not present.
-
由 Jon Leighton 提交于
Undo performances regressions I introduced in bbe0a507 and add test for an edge case. Add comments to explain the intent of the code.
-
由 Jon Leighton 提交于
Remove unnecessary code from define_read_method and add assertion to make sure the underscored version is actually generated
-
- 14 4月, 2011 1 次提交
-
-
由 Stian Grytøyr 提交于
-
- 23 3月, 2011 2 次提交
-
-
由 Santiago Pastorino 提交于
-
由 Santiago Pastorino 提交于
-
- 02 2月, 2011 2 次提交
-
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
- 29 1月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 08 1月, 2011 4 次提交
-
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
- 09 12月, 2010 1 次提交
-
-
由 Aditya Sanghi 提交于
-
- 17 10月, 2010 2 次提交
-
-
由 Santiago Pastorino 提交于
-
由 Neeraj Singh 提交于
Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
-
- 10 9月, 2010 2 次提交
-
-
由 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.
-
由 Jeremy Kemper 提交于
-
- 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>
-
- 08 8月, 2009 1 次提交
-
-
由 Jeremy Kemper 提交于
-
- 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 提交于
-