如何在 rails 4 中使用具有强参数的acts_as_taggable_on gem?
有:
class User < ActiveRecord::Base
acts_as_tagger
end
class Post < ActiveRecord::Base
acts_as_taggable
end
@post = current_user.tag(@post, :with => :tag_list)
def post_params
params.require(:post).permit(:text, :user_id, :tag_list)
end
如何将(post_params)添加到@post?