Thursday, May 20, 2010

Ruby: Inserting Table Data into your messages

So I wanted to improve the UI of a feature that I was building by having the alert include the actual name of what I modifying and at what time. There is a specific syntax used to insert it and it looks like this within the control structure.

if var.updated_at

show.now[:alert] = "Your client, #{var.name} came at #{var.modified_time}."

end

No comments:

Post a Comment