Class: Admin::SlideshowsController
- Inherits:
-
AdminController
- Object
- AdminController
- Admin::SlideshowsController
- Defined in:
- app/controllers/c/admin/slideshows_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/controllers/c/admin/slideshows_controller.rb', line 12 def create if @slideshow.save redirect_to [:edit, @slideshow], notice: 'Slideshow created' else render :new end end |
#index ⇒ Object
8 9 10 |
# File 'app/controllers/c/admin/slideshows_controller.rb', line 8 def index @slideshows = @slideshows.ordered end |
#update ⇒ Object
20 21 22 23 24 25 26 |
# File 'app/controllers/c/admin/slideshows_controller.rb', line 20 def update if @slideshow.update() redirect_to [:edit, @slideshow], notice: 'Slideshow updated' else render :new end end |