class Hansel::InstallGenerator
Generator for the Hansel::Record
model
Public Class Methods
next_migration_number(dirname)
click to toggle source
# File lib/generators/hansel/install/install_generator.rb, line 11 def self.next_migration_number(dirname) ::ActiveRecord::Generators::Base.next_migration_number(dirname) end
Public Instance Methods
add_hansel_migration()
click to toggle source
# File lib/generators/hansel/install/install_generator.rb, line 15 def add_hansel_migration migration_template( 'create_records.rb.erb', 'db/migrate/create_records.rb', migration_version: migration_version ) end
migration_version()
click to toggle source
# File lib/generators/hansel/install/install_generator.rb, line 23 def migration_version "[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]" end