class Alchemy::PgSearch::UpgradeGenerator
Public Instance Methods
copy_migration_file()
click to toggle source
# File lib/generators/alchemy/pg_search/upgrade/upgrade_generator.rb, line 14 def copy_migration_file timestamp = Time.now.strftime('%Y%m%d%H%M%S') copy_file "migration.rb.tt", Rails.root.join("db/migrate/#{timestamp}_upgrade_from_alchemy_ferret.alchemy_pg_search.rb") end
replace_element_config()
click to toggle source
# File lib/generators/alchemy/pg_search/upgrade/upgrade_generator.rb, line 9 def replace_element_config gsub_file Rails.root.join('config/alchemy/elements.yml'), 'do_not_index: true', 'searchable: false' end