Ruby 'if' condition in rjs
Posted
by ash34
on Stack Overflow
See other posts from Stack Overflow
or by ash34
Published on 2010-04-29T08:07:19Z
Indexed on
2010/04/29
8:17 UTC
Read the original article
Hit count: 448
Hi,
I want to insert a user in the userlist only if the user object (@row) is not nil. How do I do the insert conditionally in an rjs template?
page.insert_html :bottom, :userlist, render(:partial => "user", :locals => { :user => @row, :myid => @row.id })
thanks much.
© Stack Overflow or respective owner