1 Answer
1

If you want the verification to come back to the registration page, you should make it a dynamic page.

The other problem with a static page in the public directory is that your links all become hardcoded, so if you application ever lives off the domain root (i.e. example.com/app) the links in that static file could be wrong.

Additionally, if you ever need to move your images to a different host, you lose the advantages of the image_tag.

Only use static resources if you know things won't change and you need speed. If your dynamic pages are too slow, you can cache them, or you might be doing something wrong.

UPDATE: (to address the first comment)

You can't use the rails functions to build your URLs when you are in the public folder. If you need rails generated URLs in your javascript, trigger them from a rails view page.
Generally, I'll do the following: