crumble
crumble copied to clipboard
BreadCrumbs with params
I wanted to generate breadcrumb with extra params for edit controller. for eg:
/company/1/edit?section=extra
I tested as:
crumb :crumb_with_param, "Params BreadCrumb", :edit_company_url, :company, :params => :section
But I couldn't get desired output. How can we write crumb for that one?
You could provide a string as parameter instead of symbols and hashes, which will then be evaluated. It's not pretty, but may be an option:
crumb :crumb_with_param, "Params BreadCrumb", :edit_company_url, '@company, {:params => @section}'