Class: Admin::TagsController

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

Instance Method Summary collapse

Instance Method Details

#createObject



9
10
11
12
# File 'app/controllers/admin/tags_controller.rb', line 9

def create
  entity_tag = EntityTag.create_tag params
  redirect_to entity_tag.entity.entity_edit_url
end

#destroyObject



14
15
16
17
18
19
# File 'app/controllers/admin/tags_controller.rb', line 14

def destroy
  entity_tag = EntityTag.tagged_entity params
  entity = entity_tag.entity
  entity_tag.untag!
  redirect_to entity.entity_edit_url
end

#showObject



4
5
6
7
# File 'app/controllers/admin/tags_controller.rb', line 4

def show
  @tag = Tag.find params[:id].to_i
  render "tags/show", :layout => "tags"
end