- if @speech_balloon.valid?
- if @speech_balloon.store @author, params[:speech_balloon]
- flash[:notice] = I18n.t('flash.notice.created', :model => Panel.model_name.human)
- format.html { redirect_to @panel }
- format.json { render json: @panel.panel_elements_as_json, status: :created, location: @panel }
- else
- flash[:notice] = I18n.t('flash.notice.not_created', :model => SpeechBalloon.model_name.human)
- format.html { render action: "new" }
- format.json { render json: @speech_balloon.errors, status: :unprocessable_entity }
- end
+ if @speech_balloon.valid? and @speech_balloon.store(@operators, params[:speech_balloon])
+ flash[:notice] = I18n.t('flash.notice.created', :model => Panel.model_name.human)
+ format.html { redirect_to @panel }
+ format.json { render json: @panel.panel_elements_as_json, status: :created, location: @panel }