Ajax pop up box using Ruby on Rails
问题 This is a pretty basic question but I can't find a good answer for it. I have a page in my Rails app where there are many objects that can be 'flagged'. Clicking the flag button should display a little box with a confirmation, little form, etc. The trouble is I can't figure out how to do this using RJS templates. I've been using page.insert_html but this requires an ID. In order to make this work I had to assign each thing that can be flagged a unique ID. This doesn't seem very clean and