This project is archived and is in readonly mode.
Add ActionView::Helpers::TextHelper#current_cycle to return the current cycle for better design options.
Reported by Ken Collins | June 14th, 2008 @ 07:38 PM
Access to the current value returned by cycle() helps in designing tables that have col and row spans beyond the normal 1 row zebra strip. The current_cycle() method uses the new Cycle#current_value method to return just that. The Cycle class was also re-factored a bit to keep things DRY, specifically the methods for getting the next and previous index.
Tests included cover the cases for returning the current cycle when the cycle object has a name, or not, or even more than two items. Tests included also show that calling current_cycle accidently before a cycle object was created is safe to do, just like reset_cycle.
This addition will give designers a broader range of options with cycle. Especially when needing a simple way to get the current cycle in a partial rendered further below the initial cycle() call.
Comments and changes to this ticket
-
Jeremy Kemper June 16th, 2008 @ 12:24 PM
- Milestone cleared.
- State changed from new to open
- Assigned user set to Jeremy Kemper
-
Brennan Dunn June 16th, 2008 @ 04:29 PM
I can definitely see how being able to access the current value of a cycle would be useful, especially in the event that the value of the current cycle could go beyond setting an individual class name, etc. +1
-
Chris Lloyd August 26th, 2008 @ 09:24 AM
- Tag set to actionpack, actionview, current_cycle, cycle, patch, texthelper
+1 tests pass
-
Repository August 28th, 2008 @ 07:08 AM
- State changed from open to resolved
(from [f277e1d8fddfa417104c6fe095c15559f0c8713d]) Added TextHelper#current_cycle to return the current cycle for better design options.
[#417 state:resolved]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net http://github.com/rails/rails/co...
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>
People watching this ticket
Attachments
Referenced by
- 417 Add ActionView::Helpers::TextHelper#current_cycle to return the current cycle for better design options. [#417 state:resolved]
- 1155 [Prototype 1.6.0.3] IE throws js error on unload in Events.element This is now reported as http://prototype.lighthouseapp.c...