Module: ExceptionHunter::ApplicationHelper
- Includes:
- Pagy::Frontend
- Defined in:
- app/helpers/exception_hunter/application_helper.rb
Instance Method Summary collapse
- #application_name ⇒ Object
- #display_action_button(title, error) ⇒ Object
- #route_for_button(title, error) ⇒ Object
Instance Method Details
#application_name ⇒ Object
5 6 7 8 9 10 11 |
# File 'app/helpers/exception_hunter/application_helper.rb', line 5 def application_name if defined? Rails.application.class.module_parent_name Rails.application.class.module_parent_name else Rails.application.class.parent_name end end |
#display_action_button(title, error) ⇒ Object
13 14 15 16 17 |
# File 'app/helpers/exception_hunter/application_helper.rb', line 13 def (title, error) (title.to_s, (title, error), class: "button button-outline #{title}-button", data: { confirm: "Are you sure you want to #{title} this error?" }).to_s end |
#route_for_button(title, error) ⇒ Object
19 20 21 22 23 24 25 |
# File 'app/helpers/exception_hunter/application_helper.rb', line 19 def (title, error) if title.eql?('ignore') ignored_errors_path(error_group: { id: error.id }) else resolved_errors_path(error_group: { id: error.id }) end end |