Validates_uniqueness_of


#1

i have a table called requests which save the data of a form.
but whenever i refresh the browser it again resubmit.it includes
the following fields

user_id, arrival, departure, date

this table can include same user_id, arrival, departure.so that
i couldn’t use the validates_uniqueness_of property. each column
should be independent of others.can anyone
suggest me a code which will avoid the resubmittion


#2

Ishara G. wrote:

i have a table called requests which save the data of a form.
but whenever i refresh the browser it again resubmit.it includes
the following fields

user_id, arrival, departure, date

this table can include same user_id, arrival, departure.so that
i couldn’t use the validates_uniqueness_of property. each column
should be independent of others.can anyone
suggest me a code which will avoid the resubmittion

Which method you are using ? GET or POST ?


#3

i use post method,


#4

can anyone suggest me a code which will avoid the resubmittion

you could just post your code. that way we have at least a chance to
find the error.