Class: Dune::Admin::TagsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/dune/admin/tags_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



6
7
8
# File 'app/controllers/dune/admin/tags_controller.rb', line 6

def create
  create! { tags_path }
end

#destroyObject



22
23
24
# File 'app/controllers/dune/admin/tags_controller.rb', line 22

def destroy
  destroy! { tags_path }
end

#updateObject



10
11
12
13
14
15
16
17
18
19
20
# File 'app/controllers/dune/admin/tags_controller.rb', line 10

def update
  update! do |format|
    if resource.errors.empty?
      format.html { redirect_to tags_path }
      format.json { respond_with_bip(resource) }
    else
      format.html { render action: 'edit' }
      format.json { respond_with_bip(resource) }
    end
  end
end