Method: Ems::TagsController#create

Defined in:
app/controllers/ems/tags_controller.rb

#createObject

POST /tags POST /tags.json



50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'app/controllers/ems/tags_controller.rb', line 50

def create
  @tag = Tag.new(params[:tag])

  respond_to do |format|
    if @tag.save
      format.html { redirect_to @tag, notice: 'Tag was successfully created.' }
      format.json { render json: @tag, status: :created, location: @tag }
    else
      format.html { render action: "new" }
      format.json { render json: @tag.errors, status: :unprocessable_entity }
    end
  end
end