Filter projects on dashboard

This commit is contained in:
Dmitriy Zaporozhets 2012-11-30 06:14:05 +03:00
parent a03f318964
commit c38b9a2f80
5 changed files with 46 additions and 0 deletions

View file

@ -84,4 +84,17 @@ module TabHelper
'active'
end
end
# Use nav_tab for save controller/action but different params
def nav_tab key, value, &block
o = {}
o[:class] = ""
o[:class] << " active" if params[key] == value
if block_given?
content_tag(:li, capture(&block), o)
else
content_tag(:li, nil, o)
end
end
end