Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (15 sloc) 517 Bytes
require "rails/generators/active_record"
module Archer
module Generators
class InstallGenerator < Rails::Generators::Base
include ActiveRecord::Generators::Migration
source_root File.join(__dir__, "templates")
def copy_migration
migration_template "migration.rb", "db/migrate/create_archer_history.rb", migration_version: migration_version
end
def migration_version
"[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
end
end
end
end
You can’t perform that action at this time.