Class: Spina::Admin::ResourcesController

Inherits:
AdminController show all
Defined in:
app/controllers/spina/admin/resources_controller.rb

Instance Method Summary collapse

Methods inherited from AdminController

#current_admin_path

Instance Method Details

#editObject



11
12
13
14
# File 'app/controllers/spina/admin/resources_controller.rb', line 11

def edit        
  add_breadcrumb @resource.label, spina.admin_resource_path(@resource)
  add_breadcrumb t('spina.edit')
end

#showObject



7
8
9
# File 'app/controllers/spina/admin/resources_controller.rb', line 7

def show        
  add_breadcrumb @resource.label
end

#updateObject



16
17
18
19
20
21
22
# File 'app/controllers/spina/admin/resources_controller.rb', line 16

def update        
  if @resource.update(resource_params)
    redirect_to spina.admin_resource_path(@resource)
  else
    render :edit
  end
end