Method: Notee::ImagesController#create

Defined in:
app/controllers/notee/images_controller.rb

#createObject



18
19
20
21
22
23
24
25
26
27
28
# File 'app/controllers/notee/images_controller.rb', line 18

def create
  @image = Image.new
  @image.file = params[:image]
  respond_to do |format|
    if @image.save
      format.json { render json: @image, status: 200 }
    else
      format.json { render json: @image.errors, status: :unprocessable_entity }
    end
  end
end