Permalink
Browse files

Prefer quoted_table_name to table_name

  • Loading branch information...
1 parent 21e4b58 commit b03bdebec727b111ba6b3a22184188886d175042 @nertzy nertzy committed Apr 2, 2013
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/pg_search/configuration/column.rb
  2. +2 −2 spec/integration/pg_search_spec.rb
@@ -23,7 +23,7 @@ def to_sql
private
def table_name
- @connection.quote_table_name(@model.table_name)
+ @model.quoted_table_name
end
def column_name
@@ -624,8 +624,8 @@
before do
ActiveRecord::Base.connection.execute <<-SQL.strip_heredoc
- UPDATE #{ModelWithTsvector.table_name}
- SET content_tsvector = to_tsvector('english'::regconfig, "#{ModelWithTsvector.table_name}"."content")
+ UPDATE #{ModelWithTsvector.quoted_table_name}
+ SET content_tsvector = to_tsvector('english'::regconfig, #{ModelWithTsvector.quoted_table_name}."content")
SQL
ModelWithTsvector.pg_search_scope :search_by_content_with_tsvector,

0 comments on commit b03bdeb

Please sign in to comment.