module Refinery module <%= namespacing %> class Engine < Rails::Engine extend Refinery::Engine isolate_namespace Refinery::<%= namespacing %> engine_name :refinery_<%= extension_plural_name %> before_inclusion do Refinery::Plugin.register do |plugin| plugin.name = "<%= plural_name %>" plugin.url = proc { Refinery::Core::Engine.routes.url_helpers.<%= namespacing.underscore %>_admin_<%= plural_name %>_path } plugin.pathname = root <% unless namespacing.underscore == plural_name -%>plugin.menu_match = %r{refinery/<%= namespacing.underscore %>/<%= plural_name %>(/.*)?$}<% end %> end end config.after_initialize do Refinery.register_extension(Refinery::<%= class_name.pluralize %>) end end end end