top | item 45634332

(no title)

gls2ro | 4 months ago

I think it depends on how you look at things.

Here is what I like about this code:

1. It is explicit

2. Breadcrumbs are information that this action needs to set. You can set them in the views or in the controller via these helpers. But no matter where you put the data it is custom data that you as developer set and it is specific to this controller.

The information about how to navigate from homepage to this show method is something that either: you can use meta-programming to try to get it if you would for example scope controllers based on paths (not sure it is a good idea) or you have to provided as Rails cannot know if your controllers/views are in the top namespace.

discuss

order

No comments yet.