Exception: RailsNoDatabaseInView::DatabaseAccessFromViewError
- Inherits:
-
StandardError
- Object
- StandardError
- RailsNoDatabaseInView::DatabaseAccessFromViewError
- Defined in:
- lib/rails_no_database_in_view/database_access_from_view_error.rb
Instance Method Summary collapse
-
#initialize(error) ⇒ DatabaseAccessFromViewError
constructor
A new instance of DatabaseAccessFromViewError.
- #message ⇒ Object
Constructor Details
#initialize(error) ⇒ DatabaseAccessFromViewError
Returns a new instance of DatabaseAccessFromViewError.
4 5 6 |
# File 'lib/rails_no_database_in_view/database_access_from_view_error.rb', line 4 def initialize error @error = error end |
Instance Method Details
#message ⇒ Object
8 9 10 11 12 13 |
# File 'lib/rails_no_database_in_view/database_access_from_view_error.rb', line 8 def "A database call was made from the view.\n" \ "The database had been temporarily disable while rendering the view so we could catch situations like this.\n" \ "\nOriginal error:\n" \ "#{@error.} (#{@error.class})" end |