diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-10 16:02:11 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-10 16:02:11 +0000 |
commit | aaf9a45ca9ce5ceb67b7d4ae0dff350389b72c69 (patch) | |
tree | c2c443eae085e4fe528cd1223ed15147706dc7c7 /activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | |
parent | 0b92b7de2f752bee6c4c950ac9090e5bce3b63bf (diff) | |
download | rails-aaf9a45ca9ce5ceb67b7d4ae0dff350389b72c69.tar.gz rails-aaf9a45ca9ce5ceb67b7d4ae0dff350389b72c69.tar.bz2 rails-aaf9a45ca9ce5ceb67b7d4ae0dff350389b72c69.zip |
Added Base.validate_uniqueness thatv alidates whether the value of the specified attributes are unique across the system. Useful for making sure that only one user can be named "davidhh".
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@108 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb')
-rwxr-xr-x | activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index 1a26057528..87bad183ab 100755 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -324,7 +324,7 @@ module ActiveRecord def quote(value, column = nil) case value - when String then "'#{quote_string(value)}'" # ' (for ruby-mode) + when String then %('#{quote_string(value)}') # ' (for ruby-mode) when NilClass then "NULL" when TrueClass then (column && column.type == :boolean ? "'t'" : "1") when FalseClass then (column && column.type == :boolean ? "'f'" : "0") |