Sha256: 7eecabde1c2bb853327c2d8e93537c84e480582a0cb7050926aa6754523d85ea

Contents?: true

Size: 555 Bytes

Versions: 13

Compression:

Stored size: 555 Bytes

Contents

require "detour"
require "rails/generators"
require "rails/generators/active_record"

class DetourGenerator < Rails::Generators::Base
  include Rails::Generators::Migration
  extend ActiveRecord::Generators::Migration

  source_root File.expand_path("../templates", __FILE__)

  desc "Creates migration for Detour"
  def create_migration_file
    migration_template "migration.rb", "db/migrate/setup_detour.rb"
  end

  desc "Sets up an initializer for Detour"
  def create_initializer
    copy_file "detour.rb", "config/initializers/detour.rb"
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
detour-0.0.15 lib/generators/detour_generator.rb
detour-0.0.14 lib/generators/detour_generator.rb
detour-0.0.13 lib/generators/detour_generator.rb
detour-0.0.12 lib/generators/detour_generator.rb
detour-0.0.11 lib/generators/detour_generator.rb
detour-0.0.10 lib/generators/detour_generator.rb
detour-0.0.9 lib/generators/detour_generator.rb
detour-0.0.7 lib/generators/detour_generator.rb
detour-0.0.6 lib/generators/detour_generator.rb
detour-0.0.5 lib/generators/detour_generator.rb
detour-0.0.3 lib/generators/detour_generator.rb
detour-0.0.2 lib/generators/detour_generator.rb
detour-0.0.1 lib/generators/active_record_rollout_generator.rb