Sha256: a6bab60fc0e07a276d80a54ffc4d9907fb830165d5fa637aba251dcf228dce59
Contents?: true
Size: 622 Bytes
Versions: 6
Compression:
Stored size: 622 Bytes
Contents
class PapermillGenerator < Rails::Generator::NamedBase attr_accessor :class_name, :migration_name def initialize(args, options = {}) super @class_name = args[0] end def manifest @migration_name = file_name.camelize FileUtils.rm_rf('../../public/papermill/') FileUtils.cp_r( Dir[File.join(File.dirname(__FILE__), '../../public')], File.join(RAILS_ROOT), :verbose => true ) record do |m| # Migration creation m.migration_template "migrate/papermill_migration.rb.erb", "db/migrate", :migration_file_name => migration_name.underscore end end end
Version data entries
6 entries across 6 versions & 1 rubygems