Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Correctly handle multiple attribute method prefix/suffixes which match | Sean Griffin | 2014-12-04 | 1 | -6/+4 |
| | | | | | | | | | Active Record defines `attribute_method_suffix :?`. That suffix will match any predicate method when the lookup occurs in Active Model. This will make it incorrectly decide that `id_changed?` should not exist, because it attempts to determine if the attribute `id_changed` is present, rather than `id` with the `_changed?` suffix. Instead, we will look for any correct match. | ||||
* | Fix typo in AMo docs [ci skip] | Carlos Antonio da Silva | 2014-01-06 | 1 | -1/+1 |
| | |||||
* | Added Backslashes to ActiveModel::AttributeMethods to prevent unwanted links ↵ | aditya-kapoor | 2013-12-25 | 1 | -16/+11 |
| | | | | in the rdoc + some other doc fixes.[ci skip] | ||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2013-12-20 | 1 | -1/+1 |
|\ | |||||
| * | fixed a typo | aditya-kapoor | 2013-08-20 | 1 | -1/+1 |
| | | |||||
* | | Typo and grammatical fixes [ci skip] | Akshay Vishnoi | 2013-12-02 | 1 | -1/+1 |
|/ | |||||
* | eagerly initialize the attributes module to avoid check-then-set race conditions | Aaron Patterson | 2013-07-02 | 1 | -1/+4 |
| | |||||
* | remove wrong documentation from a :nodoc:'d method | Aaron Patterson | 2013-07-02 | 1 | -1/+0 |
| | |||||
* | the data structure used to store attribute aliases should not be exposed | Aaron Patterson | 2013-07-01 | 1 | -0/+10 |
| | |||||
* | Remove deprecation warning from AttributeMethodsMatcher | Paul Nikitochkin | 2013-06-28 | 1 | -8/+0 |
| | |||||
* | Convert ActiveModel to 1.9 hash syntax. | Patrick Robertson | 2013-05-01 | 1 | -1/+1 |
| | | | | | I also attempted to fix other styleguide violations such as { a: :b } over {a: :b} and foo(b: 'bar') over foo( b: 'bar' ). | ||||
* | pass over the code comments | Xavier Noria | 2013-04-28 | 1 | -28/+32 |
| | | | | | | * Highlights the requirement of an attributes method. * Removes some details that depend on the implementation of the class including the module. * Applies guidelines here and there. | ||||
* | prefer american spelling of 'behavior' | Gosha Arinich | 2013-01-07 | 1 | -1/+1 |
| | |||||
* | Replace some global Hash usages with the new thread safe cache. | thedarkone | 2012-12-14 | 1 | -4/+5 |
| | | | | | | | | | | | | | | | | Summary of the changes: * Add thread_safe gem. * Use thread safe cache for digestor caching. * Replace manual synchronization with ThreadSafe::Cache in Relation::Delegation. * Replace @attribute_method_matchers_cache Hash with ThreadSafe::Cache. * Use TS::Cache to avoid the synchronisation overhead on listener retrieval. * Replace synchronisation with TS::Cache usage. * Use a preallocated array for performance/memory reasons. * Update the controllers cache to the new AS::Dependencies::ClassCache API. The original @controllers cache no longer makes much sense after @tenderlove's changes in 7b6bfe84f3 and f345e2380c. * Use TS::Cache in the connection pool to avoid locking overhead. * Use TS::Cache in ConnectionHandler. | ||||
* | cleanup, remove broken whitespace | Yves Senn | 2012-11-25 | 1 | -2/+2 |
| | |||||
* | Make caller attribute in deprecation methods optional | Alexey Gaziev | 2012-10-30 | 1 | -1/+1 |
| | |||||
* | Provide a call stack for deprecation warnings where needed. | Nikita Afanasenko | 2012-10-29 | 1 | -6/+5 |
| | | | | It's sometimes hard to quickly find where deprecated call was performed, especially in case of migrating between Rails versions. So this is an attempt to improve the call stack part of the warning message by providing caller explicitly. | ||||
* | minor edits in AM documentation [ci skip] | Francesco Rodriguez | 2012-10-21 | 1 | -1/+1 |
| | |||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-08-04 | 1 | -0/+8 |
|\ | | | | | | | | | | | Conflicts: activemodel/lib/active_model/secure_password.rb activerecord/lib/active_record/associations/collection_proxy.rb | ||||
| * | add example to ActiveModel::MissingAttributeError [ci skip] | Francesco Rodriguez | 2012-07-28 | 1 | -0/+8 |
| | | |||||
* | | load active_support/deprecation in active_support/rails | Xavier Noria | 2012-08-02 | 1 | -1/+0 |
| | | |||||
* | | load active_support/core_ext/class/attribute in active_support/rails | Xavier Noria | 2012-08-02 | 1 | -1/+0 |
|/ | |||||
* | Refactor attribute method matcher to use Hash#fetch | Carlos Antonio da Silva | 2012-06-26 | 1 | -5/+3 |
| | |||||
* | Cleanup attribute methods a bit, use map! when accepting *args | Carlos Antonio da Silva | 2012-06-26 | 1 | -17/+12 |
| | | | | | | | | | Since we're dealing with a new array instance, it's safe to use map! and we avoid an extra array object. Also remove the symbolize_keys! from AttributeMethodMatcher, since it's an internal class that always receives symbol keys from the prefix/suffix methods implementations. | ||||
* | add :nodoc: to internal implementations [ci skip] | Francesco Rodriguez | 2012-06-22 | 1 | -1/+1 |
| | |||||
* | 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`. |