Bugfix: Wasn’t splitting tags!
This commit is contained in:
parent
1d9efa6cab
commit
b7bbd85c7e
|
@ -17,7 +17,7 @@ class MicropostsController < ApplicationController
|
|||
def create
|
||||
micropost = Micropost.new(micropost_params)
|
||||
micropost.user = helpers.current_user
|
||||
micropost.set_tags(params[:tags]) if params[:tags]
|
||||
micropost.set_tags(*parse_tags(params[:tags])) if params[:tags]
|
||||
if micropost.save
|
||||
redirect_to micropost, notice: t(".created")
|
||||
else
|
||||
|
@ -30,7 +30,7 @@ class MicropostsController < ApplicationController
|
|||
def edit; end
|
||||
|
||||
def update
|
||||
@micropost.set_tags(params[:tags]) if params[:tags]
|
||||
@micropost.set_tags(*parse_tags(params[:tags])) if params[:tags]
|
||||
if @micropost.update(micropost_params)
|
||||
redirect_to @micropost, notice: t(".updated")
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue