If/else in index.rss.builder

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 + ‘

***

’ +

I know how to do if/else in views, but not here.

Thanks

On Sep 29, 3:14 pm, Martin P [email protected] 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 + ‘

***

’ +

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs