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.
Dcf093a36c8a7e286dbefe10454813e1?d=identicon&s=25 Ishara Gunathilake (Guest)
on 2009-02-20 04: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
7a81984c12a5d47bad8f4e7f9c75b0b7?d=identicon&s=25 Vijayendra Achar (vijayjnnce)
on 2009-02-20 06:17
Ishara Gunathilake 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 ?
Dcf093a36c8a7e286dbefe10454813e1?d=identicon&s=25 Ishara Gunathilake (Guest)
on 2009-02-20 07:54
(Received via mailing list)
i use post method,
80e4cb97cae5c8d745f72337d93fd8f2?d=identicon&s=25 MaD (Guest)
on 2009-02-20 08: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.