aboutsummaryrefslogblamecommitdiffstats
path: root/lib/active_file/railtie.rb
blob: 4398bb6072a9b4bd9a762f2788b502777ec7cf4b (plain) (tree)
1
2
3
                       

                 













                                                                                 

     
require "rails/railtie"

module ActiveFile
  class Railtie < Rails::Railtie # :nodoc:
    config.action_cable = ActiveSupport::OrderedOptions.new

    config.eager_load_namespaces << ActiveFile

    initializer "action_cable.routes" do
      require "active_file/disk_controller"

      config.after_initialize do |app|
        app.routes.prepend do
          get "/rails/blobs/:id" => "active_file/disk#show", as: :rails_disk_blob
        end
      end
    end
  end
end