Class: Adminpanel::SectionsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Adminpanel::SectionsController
- Defined in:
- app/controllers/adminpanel/sections_controller.rb
Instance Method Summary collapse
Methods included from GalleryActions
#add_to_gallery, #remove_image
Methods included from TwitterActions
Methods included from FacebookActions
#fb_choose_page, #fb_publish, #fb_save_token
Methods included from SortableActions
Methods included from RestActions
#create, #destroy, #new, #show
Methods included from SessionsHelper
#current_user, #current_user=, #sign_in, #sign_out, #signed_in?
Instance Method Details
#edit ⇒ Object
7 8 9 |
# File 'app/controllers/adminpanel/sections_controller.rb', line 7 def edit @section = Section.find(params[:id]) end |
#index ⇒ Object
3 4 5 |
# File 'app/controllers/adminpanel/sections_controller.rb', line 3 def index @sections = Section.all end |
#update ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/adminpanel/sections_controller.rb', line 11 def update @section = Section.find(params[:id]) if @section.update(section_params) redirect_to section_path(@section), notice: 'La seccion se ha actualizado' else render 'edit' end end |