Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Solving issues with Rails 3 final #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/exception_notifier/notifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def exception_notification(env, exception)
@env = env
@exception = exception
@options = (env['exception_notifier.options'] || {}).reverse_merge(self.class.default_options)
@controller = env['action_controller.instance'] || MissingController.new
@kontroller = env['action_controller.instance'] || MissingController.new
@request = ActionDispatch::Request.new(env)
@backtrace = clean_backtrace(exception)
@sections = @options[:sections]
Expand All @@ -50,7 +50,7 @@ def exception_notification(env, exception)
instance_variable_set("@#{name}", value)
end

prefix = "#{@options[:email_prefix]}#{@controller.controller_name}##{@controller.action_name}"
prefix = "#{@options[:email_prefix]}#{@kontroller.controller_name}##{@kontroller.action_name}"
subject = "#{prefix} (#{@exception.class}) #{@exception.message.inspect}"

mail(:to => @options[:exception_recipients], :from => @options[:sender_address], :subject => subject) do |format|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* URL : <%= raw @request.url %>
* IP address: <%= raw @request.remote_ip %>
* Parameters: <%= raw @request.fitered_params.inspect %>
* Parameters: <%= raw @request.filtered_parameters.inspect %>
* Rails root: <%= raw Rails.root %>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
A <%= @exception.class %> occurred in <%= @controller.controller_name %>#<%= @controller.action_name %>:
A <%= @exception.class %> occurred in <%= @kontroller.controller_name %>#<%= @kontroller.action_name %>:

<%= raw @exception.message %>
<%= raw @backtrace.first %>
Expand All @@ -10,4 +10,4 @@ A <%= @exception.class %> occurred in <%= @controller.controller_name %>#<%= @co
"#{title}\n\n#{summary.gsub(/^/, " ")}\n\n"
end
end %>
<%= raw sections.join %>
<%= raw sections.join %>