aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2005-10-06 04:15:14 +0000
committerMichael Koziarski <michael@koziarski.com>2005-10-06 04:15:14 +0000
commit656fb866f91a87677ce501d3c9ad6aba9048d00f (patch)
treec6db1f2d6fc045aa428cc7575aec87e74f1f8957 /activerecord/lib/active_record/base.rb
parent0639e1ca7c63afa79b54cc1eb73871026f9b473d (diff)
downloadrails-656fb866f91a87677ce501d3c9ad6aba9048d00f.tar.gz
rails-656fb866f91a87677ce501d3c9ad6aba9048d00f.tar.bz2
rails-656fb866f91a87677ce501d3c9ad6aba9048d00f.zip
Quote booleans according the rules defined by the adapter
* SQLite schema has been updated * Postgresql schema needs to be fixed too Simplify AR::Base#toggle to store the boolean, not the quoted value * expand the tests git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2474 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-xactiverecord/lib/active_record/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 0e1c28e330..1c063c003d 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1094,7 +1094,7 @@ module ActiveRecord #:nodoc:
# Turns an +attribute+ that's currently true into false and vice versa. Returns self.
def toggle(attribute)
- self[attribute] = quote(!send("#{attribute}?", column_for_attribute(attribute)))
+ self[attribute] = !send("#{attribute}?")
self
end