我想添加“水星”宝石,但我得到了标题中提到的错误。
下面是我的方法:
def mercury_update
@attempt = Attempt.find(params[:id]
@attempt.name = params[:content][:attempt_name][:value]
@attempt.content = params[:content][:attempt_content][:value]
@attempt.save!
end这是我的观点:
<h1 id="attempt_name" class="mercury-region" data-mercury="full"><%= raw @attempt.name %></h1>
<%= render 'form' %>
<p id="attempt_content" class="mercury-region" data-mercury="full" > <%= raw @attempt.content %> </p>
<p><%= link_to "Edit Page", "/editor" + request.path, id: "edit_link", data: { save_url: mercury_update_attempt_path(@attempt) } %></p>发布于 2017-07-31 06:28:07
关闭find括号
@attempt = Attempt.find(params[:id])https://stackoverflow.com/questions/45405249
复制相似问题