I like to determine if a visitor has already submitted a form.
I was thinking of doing a couple of things:
- cookie
- ipaddress
- requiring login (much less desirable since the signup barrier might dissuade visitors)
Is there a ROR gem for this? If so please post a link.
Thanks
How are you intending on saving the data?
If you’re planning on putting this into a model, great. Then you can create some form of unique value (I’d probably base it on an MD5 of IP address and user agent), store that in a field, and require it to be unique for each submission.
There probably is a gem for this, but it’s pretty simple anyway.
If you’re not putting it into a model, I think we need more details of what your intentions are.