Sha256: cb16c9ce86b7f98316b6700fd5f416eda34ec8eac5d6f33728626d2f8a48d713
Contents?: true
Size: 542 Bytes
Versions: 3
Compression:
Stored size: 542 Bytes
Contents
class DelayedJobGenerator < Rails::Generator::Base default_options :skip_migration => false def manifest record do |m| if !options[:skip_migration] && defined?(ActiveRecord) m.migration_template "migration.rb", 'db/migrate', :migration_file_name => "create_delayed_jobs" end end end protected def add_options!(opt) opt.separator '' opt.separator 'Options:' opt.on("--skip-migration", "Don't generate a migration") { |v| options[:skip_migration] = v } end end
Version data entries
3 entries across 3 versions & 1 rubygems