# GET /speech_balloon_templates
# GET /speech_balloon_templates.json
def index
- @speech_balloon_templates = SpeechBalloon.all
+ @speech_balloon_templates = SpeechBalloonTemplate.all
respond_to do |format|
format.html # index.html.erb
# GET /speech_balloon_templates/1
# GET /speech_balloon_templates/1.json
def show
- @speech_balloon_template = SpeechBalloon.find(params[:id], include: {:balloon_templates => :speech_templates})
+ @speech_balloon_template = SpeechBalloonTemplate.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json {
- render :json => @speech_balloon_template.to_json(include: {
- :balloon_templates => {:include => :speech_templates}
- })
+ render :json => @speech_balloon_template.to_json()
}
format.jsonp {
- render :json => "callback(" + @speech_balloon_template.to_json(include: {
- :balloon_templates => {:include => :speech_templates}
- }) + ")"
+ render :json => "callback(" + @speech_balloon_template.to_json() + ")"
}
end
end
def list
- @speech_balloon_templates = SpeechBalloon.all
+ @speech_balloon_templates = SpeechBalloonTemplate.all
respond_to do |format|
format.html { render layout: 'system' }
end
def browse
- @speech_balloon_template = SpeechBalloon.find(params[:id])
+ @speech_balloon_template = SpeechBalloonTemplate.find(params[:id])
respond_to do |format|
format.html { render layout: 'system' }
# POST /speech_balloon_templates
# POST /speech_balloon_templates.json
def create
- @speech_balloon_template = SpeechBalloon.new(params[:speech_balloon_template])
+ @speech_balloon_template = SpeechBalloonTemplate.new(params[:speech_balloon_template])
if em = validate_param(params[:speech_balloon_template])
respond_to do |format|
format.json { render json: em, status: :unprocessable_entity }
# DELETE /speech_balloon_templates/1
# DELETE /speech_balloon_templates/1.json
def destroy
- @speech_balloon_template = SpeechBalloon.find(params[:id])
+ @speech_balloon_template = SpeechBalloonTemplate.find(params[:id])
@speech_balloon_template.destroy
respond_to do |format|
- format.html { redirect_to speech_balloon_templates_url }
+ format.html { redirect_to :action => :list }
format.json { head :ok }
end
end