helper
第 1 版(2008-12-19 23:17:44 · 西小倉パンデイロ)を表示しています。 最新版に戻る
URL分岐
*_helper.rbに
def is_match?(controller,action)
params[:controller] == controller && params[:action] == action
end
とかいて
rhtmlに
<% if is_match?("community","list") %>
と書くと
controllerがcommunityでactionがlistの時だけtrueを返す