Frederick Cheung
2007-Apr-16 11:02 UTC
Telling whether action was performed from after/around _filt
Hi, We currently have a filter (we''ve tried both after and around filters) that logs that the user has performed certain actions. We''d like to be able to tell from the around_filter whether or not the action was actually performed: if a before_filter aborted the chain such that the action wasn''t actually performed we don''t want to record that the user did take the action (eg a filter that redirects the user to a page saying their session has expired). I''ve looked around, but I can''t find anything which allows us to do this. Controllers do have a @before_filter_chain_aborted but there isn''t an accessor for that. performed? looks like it might do the trick, but it just reports whether a render or a redirect have occured (and in general our problem occurs with filters that redirect the user). Any idea for this ? Fred -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---