cubiqsys-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Jan-08 12:11 UTC
How do I call the exception_notifier from my own rescue_action_in_public ?
Hi all!
I''ve been using the excellent exception_nofitier (
http://agilewebdevelopment.com/plugins/exception_notifier ) a while
now, but want to change the way it interacts with my application.
I now have my own rescue_action_in_public which takes me to a "Error.
Describe the problem"-page. After filling out some user data the user
can then click on submit. This is where the problem comes:
I want to trigger the exception_notifier when I submit my form. I have
tried to save the variables exception and request and then simply
redefine them so they appear as when the error occurred.
My code goes something like this:
#controller/application.rb
def rescue_action_in_public(exception)
@saved_exception = exception
@saved_request = request
render :partial => "errorpage"
end
After pushing the form in errorpage i go to this:
#controller/application.rb
def submit_error()
request = params[:saved_request]
ExceptionNotifiable::rescue_action_in_public(params[:saved_exception])
end
However, I keep getting errors like
undefined method `rescue_action_in_public'' for
ExceptionNotifiable:Module even though they are in that module. I have
included the ExceptionNotifiable and also tried to make the methods
non-private.
Anyone can help me with this? How can I trigger the ExceptionNotifier
myself?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
