Sha256: d72b180982a469e9489390250efef8bf42a88fffd68a9177b33be17aaadd0ecb
Contents?: true
Size: 1.17 KB
Versions: 3
Compression:
Stored size: 1.17 KB
Contents
require 'rails/generators/active_record' module ActiveRecord module Generators class InstallGenerator < Rails::Generators::Base include Rails::Generators::Migration source_root File.expand_path('../templates', __FILE__) desc 'add active_record merit migrations for the root objects' def self.next_migration_number(path) ActiveRecord::Generators::Base.next_migration_number(path) end def copy_migrations_and_model migration_template 'create_merit_actions.rb', 'db/migrate/create_merit_actions.rb' migration_template 'create_merit_activity_logs.rb', 'db/migrate/create_merit_activity_logs.rb' migration_template 'create_sashes.rb', 'db/migrate/create_sashes.rb' migration_template 'create_badges_sashes.rb', 'db/migrate/create_badges_sashes.rb' migration_template 'create_scores_and_points.rb', 'db/migrate/create_scores_and_points.rb' end def migration_version "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]" end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
merit-3.0.3 | lib/generators/active_record/install_generator.rb |
merit-3.0.2 | lib/generators/active_record/install_generator.rb |
merit-3.0.1 | lib/generators/active_record/install_generator.rb |