Sha256: 863e5b642f9f82b6773ec9644330fcde72894ecbfab5230f1c479d47c9238503

Contents?: true

Size: 909 Bytes

Versions: 1

Compression:

Stored size: 909 Bytes

Contents

require 'phoenix_<%= plural_name %>'

module Phoenix
  module <%= class_name.pluralize %>
    class Engine < Rails::Engine
      include Phoenix::Engine
      isolate_namespace Phoenix
      engine_name :phoenix_<%= plural_name %>

      initializer "register phoenix_<%= plural_name %> plugin" do |app|
        Phoenix::Plugin.register do |plugin|
          plugin.name = "<%= class_name.pluralize.underscore.downcase %>"
          plugin.url = {:controller => '/phoenix/<%= plural_name %>'}
          plugin.pathname = root
          plugin.name = '<%= class_name.pluralize.underscore.downcase %>'
          plugin.url = '/phoenix/<%= plural_name %>'

          plugin.activity = {
            :class_name => :'phoenix/<%= singular_name %>'
          }
        end
      end

      config.after_initialize do
        Phoenix.register_engine(Phoenix::<%= class_name.pluralize %>)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
phoenix_core-0.2.1.beta lib/generators/phoenix/extension/templates/lib/phoenix/plural_name/engine.rb