Sha256: 43d147b261d2f53329b8fcb057dc16f95783c02418849972409c5c8859540a10

Contents?: true

Size: 512 Bytes

Versions: 2

Compression:

Stored size: 512 Bytes

Contents

require_dependency "avo/application_controller"

module Avo
  class DashboardsController < ApplicationController
    before_action :set_dashboard, only: :show

    def show
    end

    private

    def set_dashboard
      @dashboard_class = Avo::App.get_dashboard_by_id params[:id]

      raise ActionController::RoutingError.new("Not Found") if @dashboard_class.nil? || @dashboard_class.is_hidden?

      @dashboard = @dashboard_class.new.hydrate(params: params) if @dashboard_class.present?
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
avo-2.11.3.pre.3 app/controllers/avo/dashboards_controller.rb
avo-2.11.3.pre.2 app/controllers/avo/dashboards_controller.rb