Class: ActionDispatch::Routing::Mapper

Inherits:
Object
  • Object
show all
Defined in:
lib/bg_s3uploadable/rails/routes.rb

Instance Method Summary collapse

Instance Method Details

#bg_s3uploadable(options = {}) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/bg_s3uploadable/rails/routes.rb', line 3

def bg_s3uploadable(options={})
  controller = options[:controller] || "bg_s3uploadable/signed_urls"

  scope path: "/s3", as: :s3 do
    get '/signed_url', controller: controller, action: 'show'
    get '/uploaded_image', controller: controller, action: 'uploaded_image'
    get '/uploaded_image/*key', controller: controller, action: 'uploaded_image',
      format: false, as: :uploaded_image_with_key
  end
end