Building Dynamic DOM Element IDs for RJS Templates


#1

My element IDs are constructed using the object id. So . . .

<%= link_to_remote "Do Foo", :url =>{:action => "do", :id => foo.id} %>

How do, and can I, build that id in the RJS template?

Also, can anyone recommend a good Ruby syntax book that would help me
out with Rails? I know Java, so I don’t want a rehash of OO
programming, I just want the meat of using Ruby.

Thx.


#2

Arch S. wrote:

My element IDs are constructed using the object id. So . . .

<%= link_to_remote "Do Foo", :url =>{:action => "do", :id => foo.id} %>

How do, and can I, build that id in the RJS template?

Also, can anyone recommend a good Ruby syntax book that would help me
out with Rails? I know Java, so I don’t want a rehash of OO
programming, I just want the meat of using Ruby.

Thx.

For learning Ruby you can’t go wrong with the Pickaxe book–Programming
Ruby by Dave T., from the Pragmatic Programmers.

Jeff C.man


#3

On 4/17/06, Jeff C.man removed_email_address@domain.invalid wrote:

Also, can anyone recommend a good Ruby syntax book that would help me
out with Rails? I know Java, so I don’t want a rehash of OO
programming, I just want the meat of using Ruby.

Thx.

For learning Ruby you can’t go wrong with the Pickaxe book–Programming
Ruby by Dave T., from the Pragmatic Programmers.

Or “Ruby for Rails” by David A. Black. I highly recommend it.