Sha256: 8579d34ec6904450fa7eeeef92cd0316b52aefff4d5573e827b97eab2c65f60b

Contents?: true

Size: 304 Bytes

Versions: 8

Compression:

Stored size: 304 Bytes

Contents

class UploadController < ApplicationController
  self.responder = RailsPalletResponder
  respond_to :json

  def create
    new_upload = RailsPallet::Upload.create(permitted_params)
    respond_with new_upload, status: :created
  end

  private

  def permitted_params
    params.permit(:file)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rails_pallet-2.3.2 lib/generators/rails_pallet/upload_controller/templates/controller.rb
rails_pallet-2.3.1 lib/generators/rails_pallet/upload_controller/templates/controller.rb
rails_pallet-2.3.0 lib/generators/rails_pallet/upload_controller/templates/controller.rb
rails_pallet-2.2.0 lib/generators/rails_pallet/upload_controller/templates/controller.rb
rails_pallet-2.1.0 lib/generators/rails_pallet/upload_controller/templates/controller.rb
rails_pallet-2.0.2 lib/generators/rails_pallet/upload_controller/templates/controller.rb
rails_pallet-2.0.1 lib/generators/rails_pallet/upload_controller/templates/controller.rb
rails_pallet-2.0.0 lib/generators/rails_pallet/upload_controller/templates/controller.rb