#5 ✓resolved
Brian Pokosh

flash messages

Reported by Brian Pokosh | May 22nd, 2009 @ 12:08 AM

When I do an update action using javascript the flash message still gets set (Resource successfully updated!) and will show up out of place on the next html request. Would it make sense to only call set_flash if the format is html?

Comments and changes to this ticket

  • Ben Johnson

    Ben Johnson May 22nd, 2009 @ 02:32 AM

    • State changed from “new” to “open”

    For most cases you are probably right. I actually have a little javascript snippet to insert the flash on ajax calls. Let me think about this a little. Regardless, you should have your own ResourceController that all of your "resource controllers" are extending from. You could disregard the flash there manually until I release a fix.


  • Ben Johnson

    Ben Johnson June 3rd, 2009 @ 04:23 AM

    • State changed from “open” to “resolved”

    I actually think calling it in the action itself is fine. If you want to customize the default behavior you can easily do this in a parent controller. I do this for all of my apps, in fact some of them have quite a few customizations, so it's a bad thing. The problem you present is more of an application design decision. Thanks for your input though, if you have any thing else, please let me know, because I am still trying to develop it.

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 ยป

Adds context into the RESTful development style.

People watching this ticket