Sha256: d7a784ee2632601b8e71bcd5b19e670c0904fb26787f718b546d73ba2a160b1d
Contents?: true
Size: 801 Bytes
Versions: 17
Compression:
Stored size: 801 Bytes
Contents
require 'rails/generators' require 'rails/generators/migration' require 'rails/generators/active_record' module Crono module Generators # rails generate crono:install class InstallGenerator < ::Rails::Generators::Base include Rails::Generators::Migration def self.next_migration_number(path) ActiveRecord::Generators::Base.next_migration_number(path) end desc 'Installs crono and generates the necessary configuration files' source_root File.expand_path('../templates', __FILE__) def copy_config template 'cronotab.rb.erb', 'config/cronotab.rb' end def create_migrations migration_template 'migrations/create_crono_jobs.rb', 'db/migrate/create_crono_jobs.rb' end end end end
Version data entries
17 entries across 17 versions & 1 rubygems