私には(私にとって)奇妙な問題があります:
「新規」のビューをレンダリングすると、レイアウト「ボックス」を使用してログイン ボックスが正しくレンダリングされますが、アクション「作成」から実行しようとすると、レイアウト => false を設定したかのようにレンダリングされます。
class Script::V1::SessionsController < Script::V1::ApplicationController
layout "box"
def new
end
def create
_user = User.authenticate(params[:username], params[:password])
if _user.nil? then
render :new and return
else
cookies[:token] = { :value => user.token, :domain => get_cookie_domain, :expires => 1.year.from_now }
@product = Product.find(params[:product_id])
render
end
end
# logout
def destroy
cookies.delete :token
redirect_to :new
end
end
何が問題なのかわかりません。