Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Validations + Urgent

Reply
Thread Tools

Validations + Urgent

 
 
Hemant Bhargava
Guest
Posts: n/a
 
      11-13-2010
Hello Champs,

I am saving/updating same object on different pages with some
validations. On first page, I save my object and on 2nd, 3rd, 4th pages
i update the same object. So at first page i am using
validates_inclusion_of :in => [] etc, and in second page(updating), i am
using validates_presence_of :abc, n => [:update]. But while i update
on 3rd page also, i need some validations but i can not find out which
function should i use.
If i use validates_presence_of .. then this validations is reflecting on
save page, And if i use validates_presence_of n => [:update] then that
is reflecting on update page. so i am in a bit of dilemma that what
should i use.

Please help me in getting rid of this problem.
Thanks in advance.

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Robert Klemme
Guest
Posts: n/a
 
      11-13-2010
On 11/13/2010 09:45 AM, Hemant Bhargava wrote:
> Hello Champs,
>
> I am saving/updating same object on different pages with some
> validations. On first page, I save my object and on 2nd, 3rd, 4th pages
> i update the same object. So at first page i am using
> validates_inclusion_of :in => [] etc, and in second page(updating), i am
> using validates_presence_of :abc, n => [:update]. But while i update
> on 3rd page also, i need some validations but i can not find out which
> function should i use.
> If i use validates_presence_of .. then this validations is reflecting on
> save page, And if i use validates_presence_of n => [:update] then that
> is reflecting on update page. so i am in a bit of dilemma that what
> should i use.
>
> Please help me in getting rid of this problem.
> Thanks in advance.


Ruby != Rails. Please ask in the appropriate place.

Cheers

robert
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Datalist validations. . . rvsraghu ASP .Net 3 04-02-2005 02:36 PM
Page client validations are not working... Murat YILMAZ ASP .Net 1 10-31-2004 03:41 PM
Not able to popup the calendar due to PostBack untill al the validations have been met DotNetJunkies User ASP .Net 1 05-01-2004 07:14 AM
Validations...... Gary Smith ASP .Net 5 02-16-2004 12:02 AM
vbscript validations and .NET Jon Paugh ASP .Net 1 12-17-2003 07:17 PM



Advertisments