Tidier path the member data

This commit is contained in:
Brenda Wallace
2019-01-02 21:32:23 +13:00
parent b2bceb5873
commit abc796605d

View File

@@ -70,8 +70,8 @@ module ApplicationHelper
def show_inactive_tickbox_path(type, owner, show_all)
all = show_all ? '' : 1
if owner
return member_plantings_path(member_slug: owner.slug, all: all) if type == 'plantings'
return member_gardens_path(member_slug: owner.slug, all: all) if type == 'gardens'
return member_plantings_path(owner, all: all) if type == 'plantings'
return member_gardens_path(owner, all: all) if type == 'gardens'
end
return plantings_path(all: all) if type == 'plantings'