#575 ✓wontfix
Bryan Larsen

Want to remove the flash message "The <model> was created successfully"

Reported by Bryan Larsen | December 8th, 2009 @ 08:45 PM

I want to remove the flash message "The was created successfully". I could clear the flash after the call to hobo_create, but it seems to me that if the user passes a block to hobo_create, they want finer control over the controller behaviour and should be setting the flash themselves.

Comments and changes to this ticket

  • Matt Jones

    Matt Jones December 8th, 2009 @ 08:53 PM

    Doesn't clearing the flash in the block passed to hobo_create work as well? I can see a number of situations where you don't care about the flash but want to pass that block - redirecting based on attributes of the new object, for instance.

  • Bryan Larsen

    Bryan Larsen December 10th, 2009 @ 06:14 AM

    • State changed from “new” to “wontfix”
    • Tag set to flash, model-controller

    I was having trouble clearing the flash as you suggested. But on a simpler test case, it works fine. In fact, we're better off without my suggested change, because now I can just go

    def update
      hobo_update do
        flash[:notice] = nil
      end
    end
    

    and because I didn't render, hobo also executes the no-block-provided code.

    I'll attach the patch here, but I won't apply it to hobo.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Attachments

Pages