Sha256: a42e53ecf908bed34b889e30d17af1543b28eebb973fea4d9064534f49938ea0

Contents?: true

Size: 472 Bytes

Versions: 2

Compression:

Stored size: 472 Bytes

Contents

require 'rails/generators'

module StaticBlocks
  module Generators
    class InstallGenerator < Rails::Generators::Base
      include Rails::Generators::Migration
      source_root File.expand_path("../../templates", __FILE__)

      def copy_static_blocks_config
        copy_file "static_blocks_config_template.rb", "config/initializers/static_blocks.rb"
      end

      def copy_migrations
        rake('static_blocks:install:migrations')
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
static_blocks-1.0.2 lib/generators/install_generator.rb
static_blocks-1.0.1 lib/generators/install_generator.rb