I have an e-mail-type app where users will see either a list of message
headers, or a single message. From either view, they need to be able to
delete a message.
When delete is called from the list view, I use :loading =>
visual_effect(:fade, ‘my_id’), then in the controller the record is
actually deleted and nothing needs to be rendered back. This works
However, if delete is called from the expanded message view, I need the
controller to render the list of messages again.
Any suggestions on how I can either tell from the controller where a
request came from, or else pass something with the link_to_remote? Is
there a :locals parameter? It doesn’t make sense to have 2 methods in
the controller - say a delete_from_list and delete_from_message.