bugfix
This commit is contained in:
@@ -48,8 +48,12 @@ class FotosController < ApplicationController
|
||||
respond_to do |format|
|
||||
@foto.title = @foto.datei
|
||||
if @foto.save
|
||||
format.html { redirect_to gallery_foto_path(@foto.gallery,@foto), notice: 'Foto was successfully created.' }
|
||||
format.json { render json: gallery_foto_path(@foto.gallery,@foto), status: :created, location: [@gallery, @foto] }
|
||||
format.html {
|
||||
render :json => [@foto.to_jq_upload].to_json,
|
||||
:content_type => 'text/html',
|
||||
:layout => false
|
||||
}
|
||||
format.json { render json: {files: [@foto.to_jq_upload]}, status: :created, location: [@gallery, @foto] }
|
||||
else
|
||||
format.html { render action: "new" }
|
||||
format.json { render json: @foto.errors, status: :unprocessable_entity }
|
||||
|
||||
Reference in New Issue
Block a user