ret = <<EOS
<div class='right wrapper'>"
<strong>#{current_user_full_name}</strong>"
......
EOS

On Apr 12, 8:48 am, Burebista <[email protected]> wrote:
> Hi Rcommunity!
>
> small refactoring question here. This is code:
>
>  def login_block
>       ret = ""
>       ret += "<div class='right wrapper'>"
>       ret +="<strong>#{current_user_full_name}</strong>"
>       ret += "<span>|</span>"
>       ret += image_tag("logout.png")
>       ret += "<span>#{link_to t('logout'),'#',:id =>
> 'fb_logout'}</span>"
>       ret += "</div>"
>
>       ret.html_safe
>  end
>
> is there a way to get rid of those ugly ret += ?
>
> --
> Posted viahttp://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