开发者

Is it possible to use sessions on html.erb file on rails 2.3.8?

Is it possible to use sessions on html.erb file? If so please can someone explain how to use session variables on html.erb files ?? I have session[:id] on my controll开发者_如何学Pythoner and I need to get that id on my html.erb so how can I do that please give me a solution for this problem. Thanks


Place this in your view: <%= session[:id] %>

<%= ... %> will evaluate any statement available to the view_context.

The = sign after the % is very important because is evaluating the expression,

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜