Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-06-22 | 1 | -35/+92 |
|\ | |||||
| * | fixes a few mistakes in api docs [ci skip] | Vijay Dev | 2012-06-22 | 1 | -1/+1 |
| | | |||||
| * | add description to ActiveModel::MissingAttributeError [ci skip] | Francesco Rodriguez | 2012-06-21 | 1 | -1/+2 |
| | | |||||
| * | add example to ActiveModel::AttributeMethods#undefine_attribute_methods [ci ↵ | Francesco Rodriguez | 2012-06-21 | 1 | -0/+26 |
| | | | | | | | | skip] | ||||
| * | add docs to AM::AttributeMethods#define_attribute_method [ci skip] | Francesco Rodriguez | 2012-06-21 | 1 | -0/+25 |
| | | |||||
| * | fix ActiveModel::AttributeMethods#alias_attribute documentation [ci skip] | Francesco Rodriguez | 2012-06-21 | 1 | -7/+20 |
| | | |||||
| * | update ActiveModel::AttributeMethods documentation [ci skip] | Francesco Rodriguez | 2012-06-21 | 1 | -27/+20 |
| | | |||||
| * | add example to ActiveModel::Validations#validators [ci skip] | Francesco Rodriguez | 2012-06-15 | 1 | -1/+0 |
| | | |||||
* | | Merge pull request #6800 from mschneider/dynamic_finders_for_aliased_attributes | Rafael Mendonça França | 2012-06-22 | 1 | -1/+3 |
|\ \ | | | | | | | Dynamic finders for aliased attributes | ||||
| * | | made dynamic finders alias_attribute aware | Maximilian Schneider | 2012-06-22 | 1 | -1/+3 |
| | | | | | | | | | | | | | | | previously dynamic finders only worked in combination with the actual column name and not its alias defined with #alias_attribute | ||||
* | | | add :nodoc: to AM::AttributeMethods#instance_method_already_implemented? [ci ↵ | Francesco Rodriguez | 2012-06-21 | 1 | -1/+1 |
| | | | | | | | | | | | | skip] | ||||
* | | | add :nodoc: to AM::AttributeMethods::AttributeMethodMatcher [ci skip] | Francesco Rodriguez | 2012-06-21 | 1 | -1/+1 |
|/ / | |||||
* / | Simplify AR configuration code. | Jon Leighton | 2012-06-15 | 1 | -2/+1 |
|/ | | | | | Get rid of ActiveModel::Configuration, make better use of ActiveSupport::Concern + class_attribute, etc. | ||||
* | Merge pull request #4785 from ↵ | José Valim | 2012-05-25 | 1 | -4/+4 |
|\ | | | | | | | | | ayamomiji/add-self-to-allow-method-name-using-ruby-keyword add `self.` to allow method name using ruby keyword | ||||
| * | fix `alias_attribute` will raise a syntax error if make an alias on a | ayaya | 2012-05-14 | 1 | -4/+4 |
| | | | | | | | | column that named as a ruby keyword | ||||
* | | Revert "Merge pull request #5702 from oscardelben/patch-4" | Piotr Sarnacki | 2012-05-20 | 1 | -1/+3 |
| | | | | | | | | | | | | | | This reverts commit cae1ca7d1be9c79c7ef012a1f62aef9d3bb815f8, reversing changes made to da97cf016a8ffd1f54f804cd881f393e5d6efc18. These changes break the build, it needs more investigation. | ||||
* | | Call undefine_attribute_methods only when defining new attributes | Oscar Del Ben | 2012-05-18 | 1 | -3/+1 |
| | | |||||
* | | allow define_attribute_methods to pass multiple values | Francesco Rodriguez | 2012-05-14 | 1 | -7/+7 |
| | | |||||
* | | Merge pull request #5729 from oscardelben/use_tap | José Valim | 2012-05-13 | 1 | -5/+1 |
|\ \ | | | | | | | Use the more idiomatic tap method | ||||
| * | | Use the more idiomatic tap method | Oscar Del Ben | 2012-04-04 | 1 | -5/+1 |
| |/ | |||||
* | | simplify the alias_attribute example [ci skip] | Vijay Dev | 2012-05-08 | 1 | -20/+1 |
| | | |||||
* | | added docs to alias_attribute method | Francesco Rodriguez | 2012-05-07 | 1 | -0/+31 |
|/ | |||||
* | ruby 2.0 makes protected methods return false for respond_to, so pass true ↵ | Aaron Patterson | 2012-02-21 | 1 | -1/+1 |
| | | | | as the second param | ||||
* | remove unused captures | Aaron Patterson | 2012-01-19 | 1 | -2/+2 |
| | |||||
* | Fix stack level too deep when model does not have attributes method. | Piotr Sarnacki | 2012-01-15 | 1 | -1/+1 |
| | | | | | | | | | | | 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`. | ||||
* | Support configuration on ActiveRecord::Model. | Jon Leighton | 2011-12-28 | 1 | -1/+2 |
| | | | | | | | | | | | | | | | 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. | ||||
* | remove deprecated define_attr_method from ActiveModel::AttributeMethods | Sergey Nartimov | 2011-12-24 | 1 | -41/+0 |
| | |||||
* | Deprecated `define_attr_method` in `ActiveModel::AttributeMethods` | Jon Leighton | 2011-11-29 | 1 | -37/+20 |
| | | | | | This only existed to support methods like `set_table_name` in Active Record, which are themselves being deprecated. | ||||
* | Speed up attribute invocation by checking if both name and calls are compilable. | José Valim | 2011-11-14 | 1 | -27/+32 |
| | |||||
* | Class name specified in example is Person, not AttributePerson. | Uģis Ozols | 2011-09-29 | 1 | -3/+3 |
| | |||||
* | Generate attribute method unless it's already in the module. | Jon Leighton | 2011-09-14 | 1 | -1/+1 |
| | | | | | | | 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 | -8/+11 |
| | | | | This can be overloaded by implementors if necessary. | ||||
* | Avoid double super call in some cases. | Jon Leighton | 2011-09-13 | 1 | -5/+4 |
| | | | | | If super was false earlier, it is still going to be false, so we don't need to call it again at the end of the method. | ||||
* | Let Ruby deal with method visibility. | Jon Leighton | 2011-09-13 | 1 | -13/+11 |
| | | | | | | 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 | -0/+11 |
| | |||||
* | refactoring | Jon Leighton | 2011-09-13 | 1 | -19/+11 |
| | |||||
* | Use an empty AttributeMethodMatcher by default. | Jon Leighton | 2011-09-13 | 1 | -2/+9 |
| | | | | | | 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 ''`. | ||||
* | Made attribute_method_matchers_cache private + doc | Lawrence Pit | 2011-07-17 | 1 | -3/+13 |
| | |||||
* | Issue #2075 Optimization of ActiveModel's match_attribute_method? | Lawrence Pit | 2011-07-16 | 1 | -9/+17 |
| | |||||
* | Optimization of ActiveModel's match_attribute_method? | Lawrence Pit | 2011-07-15 | 1 | -2/+5 |
| | |||||
* | let this regexp be stricter | Xavier Noria | 2011-04-19 | 1 | -1/+1 |
| | | | | | | | | | The purpose of this regexp is to detect strings that are valid identifiers to be used as method names. The anchor $ allows a trailing newline, and both ^ and $ may be bypassed because Ruby regexps are multiline always. The anchors \A and \z are the proper ones to ensure string boundaries. | ||||
* | Let's not dup because value may not always be duplicable. | José Valim | 2011-04-19 | 1 | -1/+1 |
| | |||||
* | Avoid define_method if possible. | José Valim | 2011-04-19 | 1 | -12/+39 |
| | |||||
* | use class_eval with a string when it's possible | Santiago Pastorino | 2011-03-22 | 1 | -2/+8 |
| | |||||
* | Do not in place modify what table_name returns | Santiago Pastorino | 2011-03-22 | 1 | -1/+1 |
| | |||||
* | define_attr_method should be able to define methods that returns nil | Santiago Pastorino | 2011-03-17 | 1 | -2/+2 |
| | |||||
* | remove misleading comment | Aaron Patterson | 2011-03-17 | 1 | -2/+0 |
| | |||||
* | dup strings on return so that in place modifications do not break anything. ↵ | Aaron Patterson | 2011-03-17 | 1 | -1/+1 |
| | | | | I am looking at you "compute_table_name" | ||||
* | define_attr_method correctly defines methods with invalid identifiers | Santiago Pastorino | 2011-03-16 | 1 | -3/+2 |
| | |||||
* | Move ActiveModel::AttributeMethods#attribute_methods_generated? to ↵ | Alexander Uvarov | 2011-03-01 | 1 | -25/+19 |
| | | | | | | | | ActiveRecord, so it's flexible now [#6428 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> |