Sha256: 9484f4114cac3e060bd23f28d85111d9be555304c53536bc0b772755c034afbe

Contents?: true

Size: 833 Bytes

Versions: 13

Compression:

Stored size: 833 Bytes

Contents

require "rails/railtie"

module Apotomo
  class Railtie < ::Rails::Railtie
    rake_tasks do
      load "apotomo/apotomo.rake"
    end
    
    # As we are a Railtie only, the routes won't be loaded automatically. Beside that, we want our 
    # route to be the very first (otherwise #resources might supersede it).
    initializer 'apotomo.prepend_routes', :after => :add_routing_paths do |app|
      app.routes_reloader.paths.unshift(File.dirname(__FILE__) + "/../../config/routes.rb")
    end
    
    # Include a lazy loader via has_widgets.
    initializer 'apotomo.add_has_widgets' do |app|
      ActionController::Base.extend Apotomo::Rails::ControllerMethodsLoader
    end
    
    initializer 'apotomo.setup_view_paths', :after => 'cells.setup_view_paths' do |app|
      Apotomo::Widget.setup_view_paths!
    end
  end 
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
apotomo-1.2.6 lib/apotomo/railtie.rb
apotomo-1.2.5 lib/apotomo/railtie.rb
apotomo-1.2.4 lib/apotomo/railtie.rb
apotomo-1.2.3 lib/apotomo/railtie.rb
apotomo-1.2.2 lib/apotomo/railtie.rb
apotomo-1.2.1 lib/apotomo/railtie.rb
apotomo-1.2.0 lib/apotomo/railtie.rb
apotomo-1.1.4 lib/apotomo/railtie.rb
apotomo-1.1.3 lib/apotomo/railtie.rb
apotomo-1.1.2 lib/apotomo/railtie.rb
apotomo-1.1.1 lib/apotomo/railtie.rb
apotomo-1.1.0 lib/apotomo/railtie.rb
apotomo-1.1.0.rc1 lib/apotomo/railtie.rb