aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_record_querying.textile
diff options
context:
space:
mode:
authorDmytrii Nagirniak <dnagir@gmail.com>2012-04-23 13:14:52 +1000
committerDmytrii Nagirniak <dnagir@gmail.com>2012-04-23 13:14:52 +1000
commit50c5005bafe7e43f81a141cd2c512379aec74325 (patch)
treece51b7ae505b59ea7f878525e16032ccbc64aa23 /guides/source/active_record_querying.textile
parent023cfd3a5cd338de29407cde81682ebbdffc406a (diff)
downloadrails-50c5005bafe7e43f81a141cd2c512379aec74325.tar.gz
rails-50c5005bafe7e43f81a141cd2c512379aec74325.tar.bz2
rails-50c5005bafe7e43f81a141cd2c512379aec74325.zip
Make it explicit that Symbol-s are not officially supported.
This will remove a lot of controversy. As an example, see https://github.com/ernie/squeel/issues/67#issuecomment-5270896
Diffstat (limited to 'guides/source/active_record_querying.textile')
-rw-r--r--guides/source/active_record_querying.textile2
1 files changed, 2 insertions, 0 deletions
diff --git a/guides/source/active_record_querying.textile b/guides/source/active_record_querying.textile
index 58eae2ee0f..c21b91a795 100644
--- a/guides/source/active_record_querying.textile
+++ b/guides/source/active_record_querying.textile
@@ -388,6 +388,8 @@ The field name can also be a string:
Client.where('locked' => true)
</ruby>
+NOTE: A `Symbol` value is not supported and should not be used. Always use a `String` instead: `Client.where(:status => 'active')`, but NOT `Client.where(:status => :active)`.
+
h5(#hash-range_conditions). Range Conditions
The good thing about this is that we can pass in a range for our fields without it generating a large query as shown in the preamble of this section.