Revision 01984fb7
Added by Amos Benari almost 13 years ago
- ID 01984fb762096e21d3318145f69d4fc74a9f97a1
app/helpers/home_helper.rb | ||
---|---|---|
end
|
||
end
|
||
end
|
||
|
||
# filters out any non allowed actions from the setting menu.
|
||
def allowed_choices choices, action = "index"
|
||
choices.map do |opt|
|
||
name, kontroller = opt
|
||
url = eval("#{kontroller}_url")
|
||
authorized_for(kontroller, action) ? [name, url] : nil
|
||
end.compact.sort
|
||
end
|
||
end
|
Also available in: Unified diff
New artwork
Signed-off-by: Ohad Levy <ohadlevy@gmail.com>