Sha256: a418fa71097716142953fda851be666a7fad44ef55903a889bbfba59f965c11a
Contents?: true
Size: 1.04 KB
Versions: 1
Compression:
Stored size: 1.04 KB
Contents
module Homeland module Press class Engine < ::Rails::Engine isolate_namespace Homeland::Press initializer 'homeland.press.init' do |app| break unless Setting.has_module?(:press) app.config.after_initialize do # Because need use I18n.t # must after Rails application initialized will get correct locale Homeland.register_plugin do |plugin| plugin.name = 'press' plugin.display_name = I18n.t('plugin.press') plugin.description = 'A Press/News plugin for Homeland.' plugin.navbar_link = true plugin.admin_navbar_link = true plugin.root_path = "/posts" plugin.admin_path = "/admin/posts" end end User.send :include, Homeland::Press::UserMixin app.routes.prepend do mount Homeland::Press::Engine => '/' end app.config.paths["db/migrate"].concat(config.paths["db/migrate"].expanded) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
homeland-press-0.3.3 | lib/homeland/press/engine.rb |