Sha256: ae698684fb54ecc9f0da4a8f3b8fa6ff8330551d3405b62ac304993216200c9d

Contents?: true

Size: 528 Bytes

Versions: 17

Compression:

Stored size: 528 Bytes

Contents

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

    def rake_db
      rake "refinery_<%= 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 Refinery CMS <%= namespacing %> extension
Refinery::<%= namespacing %>::Engine.load_seed
        EOH
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
refinerycms-core-4.0.3 lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb.erb
refinerycms-core-4.0.2 lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb.erb
refinerycms-core-4.0.1 lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb.erb
refinerycms-core-3.0.6 lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb.erb
refinerycms-core-4.0.0 lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb.erb
refinerycms-core-3.0.5 lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb.erb
refinerycms-core-3.0.4 lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb.erb
refinerycms-core-3.0.3 lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb.erb
refinerycms-core-3.0.2 lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb.erb
refinerycms-core-3.0.1 lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb.erb
refinerycms-core-3.0.0 lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb.erb
refinerycms-core-2.1.5 lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb.erb
refinerycms-core-2.1.4 lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb.erb
refinerycms-core-2.1.3 lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb.erb
refinerycms-core-2.1.2 lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb.erb
refinerycms-core-2.1.1 lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb.erb
refinerycms-core-2.1.0 lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb.erb