Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Remove unused method_name from AttributeMethodMatch | Chris Salzberg | 2019-04-12 | 1 | -1/+0 |
| | |||||
* | Enable `Style/RedundantBegin` cop to avoid newly adding redundant begin block | Ryuta Kamizono | 2018-12-21 | 1 | -52/+38 |
| | | | | | | | | | | Currently we sometimes find a redundant begin block in code review (e.g. https://github.com/rails/rails/pull/33604#discussion_r209784205). I'd like to enable `Style/RedundantBegin` cop to avoid that, since rescue/else/ensure are allowed inside do/end blocks in Ruby 2.5 (https://bugs.ruby-lang.org/issues/12906), so we'd probably meets with that situation than before. | ||||
* | Use respond_to test helpers | Daniel Colson | 2018-01-25 | 1 | -2/+2 |
| | |||||
* | Merge pull request #29788 from kamipo/remove_unused_mutex_m | Rafael França | 2017-07-17 | 1 | -1/+1 |
|\ | | | | | Remove unused `Mutex_m` in Active Model | ||||
| * | Make `generated_attribute_methods` to private | Ryuta Kamizono | 2017-07-14 | 1 | -1/+1 |
| | | | | | | | | Because `generated_attribute_methods` is an internal API. | ||||
* | | Use frozen string literal in activemodel/ | Kir Shatrov | 2017-07-16 | 1 | -0/+2 |
|/ | |||||
* | Revert "Merge pull request #29540 from kirs/rubocop-frozen-string" | Matthew Draper | 2017-07-02 | 1 | -1/+0 |
| | | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa. | ||||
* | Enforce frozen string in Rubocop | Kir Shatrov | 2017-07-01 | 1 | -0/+1 |
| | |||||
* | Add three new rubocop rules | Rafael Mendonça França | 2016-08-16 | 1 | -1/+1 |
| | | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository. | ||||
* | normalizes indentation and whitespace across the project | Xavier Noria | 2016-08-06 | 1 | -2/+2 |
| | |||||
* | modernizes hash syntax in activemodel | Xavier Noria | 2016-08-06 | 1 | -2/+2 |
| | |||||
* | applies new string literal convention in activemodel/test | Xavier Noria | 2016-08-06 | 1 | -40/+40 |
| | | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. | ||||
* | Completely remove potential global state leaks in ActiveModel tests. | Zuhao Wan | 2014-03-11 | 1 | -24/+52 |
| | | | | ActiveModel tests can now be run in random order. | ||||
* | Remove deprecation warning from AttributeMethodsMatcher | Paul Nikitochkin | 2013-06-28 | 1 | -11/+0 |
| | |||||
* | Convert ActiveModel to 1.9 hash syntax. | Patrick Robertson | 2013-05-01 | 1 | -2/+2 |
| | | | | | I also attempted to fix other styleguide violations such as { a: :b } over {a: :b} and foo(b: 'bar') over foo( b: 'bar' ). | ||||
* | Small typos here and there. | Vipul A M | 2013-03-15 | 1 | -1/+1 |
| | |||||
* | made dynamic finders alias_attribute aware | Maximilian Schneider | 2012-06-22 | 1 | -0/+9 |
| | | | | | previously dynamic finders only worked in combination with the actual column name and not its alias defined with #alias_attribute | ||||
* | Merge pull request #4785 from ↵ | José Valim | 2012-05-25 | 1 | -0/+22 |
|\ | | | | | | | | | 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 | -0/+22 |
| | | | | | | | | column that named as a ruby keyword | ||||
* | | allow define_attribute_methods to pass multiple values | Francesco Rodriguez | 2012-05-14 | 1 | -6/+13 |
|/ | |||||
* | test against ruby features in order to fix tests on Ruby 2.0 | Aaron Patterson | 2012-03-26 | 1 | -1/+9 |
| | |||||
* | 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> |