Class: Avo::ChartsController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseApplicationController
- ApplicationController
- BaseController
- Avo::ChartsController
- Defined in:
- app/controllers/avo/charts_controller.rb
Constant Summary
Constants included from Avo::Concerns::FindAssociationField
Avo::Concerns::FindAssociationField::ASSOCIATIONS
Instance Method Summary collapse
Methods inherited from BaseController
#create, #destroy, #edit, #index, #new, #preview, #show, #update
Methods included from Avo::Concerns::FiltersSessionHandler
#cache_resource_filters?, #fetch_filters, #filters_from_params, #filters_from_session, #filters_session_key, #reset_filters, #save_filters_to_session
Methods inherited from BaseApplicationController
#exception_logger, #turbo_frame_request?
Methods included from Avo::Concerns::FindAssociationField
Methods included from Avo::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, #card_classes, #chart_color, #decode_filter_params, #empty_state, #encode_filter_params, #frame_id, #get_model_class, #input_classes, #mount_path, #number_to_social, #possibly_rails_authentication?, #render_license_warning, #root_path_without_url, #svg, #white_panel_classes
Methods included from ResourcesHelper
#field_wrapper, #filter_wrapper, #index_field_wrapper, #item_selector_data_attributes, #resource_grid, #resource_show_path, #resource_table
Methods included from CommonController
#default_url_options, #extra_default_url_options
Methods included from InitializesAvo
#_current_user, #context, #init_app
Instance Method Details
#distribution_chart ⇒ Object
5 6 7 8 9 10 |
# File 'app/controllers/avo/charts_controller.rb', line 5 def distribution_chart @values_summary = resource.model_class.group(params[:field_id]).reorder("count_all desc").count @field_id = params[:field_id] render "avo/partials/distribution_chart", layout: "avo/blank" end |