-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Builders don't cascade #127
Comments
That is a valid point! Should the found class be queried again for buliders, making the finding recursive... Hm. Shouldn't be required in most cases but definitely makes sense. Can you give an example how you're using that? |
I basically have items that need specific behavior, so - in a gem - I just pass them into a basic cell that delegates down to some default behavior for the specific class of the item. If the gem is included in an application the application itself can override the behavior simply by having the builders of the default behavior locating the cell based on conventions specific to the item's class. But it's just an observation of what would seem intuitive. In my case other requirements forced me to initialize the cells in the parent controller anyway and then pass them into the view instead of using render_cell, so that problem doesn't apply anymore. |
Why does Github say you posted this in 2012? |
Wrong Timezone :D ( sorry, just had to laught about that comment :) ) |
Hey I was actually expecting this cascade behavior to be available already and I'm quite missing it for my application. For big inheritance scheme, it made more sense to me to split the builder into multiple builders instead of one giant builder at the root. In some case it might event make sense to have recursive builders cause it would let us select better "cell routing". Here's an example
With recursive builders there would be a difference between calling
|
render_cell :test, :my_action
should return "bar"The text was updated successfully, but these errors were encountered: