crumble icon indicating copy to clipboard operation
crumble copied to clipboard

BreadCrumbs with params

Open krishna-shilpakar opened this issue 14 years ago • 1 comments

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?

krishna-shilpakar avatar Nov 18 '10 04:11 krishna-shilpakar

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}'

roidrage avatar Nov 28 '10 14:11 roidrage