diff options
author | Agis- <corestudiosinc@gmail.com> | 2013-04-06 10:57:13 +0300 |
---|---|---|
committer | Agis- <corestudiosinc@gmail.com> | 2013-04-06 20:34:13 +0300 |
commit | 941986c7db3f4abaed6f859a4d7b93e6445039c4 (patch) | |
tree | 55ef11bf862c4615877a68c37998c7c40d00e8bd /guides/source | |
parent | ec8f59ca530316a14672686611c629abc4112950 (diff) | |
download | rails-941986c7db3f4abaed6f859a4d7b93e6445039c4.tar.gz rails-941986c7db3f4abaed6f859a4d7b93e6445039c4.tar.bz2 rails-941986c7db3f4abaed6f859a4d7b93e6445039c4.zip |
Add option to Class#class_attribute for skipping the query method
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/active_support_core_extensions.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md index 43529e3e96..101a4f5b42 100644 --- a/guides/source/active_support_core_extensions.md +++ b/guides/source/active_support_core_extensions.md @@ -1039,6 +1039,8 @@ For convenience `class_attribute` also defines an instance predicate which is th When `:instance_reader` is `false`, the instance predicate returns a `NoMethodError` just like the reader method. +If you do not want the instance predicate, pass `instance_predicate: false` and it will not be defined. + NOTE: Defined in `active_support/core_ext/class/attribute.rb` #### `cattr_reader`, `cattr_writer`, and `cattr_accessor` |