diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-13 13:29:33 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-13 13:29:33 -0800 |
commit | 99816bf8cc452b1c64ea76d510306f00d22122fd (patch) | |
tree | 41e4d48d1a542758a7a4e118a052ced15b58a5ed /lib | |
parent | 761b0d98f7374c50f1256ff2b4c25c6c843dba4b (diff) | |
download | rails-99816bf8cc452b1c64ea76d510306f00d22122fd.tar.gz rails-99816bf8cc452b1c64ea76d510306f00d22122fd.tar.bz2 rails-99816bf8cc452b1c64ea76d510306f00d22122fd.zip |
deprecating Arel::Table#primary_key
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel/table.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/arel/table.rb b/lib/arel/table.rb index ceb81705b3..a68705fedf 100644 --- a/lib/arel/table.rb +++ b/lib/arel/table.rb @@ -27,6 +27,12 @@ module Arel end def primary_key + if $VERBOSE + warn <<-eowarn +primary_key (#{caller.first}) is deprecated and will be removed in ARel 3.0.0. Please +switch to `compile_insert` + eowarn + end @primary_key ||= begin primary_key_name = @engine.connection.primary_key(name) # some tables might be without primary key |