我正在从Paperclip切换到Carrierwave并遇到一个我无法解决的问题。尝试更新用户属性时,我收到以下错误消息:
UsersController#update中的NameError 未初始化的常数阿凡达
错误比状态
app / controllers / users_controller.rb:118:block in update'
app/controllers/users_controller.rb:117:in
更新'
更新操作的代码如下:
def更新 @user = User.find(params [:id])
respond_to do |format|
if @user.update_attributes(params[:user])
format.html { redirect_to admin_url(params[:alert]), notice: 'User was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @user.errors, status: :unprocessable_entity }
end
end
end
任何建议都会有很大的意义。