class Hayfork::Generators::RebuildGenerator
Public Instance Methods
copy_migration()
click to toggle source
# File lib/generators/hayfork/rebuild_generator.rb, line 33 def copy_migration migration_template "migrations/rebuild.rb", "#{db_migrate_path}/rebuild_#{table_name}.rb", migration_version: migration_version end
migration_version()
click to toggle source
# File lib/generators/hayfork/rebuild_generator.rb, line 42 def migration_version return unless Rails::VERSION::MAJOR >= 5 "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]" end
table_name()
click to toggle source
Calls superclass method
# File lib/generators/hayfork/rebuild_generator.rb, line 37 def table_name return "haystack" if class_name == "Haystack" super end