Sha256: 077fbc35d6415b631ea998d8bb8f1bde773d10d79cfcdbc34db0bff6ecfd6714
Contents?: true
Size: 689 Bytes
Versions: 18
Compression:
Stored size: 689 Bytes
Contents
require "rails/generators/base" module PgSearch module Migration class DmetaphoneGenerator < Rails::Generators::Base source_root File.expand_path("../templates", __FILE__) def create_migration now = Time.now.utc filename = "#{now.strftime('%Y%m%d%H%M%S')}_add_pg_search_dmetaphone_support_functions.rb" template "add_pg_search_dmetaphone_support_functions.rb.erb", "db/migrate/#{filename}" end private def read_sql_file(filename) sql_directory = File.expand_path("../../../../sql", __FILE__) source_path = File.join(sql_directory, "#{filename}.sql") File.read(source_path) end end end end
Version data entries
18 entries across 18 versions & 1 rubygems