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. Advertising

  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. Advertising

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:
    441
    bruce barker
    Dec 17, 2003
  2. Gary Smith

    Validations......

    Gary Smith, Feb 15, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    571
  3. DotNetJunkies User
    Replies:
    1
    Views:
    363
    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,829
    Scott Allen
    Oct 31, 2004
  5. rvsraghu

    Datalist validations. . .

    rvsraghu, Apr 2, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    463
    Karl Seguin
    Apr 2, 2005
Loading...

Share This Page