Sha256: 121011b5c628d1e66c91ccbf3e1347cc4ae224a233fecd84f1acdbbd6cb46246

Contents?: true

Size: 332 Bytes

Versions: 3

Compression:

Stored size: 332 Bytes

Contents

class Admin::Carousel::BaseController < ComfyCarousel.config.admin_controller.to_s.constantize
  
  def load_carousel
    @carousel = Carousel::Carousel.find(params[:carousel_id] || params[:id])
  rescue ActiveRecord::RecordNotFound
    flash[:error] = 'Carousel not found'
    redirect_to admin_carousel_carousels_path
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
comfy_carousel-0.0.3 app/controllers/admin/carousel/base_controller.rb
comfy_carousel-0.0.2 app/controllers/admin/carousel/base_controller.rb
comfy_carousel-0.0.1 app/controllers/admin/carousel/base_controller.rb