Hi, In learning ruby on rails I've created a blog site. When the user adds a post via AJAX, the following rjs gets called:
page.replace_html 'posts', :partial => @posts
page.visual_effect :Highlight, 'post_' + @post.id.to_s
However, the highlight isn't happening.. neither is any sort of effect even a hide.
Clues:
- It works if I just do an insert_html for just the new post (but I want to update the whole list of posts at this time)
- If I hard code the id to the next id in the sequence, it doesn't work on the post, but it does work on the next post. { ex.. hardcode post_100... no highlight on submit 100, highlight 100 on submit 101 }
- Alert shows that 'post_' + @post.id.to_s is what is expected ( post_100, etc )
Any ideas or debugging suggestions?
Thanks, Orlando