Sha256: 85d1038e4c805190b8a954a524d57af768948265683db43bb0fd90f18d535967
Contents?: true
Size: 662 Bytes
Versions: 6
Compression:
Stored size: 662 Bytes
Contents
# CURRENT FILE :: lib/generators/team_page/team_page_generator.rb # Requires require 'rails/generators' require 'rails/generators/migration' class TeamPageGenerator < Rails::Generators::Base include Rails::Generators::Migration def self.source_root @source_root ||= File.join(File.dirname(__FILE__), 'templates') end def self.next_migration_number(dirname) if ActiveRecord::Base.timestamped_migrations Time.new.utc.strftime("%Y%m%d%H%M%S") else "%.3d" % (current_migration_number(dirname) + 1) end end def create_migration_file migration_template 'migration.rb', 'db/migrate/create_team_members_table.rb' end end
Version data entries
6 entries across 6 versions & 2 rubygems