>
> I'm kind of a newbie on RoR and on this group and I was wondering if
> someone could help to clean this bit of code:
>

How about something as simple as:

<% for image_filename in ["hide.png", "top.png", "bottom.png"] %>
  <%= link_to_remote (image_tag(image_filename, :size=>"16x16"),
                                               :url=>"/message/#{message.id
}/hide",
                                               :method=>"post",

 :before=>"Effect.Fade(this.parentNode.parentNode, {duration:
0.5});

 Effect.BlindUp(this.parentNode.parentNode, {duration: 0.5})")
%>
<% end %>

Alternatively, make a helper method and call that each time.

Cheers,


Andy

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