This project is archived and is in readonly mode.
render partial collection with inline spacer
Reported by Maxim Kulkin | September 10th, 2008 @ 08:11 PM | in 2.x
Render partial collection with :spacer_template is great but sometimes creating a separate partial for spacer is too much overhead. This patch introduces :spacer option to supply spacer text inline.
Usage: @@@ruby render :partial => 'item', :collection => @items, :spacer => ', '
Comments and changes to this ticket
-
Maxim Kulkin September 10th, 2008 @ 08:11 PM
- no changes were found...
-
Maxim Kulkin September 10th, 2008 @ 08:40 PM
- Title changed from render partial collection with inline spacer to [PATCH] render partial collection with inline spacer
-
josh September 11th, 2008 @ 04:39 PM
- Assigned user set to Pratik
I think it would be nicer just to type check "options[:spacer_template].is_a?(String)"
@Pratik Are spacer templates going away?
-
Maxim Kulkin September 11th, 2008 @ 08:20 PM
Checking type of options[:spacer_template] won't work because both partial name and inline spacer are strings, so it won't be possible to distinguish those two. Also, that _template suffix is not ideal for naming inline spacer. I was also considering :spacer_inline or :spacer_text as alternatives.
If you plan to move spacer templates away, what should be used instead ? Or render partial collection will also be deprecated ?
-
josh September 12th, 2008 @ 01:49 AM
Duh! of course they are both strings :)
I think the :spacer_template was going be moved into a plugin or something, not totally sure. Waiting for Pratik's response.
-
Pratik September 12th, 2008 @ 08:48 AM
- Title changed from [PATCH] render partial collection with inline spacer to render partial collection with inline spacer
- State changed from new to wontfix
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>