From 941986c7db3f4abaed6f859a4d7b93e6445039c4 Mon Sep 17 00:00:00 2001 From: Agis- Date: Sat, 6 Apr 2013 10:57:13 +0300 Subject: Add option to Class#class_attribute for skipping the query method --- guides/source/active_support_core_extensions.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'guides') 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` -- cgit v1.2.3