I use this code to add a tab to project/setting tab in ProjectHelper module:
def project_settings_tabs
tabs = [{...},
.....,
{name: => 'polls', :action => :poll, :partial => '../.. /path_to_partial', :label => :poll }
]
tabs.select {|tab| User.current.allow_to?(tab[:action], @project)}
end
However, my Polls tab didn't display on setting tab as I expected. So my question is what is problems with my code and is there any other way to add a tab to setting tab?
Aucun commentaire:
Enregistrer un commentaire