Class: Admin::Carousel::BaseController
- Inherits:
-
Object
- Object
- Admin::Carousel::BaseController
show all
- Defined in:
- app/controllers/admin/carousel/base_controller.rb
Instance Method Summary
collapse
Instance Method Details
#load_carousel ⇒ Object
3
4
5
6
7
8
|
# File 'app/controllers/admin/carousel/base_controller.rb', line 3
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
|