- 24 12月, 2011 3 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 23 12月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 14 12月, 2011 2 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 09 12月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 02 12月, 2011 9 次提交
-
-
由 Jon Leighton 提交于
This reverts commit f6b50463. Fear not, the roflscale will return when I have a bit more time and figure out a better way to do it. (In particular, a way that doesn't break the build.)
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
Don't prefix the name with attribute_. Avoids a string allocation on read_attribute, which is a bit faster.
-
由 Jon Leighton 提交于
This means we never have to rely on define_method (which is slower and uses more memory), even when we have attributes containing characters that are not allowed in standard method names. (I am mainly changing this because the duplication annoys me, though.)
-
由 Jon Leighton 提交于
-
由 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 3 次提交
-
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-