Hi,

I'm new with Rails and I'm having a sort of a trouble with typus (I
know that there's a Typus group but I think that my problem may happen
everywhere).
In Typus as default when I create a new record, it automatically
renders a form with 3 buttons

Save and new | Save and continue editing | Save

I have to create a button "Exit without save", I made it appear but in
my model I made some validations like
:presence => true

and when I click on "Exit without save" it appears a message "(field)
can't be blank"

How can I override this?

Maybe someone know how to do this without Typus, It could help too :)

Thanks

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Adrian Caceres at Nov 2, 2011 at 12:36 pm
    Don't use Typus but the error you are getting indicates the 'exit
    without save' is still trying to save the object.
    Change the method of your button to a get.

    adrian
    On 11/01/2011 09:54 PM, JavierQQ wrote:
    Hi,

    I'm new with Rails and I'm having a sort of a trouble with typus (I
    know that there's a Typus group but I think that my problem may happen
    everywhere).
    In Typus as default when I create a new record, it automatically
    renders a form with 3 buttons

    Save and new | Save and continue editing | Save

    I have to create a button "Exit without save", I made it appear but in
    my model I made some validations like
    :presence => true

    and when I click on "Exit without save" it appears a message "(field)
    can't be blank"

    How can I override this?

    Maybe someone know how to do this without Typus, It could help too :)

    Thanks
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedNov 2, '11 at 4:54a
activeNov 2, '11 at 12:36p
posts2
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Adrian Caceres: 1 post JavierQQ: 1 post

People

Translate

site design / logo © 2021 Grokbase