Santiago Pastorino
da6c7bd4b4
Do not in place modify what table_name returns
2011-03-22 19:36:16 -03:00
Santiago Pastorino
445241d713
define_attr_method should be able to define methods that returns nil
2011-03-17 23:17:20 -03:00
Aaron Patterson
00f0879367
dup strings on return so that in place modifications do not break anything. I am looking at you "compute_table_name"
2011-03-17 10:26:11 -07:00
Santiago Pastorino
c834a751d2
define_attr_method correctly defines methods with invalid identifiers
2011-03-16 21:20:44 -03:00
Santiago Pastorino
fda45f4fc4
Add a define_attr_method test
2011-03-16 21:08:02 -03:00
Santiago Pastorino
5232077517
Add test for define_attr_method using as name an invalid identifier
2011-03-16 21:01:49 -03:00
Santiago Pastorino
cb44e99de4
Add test for define_attribute_method using as name an invalid identifier
2011-03-16 21:01:04 -03:00
Alexander Uvarov
24faddd60c
Move ActiveModel::AttributeMethods#attribute_methods_generated? to ActiveRecord, so it's flexible now
...
[#6428 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2011-03-01 20:22:45 +01:00
Caleb Land
bca070ef2d
allow spaces and other characters in attribute names [ #4725 state:resolved]
...
* define the dynamically defined methods with
'define_method' instead of def
* wrap some string injected method names in quotes
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-03 19:05:17 -02:00
Santiago Pastorino
b451de0d6d
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
2010-08-14 04:12:33 -03:00
Neeraj Singh
b462952886
Use better assertion methods for testing
...
[#4645 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-19 10:18:36 +02:00
Sam Pohlenz
4df96338ed
Fixed behavior of attribute_methods_generated? [ #3220 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-10-07 09:07:39 -05:00
Sam Pohlenz
f8e91bda9c
Don't share attribute matchers between classes [ #3216 state:resolved]
...
Allows separate models that include ActiveModel::AttributeMethods to
use different sets of attribute matchers.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-10-07 09:07:39 -05:00