Forum: Ruby on Rails validates_uniqueness_of

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ishara G. (Guest)
on 2009-02-20 05:49
(Received via mailing list)
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
Vijayendra A. (Guest)
on 2009-02-20 07:17
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 ?
Ishara G. (Guest)
on 2009-02-20 08:54
(Received via mailing list)
i use post method,
MaD (Guest)
on 2009-02-20 09:06
(Received via mailing list)
> 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.
This topic is locked and can not be replied to.