Forum: Ruby on Rails flash message == if statement over-riding ??

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.
F175acd4403fd78c0ba6820509238ebc?d=identicon&s=25 ByENNEN (Guest)
on 2007-05-02 21:00
(Received via mailing list)
Here is the code I need help with:

http://pastie.caboo.se/58307

My problem is I have a custom save message throughout my app.  My
client needs the message to be different for one save in the app. If
you click on the pastie you will see in the code where I'm having
problems.  I know this is probably something stupid... but I am new to
this.  Thanks for any help you guys can provide!
F175acd4403fd78c0ba6820509238ebc?d=identicon&s=25 ByENNEN (Guest)
on 2007-05-02 21:07
(Received via mailing list)
this is a comment from a different user group:

How do you know the first if statement is skipped? The next one
overwrites the flash messages in all cases so it doesn't matter what
you did in the first block.

how would i redo the code??
This topic is locked and can not be replied to.