Sha256: f7e968c7a1804ce28c5e2d3ba51b2dfcd2f4a46d1137a0b98c193c62106e7a9b

Contents?: true

Size: 565 Bytes

Versions: 7

Compression:

Stored size: 565 Bytes

Contents

module PageflowChart
  class InstallGenerator < Rails::Generators::Base
    desc 'Install the Pageflow plugin and the necessary migrations.'

    def register_plugin
      inject_into_file('config/initializers/pageflow.rb',
                       after: "Pageflow.configure do |config|\n") do

        "  config.page_types.register(Pageflow::Chart.page_type)\n"
      end
    end

    def mount_engine
      route("mount Pageflow::Chart::Engine, at: '/charts'\n")
    end

    def install_migrations
      rake 'pageflow_chart:install:migrations'
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pageflow-chart-2.6.0 lib/generators/pageflow_chart/install/install_generator.rb
pageflow-chart-2.5.0 lib/generators/pageflow_chart/install/install_generator.rb
pageflow-chart-2.4.0 lib/generators/pageflow_chart/install/install_generator.rb
pageflow-chart-2.3.0 lib/generators/pageflow_chart/install/install_generator.rb
pageflow-chart-2.2.0 lib/generators/pageflow_chart/install/install_generator.rb
pageflow-chart-2.1.0 lib/generators/pageflow_chart/install/install_generator.rb
pageflow-chart-2.0.0 lib/generators/pageflow_chart/install/install_generator.rb