On 9 Oct 2008, at 15:14, David Trasbo wrote:
>
>
> In this case the partial is longer than the {some_partial} and some of
> the second instance of the partial disappears. How can I force Ruby to
> replace the characters between to positions with a longer string?You could fiddle with insert or something like that. There is another way of doing it: Say you've determine the two sections to replace are between positions 20 and 40 and then between 100 and 120 you would do result = "" result << original_string[0, 20] result << render of first section result << original_string[40, 60] result << render of last section result << original_string[120, original_string.length - 120 Fred --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

