Walter McGinnis wrote:
> On Wed, Oct 21, 2009 at 5:13 AM, Marnen Laibow-Koser
> <[email protected]> wrote:
>>
>> Srinath A. wrote:
>>> hi,
>>>
>>> My file contains 5000 lines in which only 1000 lines are custom .
>>> So if use builder i should write by hand all these lines .
>>
>> In your case, ERb might work better than Builder, or you could use a
>> Builder partial for the custom stuff.
> 
> Here's an example of using builder (in this case Nokogiri's flavor)
> from within a .erb template as Marmen suggests.
> 
> http://github.com/kete/kete/blob/master/app/views/search/rss.xml.erb

Actually, I was suggesting not using Builder at all, in order that the 
3000 static lines could just be part of an ERb file.  The ERb could 
render the XML without needing Builder.  But your approach is very 
interesting, and I'll keep it in mind.

I do have a question, though: what's the advantage of embedding Builder 
in ERb as you did, rather than having the ERb file call a Builder 
partial?

> 
> Cheers,
> Walter

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to