Wednesday, September 29, 2010

[Rails] Re: If/else in index.rss.builder

On Sep 29, 3:14 pm, Martin P <m.p.pet...@gmail.com> wrote:
> Hi. I'm new to Rails. It's my first post here.
>
> So I have an index.rss.builder (http://gist.github.com/602773)
> On line 10 I want to check for an excerpt before showing:
>
> post.excerpt + '<p>***</p>' +
>
> I know how to do if/else in views, but not here.
>
it's ever simpler than a view because a .builder file is pure ruby - a
normal if/else is all you need.

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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate