Sha256: 5840eff0a6e77302195deb00ddc192af3c0fb86d7bb553eef97b2a11c26daec5

Contents?: true

Size: 620 Bytes

Versions: 10

Compression:

Stored size: 620 Bytes

Contents

module Refinery
  class PagesGenerator < Rails::Generators::Base
    source_root File.expand_path('../templates', __FILE__)

    def generate_pages_initializer
      template "config/initializers/refinery/pages.rb.erb", File.join(destination_root, "config", "initializers", "refinery", "pages.rb")
    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 Pages extension
Refinery::Pages::Engine.load_seed
        EOH
      end
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
refinerycms-pages-2.0.9 lib/generators/refinery/pages/pages_generator.rb
refinerycms-pages-2.0.8 lib/generators/refinery/pages/pages_generator.rb
refinerycms-pages-2.0.7 lib/generators/refinery/pages/pages_generator.rb
refinerycms-pages-2.0.6 lib/generators/refinery/pages/pages_generator.rb
refinerycms-pages-2.0.5 lib/generators/refinery/pages/pages_generator.rb
refinerycms-pages-2.0.4 lib/generators/refinery/pages/pages_generator.rb
refinerycms-pages-2.0.3 lib/generators/refinery/pages/pages_generator.rb
refinerycms-pages-2.0.2 lib/generators/refinery/pages/pages_generator.rb
refinerycms-pages-2.0.1 lib/generators/refinery/pages/pages_generator.rb
refinerycms-pages-2.0.0 lib/generators/refinery/pages/pages_generator.rb