Validations + Urgent

Discussion in 'Ruby' started by Hemant Bhargava, Nov 13, 2010.

  1. 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, :eek: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 :eek: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/.
     
    Hemant Bhargava, Nov 13, 2010
    #1
    1. Advertisements

  2. 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, :eek: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 :eek: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
     
    Robert Klemme, Nov 13, 2010
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon Paugh

    vbscript validations and .NET

    Jon Paugh, Dec 17, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    517
    bruce barker
    Dec 17, 2003
  2. Gary Smith

    Validations......

    Gary Smith, Feb 15, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    722
  3. DotNetJunkies User
    Replies:
    1
    Views:
    448
    Teemu Keiski
    May 1, 2004
  4. Murat YILMAZ

    Page client validations are not working...

    Murat YILMAZ, Oct 28, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,962
    Scott Allen
    Oct 31, 2004
  5. rvsraghu

    Datalist validations. . .

    rvsraghu, Apr 2, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    614
    Karl Seguin
    Apr 2, 2005
  6. anil kumar via .NET 247

    how to close asp.net web page with out effect of validations

    anil kumar via .NET 247, Apr 7, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    6,737
    Shawn H. Mesiatowsky
    Apr 7, 2005
  7. David Lozzi
    Replies:
    3
    Views:
    368
    David Lozzi
    Apr 15, 2005
  8. =?Utf-8?B?UElTQ0VT?=

    Validations for TIME

    =?Utf-8?B?UElTQ0VT?=, May 9, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    341
    Kevin Spencer
    May 9, 2005
Loading...