Class: Avo::ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Avo::ApplicationController
- Includes:
- ApplicationHelper, Concerns::Breadcrumbs, InitializesAvo, UrlHelpers, Pagy::Backend, Pundit, Pundit::Authorization
- Defined in:
- app/controllers/avo/application_controller.rb
Direct Known Subclasses
ActionsController, AttachmentsController, BaseController, DebugController, HomeController, PrivateController, SearchController
Instance Method Summary collapse
- #_current_user ⇒ Object
- #context ⇒ Object
- #exception_logger(exception) ⇒ Object
-
#turbo_frame_request? ⇒ Boolean
This is coming from Turbo::Frames::FrameRequest module.
Methods included from Concerns::Breadcrumbs
#add_breadcrumb, #avo_breadcrumbs
Methods included from UrlHelpers
#edit_resource_path, #new_resource_path, #preview_resource_path, #related_resources_path, #resource_attach_path, #resource_detach_path, #resource_path, #resource_view_path, #resources_path
Methods included from ApplicationHelper
#a_button, #a_link, #button_classes, #decode_filter_params, #empty_state, #encode_filter_params, #get_model_class, #input_classes, #mount_path, #number_to_social, #render_license_warning, #root_path_without_url, #svg, #white_panel_classes
Methods included from ResourcesHelper
#field_wrapper, #filter_wrapper, #index_field_wrapper, #item_select_all_input, #item_selector_init, #item_selector_input, #resource_grid, #resource_table
Methods included from InitializesAvo
Instance Method Details
#_current_user ⇒ Object
49 50 51 |
# File 'app/controllers/avo/application_controller.rb', line 49 def _current_user instance_eval(&Avo.configuration.current_user) end |
#context ⇒ Object
53 54 55 |
# File 'app/controllers/avo/application_controller.rb', line 53 def context instance_eval(&Avo.configuration.context) end |
#exception_logger(exception) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'app/controllers/avo/application_controller.rb', line 36 def exception_logger(exception) respond_to do |format| format.html { raise exception } format.json { render json: { errors: exception.respond_to?(:record) && exception.record.present? ? exception.record.errors : [], message: exception., traces: exception.backtrace }, status: ActionDispatch::ExceptionWrapper.status_code_for_exception(exception.class.name) } end end |
#turbo_frame_request? ⇒ Boolean
This is coming from Turbo::Frames::FrameRequest module. Exposing it as public method
59 60 61 |
# File 'app/controllers/avo/application_controller.rb', line 59 def turbo_frame_request? super end |