lib/ballast/concerns/errors_handling.rb in ballast-1.1.0 vs lib/ballast/concerns/errors_handling.rb in ballast-1.1.1

- old
+ new

@@ -3,11 +3,11 @@ # Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php. # module Ballast module Concerns - # A concern to handle errors. + # A concern to handle errors. It requires the Ajax concern. module ErrorsHandling extend ActiveSupport::Concern # Handles an error in the application. # @@ -19,10 +19,10 @@ if @error.is_a?(Lazier::Exceptions::Debug) then @error_title = "Debug" @error_code = 503 elsif @error.is_a?(Hash) then - @error_title = title + @error_title = @error[:title] || title @error_code = @error[:status] @error_message = @error[:error] else @error_title = "Error - #{@error.class.to_s}" @error_code = 500 \ No newline at end of file