weppos/breadcrumbs_on_rails — Issue #16: Somehow move #add_breadcrumb method from controller level
Author: stanislaw
Created: 2011-12-02 02:53:48+00:00
State: open

It is about the obvious (am i right?) need of not having controllers overwhelmed by #add_breadcrumb methods.

For now using your plugin requires inclusion one #add_breadcrumb method to each action of each controller.

One of the possibility I see here:

Fx if I add #add_breadcrumb into #show action of UsersController - I actualy dealing with "route user_path(@user)"-"view level" mapping - not controller's one. Right?

Why not to create somehow "routes - breadcrumbs" map in some non-controller place, base it on Rails routes recognization mechanism - and access it through controller&view helpers. Will be much more cleaner.

Does it makes sense? I know this proposal slightly attacks present design, but your plugin is almost there to be the best (fresh, working, configurable, ...) rails plugin completely providing breadcrumb functionality among all others I've been trying to find.

At least I'm wondering about possibility of having all breadcrumb declaration stuff collected in one place!

Thanks.

And thanks for the gem!