Sha256: 2d0c720ff58af5b3cc12cc3d272b51f53772c109ef2c84eaa6c0d1bc74c44681

Contents?: true

Size: 493 Bytes

Versions: 6

Compression:

Stored size: 493 Bytes

Contents

module ActionDispatch::Routing
  class Mapper
    protected

    def lolita_file_upload_route mapping, controllers
      # /lolita/articles/1/pictures/5
      resources mapping.plural, :module=>mapping.module, :only=>:none do
        collection do
          match "/:association/create" => "#{controllers[:uploads]}#create", :as => "create_upload", :via => :post
        end
        resources :uploads, :controller => controllers[:uploads], :path => "/:association"
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lolita-file-upload-1.0.5 lib/lolita-file-upload/rails/file_upload_routes.rb
lolita-file-upload-1.0.4 lib/lolita-file-upload/rails/file_upload_routes.rb
lolita-file-upload-1.0.3 lib/lolita-file-upload/rails/file_upload_routes.rb
lolita-file-upload-1.0.2 lib/lolita-file-upload/rails/file_upload_routes.rb
lolita-file-upload-1.0.1 lib/lolita-file-upload/rails/file_upload_routes.rb
lolita-file-upload-1.0.0 lib/lolita-file-upload/rails/file_upload_routes.rb