Sha256: 3cec59a8ce6d354aba5c8e9a1e3f736c95838c747d372bc1d8445657e39a9fb5

Contents?: true

Size: 520 Bytes

Versions: 2

Compression:

Stored size: 520 Bytes

Contents

module Answers
  class <%= extension_plural_class_name %>Generator < Rails::Generators::Base

    def rake_db
      rake "answers_<%= extension_plural_name %>:install:migrations"
    end

    def append_load_seed_data
      create_file 'db/seeds.rb' unless File.exists?(File.join(destination_root, 'db', 'seeds.rb'))
      append_file 'db/seeds.rb', :verbose => true do
        <<-EOH

# Added by Answers <%= namespacing %> extension
Answers::<%= namespacing %>::Engine.load_seed
        EOH
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
answers-core-0.0.0.2 lib/generators/answers/engine/templates/lib/generators/answers/extension_plural_name_generator.rb.erb
answers-core-0.0.0 lib/generators/answers/engine/templates/lib/generators/answers/extension_plural_name_generator.rb.erb