Class: Ecm::Tags::Backend::TaggingsController

Inherits:
Itsf::Backend::Resource::BaseController
  • Object
show all
Defined in:
app/controllers/ecm/tags/backend/taggings_controller.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.resource_classObject



5
6
7
# File 'app/controllers/ecm/tags/backend/taggings_controller.rb', line 5

def self.resource_class
  Ecm::Tags::Tagging
end

Instance Method Details

#create_by_gid_and_tagObject



9
10
11
12
13
14
15
16
17
# File 'app/controllers/ecm/tags/backend/taggings_controller.rb', line 9

def create_by_gid_and_tag
  @taggable = load_taggable
  @tag      = load_tag
  @taggable.tags << @tag

  respond_to do |format|
    format.js { flash.now[:notice] = t('.success') }
  end
end

#set_by_gid_and_tagObject



19
20
21
22
23
24
25
26
27
# File 'app/controllers/ecm/tags/backend/taggings_controller.rb', line 19

def set_by_gid_and_tag
  @taggable = load_taggable
  @tag      = load_tag
  @taggable.tags = [@tag]

  respond_to do |format|
    format.js { flash.now[:notice] = t('.success') }
  end
end