ActionView::Template::Error (incompatible character encodings: UTF-8 and ASCII-8BIT): app/controllers/posts_controller.rb:27:in `new'不兼容的字符編碼:UTF-8和ASCII-8BIT在渲染動作
# GET /posts/new
def new
if params[:post]
@post = Post.new(post_params).dup
if @post.valid?
render :action => "confirm"
else
format.html { render action: 'new' }
format.json { render json: @post.errors, status: :unprocessable_entity }
end
else
@post = Post.new
@document = Document.new
@documents = @post.documents.all
@document = @post.documents.build
end
我不知道爲什麼它正在發生。
? –