Sha256: d41a349ff42716aebcdf951021059352099dc60bfbf155ed81964af72e55c4bf
Contents?: true
Size: 616 Bytes
Versions: 63
Compression:
Stored size: 616 Bytes
Contents
require_dependency "avo/application_controller" module Avo class CardsController < ApplicationController before_action :set_dashboard, only: :show before_action :set_card, only: :show def show 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 def set_card @card = @dashboard.item_at_index(params[:index].to_i).tap do |card| card.hydrate(dashboard: @dashboard, params: params) end end end end
Version data entries
63 entries across 63 versions & 1 rubygems