Is there a best practice way to prevent duplicate comments (or whatever
the model may be) submissions from a remote_form_for? Maybe a time-based
validation, like the way WordPress seems to prevent comments being
posted less than 60 seconds apart(?). At the moment, my app allows users
to double click (or more) on the ‘Submit’ button and, therefore,
duplicate their comment very easily.
I don’t have a validates uniqueness of on the comment.user_id and
comment.body because it wouldn’t be appropriate in this app - we want
people to be able to post the same comment more than once, at least to a
certain extent. Is there another way to validate this? Or do I need to
resort to deactivating/hiding the submit button after a requested is
made and only showing it again once the comment has been posted?