This project is archived and is in readonly mode.
Add :spacer option to render
-
Pratik
- State changed from new to wontfix
I think spacer templates might be better served as a plugin. Very few people actually use them. We might as well remove it from core if the plugin becomes defacto implementation.
Thanks.
-
Ryan Bates
I agree many people don't use spacer_template, but I would certainly use this :spacer option more. I need this behavior in almost every project but find other work-arounds because a spacer template just feels so ugly.
I'm willing to make a plugin with this behavior, but I don't see how it would be possible without re-implementing the entire "render_partial_collection" method. That isn't a good solution.
Any ideas?
-
Jeremy Weiskotten
@Ryan, I think it would be a good addition to the better_partials plugin. There are some other good ideas in there.
-
Ryan Bates
The better_partials plugin is just a wrapper around "render", so it faces the same problem. There's no way to add a spacer as a string without re-implementing the render_partial_collection method.
-
Ryan Bates
I added ticket #881 Refactoring ActionView::Partials which does some refactoring to ActionView::Partials. Then it will be easier for plugins to override render_partial_collection and support more options.
This also makes it easier to remove the spacer_template option if you ever decide to in the future.
-
Jon Kneller
I was just trying to find such a feature, and came across this ticket. Would have been really nice if Rails supported this.
-
Jeff Kreeftmeijer
Automatic cleanup of spam.
-
Jeff Kreeftmeijer
Automatic cleanup of spam.
-
Jeff Kreeftmeijer
Automatic cleanup of spam.
-
Jeff Kreeftmeijer
Automatic cleanup of spam.