Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix test class name that should read Without | Carlos Antonio da Silva | 2012-01-16 | 1 | -2/+2 |
| | |||||
* | Fix stack level too deep when model does not have attributes method. | Piotr Sarnacki | 2012-01-15 | 1 | -0/+8 |
| | | | | | | | | | | | Without that patch when using ActiveModel::AttributeMethods in a class that does not respond to `attributes` method, stack level too deep error will be raised on non existing method. While documentation is clear that you need to define `attributes` method in order to use AttributeMethods module, `stack level too deep` is rather obscure and hard to debug, therefore we should try to not break `method_missing` if someone forgets about defining `attributes`. | ||||
* | remove deprecated define_attr_method from ActiveModel::AttributeMethods | Sergey Nartimov | 2011-12-24 | 1 | -31/+0 |
| | |||||
* | Deprecated `define_attr_method` in `ActiveModel::AttributeMethods` | Jon Leighton | 2011-11-29 | 1 | -5/+18 |
| | | | | | This only existed to support methods like `set_table_name` in Active Record, which are themselves being deprecated. | ||||
* | Generate attribute method unless it's already in the module. | Jon Leighton | 2011-09-14 | 1 | -0/+23 |
| | | | | | | | There's no harm in generating a method name that's already defined on the host class, since we're generating the attribute methods in a module that gets included. In fact, this is desirable as it allows the host class to call super. | ||||
* | Add an attribute_missing method to ActiveModel::AttributeMethods. | Jon Leighton | 2011-09-13 | 1 | -0/+15 |
| | | | | This can be overloaded by implementors if necessary. | ||||
* | Let Ruby deal with method visibility. | Jon Leighton | 2011-09-13 | 1 | -0/+36 |
| | | | | | | Check respond_to_without_attributes? in method_missing. If there is any method that responds (even private), let super handle it and raise NoMethodError if necessary. | ||||
* | Add deprecation for doing `attribute_method_suffix ''` | Jon Leighton | 2011-09-13 | 1 | -6/+11 |
| | |||||
* | Use an empty AttributeMethodMatcher by default. | Jon Leighton | 2011-09-13 | 1 | -0/+17 |
| | | | | | | This means that attribute methods which don't exist will get generated when define_attribute_methods is called, so we don't have to use hacks like `attribute_method_suffix ''`. | ||||
* | removed duplicate code | ganesh | 2011-06-11 | 1 | -1/+0 |
| | |||||
* | Do not in place modify what table_name returns | Santiago Pastorino | 2011-03-22 | 1 | -11/+0 |
| | |||||
* | define_attr_method should be able to define methods that returns nil | Santiago Pastorino | 2011-03-17 | 1 | -0/+2 |
| | |||||
* | dup strings on return so that in place modifications do not break anything. ↵ | Aaron Patterson | 2011-03-17 | 1 | -0/+11 |
| | | | | I am looking at you "compute_table_name" | ||||
* | define_attr_method correctly defines methods with invalid identifiers | Santiago Pastorino | 2011-03-16 | 1 | -2/+4 |
| | |||||
* | Add a define_attr_method test | Santiago Pastorino | 2011-03-16 | 1 | -0/+13 |
| | |||||
* | Add test for define_attr_method using as name an invalid identifier | Santiago Pastorino | 2011-03-16 | 1 | -0/+13 |
| | |||||
* | Add test for define_attribute_method using as name an invalid identifier | Santiago Pastorino | 2011-03-16 | 1 | -3/+26 |
| | |||||
* | Move ActiveModel::AttributeMethods#attribute_methods_generated? to ↵ | Alexander Uvarov | 2011-03-01 | 1 | -3/+7 |
| | | | | | | | | ActiveRecord, so it's flexible now [#6428 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | allow spaces and other characters in attribute names [#4725 state:resolved] | Caleb Land | 2011-02-03 | 1 | -0/+30 |
| | | | | | | | | * 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> | ||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 1 | -2/+2 |
| | | | | 's/[ \t]*$//' -i {} \;) | ||||
* | Use better assertion methods for testing | Neeraj Singh | 2010-05-19 | 1 | -1/+1 |
| | | | | | | [#4645 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Fixed behavior of attribute_methods_generated? [#3220 state:resolved] | Sam Pohlenz | 2009-10-07 | 1 | -0/+26 |
| | | | | Signed-off-by: Joshua Peek <josh@joshpeek.com> | ||||
* | Don't share attribute matchers between classes [#3216 state:resolved] | Sam Pohlenz | 2009-10-07 | 1 | -0/+20 |
Allows separate models that include ActiveModel::AttributeMethods to use different sets of attribute matchers. Signed-off-by: Joshua Peek <josh@joshpeek.com> |