Class: Ltm::TagsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/ltm/tags_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



10
11
12
13
14
15
16
17
# File 'app/controllers/ltm/tags_controller.rb', line 10

def create
  @tag = Tag.create(tag_params)
  if @tag.save
    redirect_to tags_path, notice: "Tag created"
  else
    render :new
  end
end

#indexObject



3
4
5
# File 'app/controllers/ltm/tags_controller.rb', line 3

def index
  @tags = Tag.all
end

#newObject



6
7
8
9
# File 'app/controllers/ltm/tags_controller.rb', line 6

def new
  @tag = Tag.new
  @users = User.all
end