Sha256: 254e5e1fb860ea5cb22c6ca7b6789065d5a09bdbfee29f00e13102767683d0d7

Contents?: true

Size: 572 Bytes

Versions: 77

Compression:

Stored size: 572 Bytes

Contents

require_dependency "avo/application_controller"

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

    def show
      @page_title = @dashboard.name
    end

    private

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

      authorized = Avo::Hosts::BaseHost.new(block: @dashboard.authorize).handle
      raise Avo::NotAuthorizedError.new if !authorized

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

Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
avo-2.53.0 app/controllers/avo/dashboards_controller.rb
avo-2.52.0 app/controllers/avo/dashboards_controller.rb
avo-2.49.0 app/controllers/avo/dashboards_controller.rb
avo-2.48.0 app/controllers/avo/dashboards_controller.rb
avo-2.47.0 app/controllers/avo/dashboards_controller.rb
avo-2.46.0 app/controllers/avo/dashboards_controller.rb
avo-2.45.0 app/controllers/avo/dashboards_controller.rb
avo-2.44.0 app/controllers/avo/dashboards_controller.rb
avo-2.43.0 app/controllers/avo/dashboards_controller.rb
avo-2.42.2 app/controllers/avo/dashboards_controller.rb
avo-2.42.1 app/controllers/avo/dashboards_controller.rb
avo-2.42.0 app/controllers/avo/dashboards_controller.rb
avo-2.41.0 app/controllers/avo/dashboards_controller.rb
avo-2.40.0 app/controllers/avo/dashboards_controller.rb
avo-2.39.0 app/controllers/avo/dashboards_controller.rb
avo-2.38.0 app/controllers/avo/dashboards_controller.rb
avo-2.37.2 app/controllers/avo/dashboards_controller.rb
avo-2.37.1 app/controllers/avo/dashboards_controller.rb
avo-2.37.0 app/controllers/avo/dashboards_controller.rb
avo-2.36.3 app/controllers/avo/dashboards_controller.rb