diff options
author | Job van der Voort <jobvandervoort@gmail.com> | 2015-04-21 17:21:51 +0300 |
---|---|---|
committer | Job van der Voort <jobvandervoort@gmail.com> | 2015-04-21 17:21:51 +0300 |
commit | a8e93b7f51d968c1380ed210499869b62b07fd15 (patch) | |
tree | c864e80dfd9cf4f83fcede678acc986e3a125bf5 /config/initializers/postgresql_limit_fix.rb | |
parent | 0625b15a481b3a3edd88110b3c18031ad9068d2f (diff) |
Version 7.10.0.rc5v7.10.0.rc5
Diffstat (limited to 'config/initializers/postgresql_limit_fix.rb')
-rw-r--r-- | config/initializers/postgresql_limit_fix.rb | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/config/initializers/postgresql_limit_fix.rb b/config/initializers/postgresql_limit_fix.rb deleted file mode 100644 index 0cb3aaf4d24..00000000000 --- a/config/initializers/postgresql_limit_fix.rb +++ /dev/null @@ -1,26 +0,0 @@ -if defined?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter) - class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter - class TableDefinition - def text(*args) - options = args.extract_options! - options.delete(:limit) - column_names = args - type = :text - column_names.each { |name| column(name, type, options) } - end - end - - def add_column_with_limit_filter(table_name, column_name, type, options = {}) - options.delete(:limit) if type == :text - add_column_without_limit_filter(table_name, column_name, type, options) - end - - def change_column_with_limit_filter(table_name, column_name, type, options = {}) - options.delete(:limit) if type == :text - change_column_without_limit_filter(table_name, column_name, type, options) - end - - alias_method_chain :add_column, :limit_filter - alias_method_chain :change_column, :limit_filter - end -end |