Closed sunnyrjuneja closed 7 years ago
I ended up making a helper that worked perfectly.
def accounts_invitations?
controller_name == 'accounts' && action_name == 'index' or
controller_name == 'invitations' && action_name == 'new'
end
try:
<%= active_link_to 'Accounts', accounts_path, active: [[accounts: :index], [invitations: :new] %>
Personally it I think it's still pretty awkward, so a helper you have there is probably better.
Thanks for your assistance @GBH.
Hi Comfy,
Based on a few tests, I don't believe the active option handles nested controllers correctly.