Sha256: a974536fecc598a606bc4ae63d7c705e09ab70e3db86f77e2bd2f8c61c767dda
Contents?: true
Size: 808 Bytes
Versions: 45
Compression:
Stored size: 808 Bytes
Contents
require 'rails/generators/migration' module Polyblock module Generators class InstallGenerator < ::Rails::Generators::Base include Rails::Generators::Migration source_root File.expand_path('../templates', __FILE__) desc "Create a migration to add the Polyblock::Block model to your project." def self.next_migration_number(path) unless @prev_migration_nr @prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i else @prev_migration_nr += 1 end @prev_migration_nr.to_s end def copy_migrations migration_template "ckeditor_migration.rb", "db/migrate/create_ckeditor_assets.rb" migration_template "polyblock_migration.rb", "db/migrate/create_polyblock_blocks.rb" end end end end
Version data entries
45 entries across 45 versions & 1 rubygems