1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/lib/active_file/railtie.rb
David Heinemeier Hansson d2ff19c39c WIP: Disk URLs
2017-07-03 20:14:28 +02:00

19 lines
472 B
Ruby

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