西小倉事典
mindia › 西小倉事典 › 単語

helper

西小倉パンデイロ · 2008-12-19 更新 · 履歴(3)
第 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を返す

履歴

タグ

「helper」タグが付けられた単語