+#コモンライセンス
class CommonLicensesController < ApplicationController
layout 'test' if Pettanr::TestLayout
before_filter :authenticate_user!, :only => [:index, :show]
format.html { redirect_to :action => :list }
format.json { render text: 'ok', status: :created }
else
+ #@errorsがNILならJson展開できない全体異常
format.html { render action: "result" }
format.json { render json: @errors, status: :unprocessable_entity }
end