search for: clear_messages

Displaying 1 result from an estimated 1 matches for "clear_messages".

2006 Aug 18
4
Button on view
Hi, I have a page containing 3 views (2 are partials). One of the partials needs to have a button that will clear a table called "messages" in the database. I can put a button like this "<%= button_to "Clear Messages", :action => ''clear_messages'' %>" and have the controller do "Message.delete_all". But the problem is that the controller would want to render a view, and I don''t want that to happen. I just want a particular action to occur in the backend without any changes to the page. Actually I woul...