Sha256: 55df7151874ebe15c310bd7e94cfbb01f46fb079cc34eaa4e5fb16ea31ab9e35

Contents?: true

Size: 563 Bytes

Versions: 27

Compression:

Stored size: 563 Bytes

Contents

require_dependency "avo/application_controller"

module Avo
  class DashboardsController < ApplicationController
    before_action :set_dashboard

    def show
    end

    def card
      @card = @dashboard.item_at_index(params[:index].to_i).tap do |card|
        card.hydrate(dashboard: @dashboard, params: params)
      end
    end

    private

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

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

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
avo-2.7.0 app/controllers/avo/dashboards_controller.rb
avo-2.6.1.pre.2 app/controllers/avo/dashboards_controller.rb
avo-2.6.1.pre.1 app/controllers/avo/dashboards_controller.rb
avo-2.6.0 app/controllers/avo/dashboards_controller.rb
avo-2.5.2.pre.7 app/controllers/avo/dashboards_controller.rb
avo-2.5.2.pre.6 app/controllers/avo/dashboards_controller.rb
avo-2.5.2.pre.5 app/controllers/avo/dashboards_controller.rb
avo-2.5.2.pre.4 app/controllers/avo/dashboards_controller.rb
avo-2.5.2.pre.3 app/controllers/avo/dashboards_controller.rb
avo-2.5.2.pre.2 app/controllers/avo/dashboards_controller.rb
avo-2.5.2.pre.1 app/controllers/avo/dashboards_controller.rb
avo-2.5.1 app/controllers/avo/dashboards_controller.rb
avo-2.5.0 app/controllers/avo/dashboards_controller.rb
avo-2.4.1 app/controllers/avo/dashboards_controller.rb
avo-2.4.0 app/controllers/avo/dashboards_controller.rb
avo-2.3.1.pre.6 app/controllers/avo/dashboards_controller.rb
avo-2.3.1.pre.5 app/controllers/avo/dashboards_controller.rb
avo-2.3.1.pre.4 app/controllers/avo/dashboards_controller.rb
avo-2.3.1.pre.3 app/controllers/avo/dashboards_controller.rb
avo-2.3.1.pre.2 app/controllers/avo/dashboards_controller.rb