diff options
Diffstat (limited to 'lib/active_vault/railtie.rb')
-rw-r--r-- | lib/active_vault/railtie.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/active_vault/railtie.rb b/lib/active_vault/railtie.rb new file mode 100644 index 0000000000..c254f4c77c --- /dev/null +++ b/lib/active_vault/railtie.rb @@ -0,0 +1,19 @@ +require "rails/railtie" + +module ActiveVault + class Railtie < Rails::Railtie # :nodoc: + config.action_file = ActiveSupport::OrderedOptions.new + + config.eager_load_namespaces << ActiveVault + + initializer "action_file.routes" do + require "active_vault/disk_controller" + + config.after_initialize do |app| + app.routes.prepend do + get "/rails/blobs/:encoded_key" => "active_vault/disk#show", as: :rails_disk_blob + end + end + end + end +end |