reverts postgres extension until permissions enabled at server level
This commit is contained in:
@@ -138,7 +138,7 @@ class Debate < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def self.search(terms)
|
||||
terms.present? ? where("unaccent(title) ILIKE unaccent(?) OR unaccent(description) ILIKE unaccent(?)", "%#{terms}%", "%#{terms}%") : none
|
||||
terms.present? ? where("title ILIKE ? OR description ILIKE ?", "%#{terms}%", "%#{terms}%") : none
|
||||
end
|
||||
|
||||
def conflictive?
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
class AddUnaccentExtension < ActiveRecord::Migration
|
||||
def up
|
||||
execute "CREATE EXTENSION IF NOT EXISTS unaccent"
|
||||
end
|
||||
|
||||
def down
|
||||
execute "DROP EXTENSION unaccent"
|
||||
end
|
||||
end
|
||||
@@ -11,11 +11,10 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20150910185110) do
|
||||
ActiveRecord::Schema.define(version: 20150910152734) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
enable_extension "unaccent"
|
||||
|
||||
create_table "addresses", force: :cascade do |t|
|
||||
t.integer "user_id"
|
||||
@@ -259,7 +258,6 @@ ActiveRecord::Schema.define(version: 20150910185110) do
|
||||
t.datetime "letter_requested_at"
|
||||
t.datetime "confirmed_hide_at"
|
||||
t.string "letter_verification_code"
|
||||
t.integer "letter_verification_tries", default: 0
|
||||
end
|
||||
|
||||
add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree
|
||||
|
||||
@@ -439,10 +439,10 @@ feature 'Debates' do
|
||||
debate1 = create(:debate, title: "Show me what you got")
|
||||
debate2 = create(:debate, title: "Get Schwifty")
|
||||
debate3 = create(:debate)
|
||||
debate4 = create(:debate, description: "Schwíftÿ in here")
|
||||
debate4 = create(:debate, description: "Schwifty in here")
|
||||
|
||||
visit debates_path
|
||||
fill_in "search", with: "Schwìfty"
|
||||
fill_in "search", with: "Schwifty"
|
||||
click_button "Search"
|
||||
|
||||
within("#debates") do
|
||||
|
||||
Reference in New Issue
Block a user