上传商品图片失败 #194

Closed
saberma opened this Issue Oct 18, 2011 · 1 comment

Comments

Projects
None yet
1 participant
Owner

saberma commented Oct 18, 2011

商品没有任何图片时,上传图片前台直接报错

The error occurred while evaluating nil.+

app/controllers/admin/photos_controller.rb:19:in `create'

删除图片时后台报错

Rendered admin/photos/destroy.js.haml (6.4ms)
Completed 500 Internal Server Error in 125ms

ActionView::Template::Error (Missing partial products/upload_photos with {:handlers=>[:erb, :builder, :arb, :coffee, :haml], :formats=>[:js, :html], :locale=>[:cn, :cn]}. Searched in:
  * "/home/saberma/Documents/shopqi/app/views"
  * "/home/saberma/.rvm/gems/ruby-1.9.3-rc1/gems/activeadmin-0.3.2/app/views"
  * "/home/saberma/.rvm/gems/ruby-1.9.3-rc1/gems/kaminari-0.12.4/app/views"
  * "/home/saberma/.rvm/gems/ruby-1.9.3-rc1/gems/devise-1.4.7/app/views"
):
    1: $("#image-show-area").html("#{escape_javascript(render partial:'products/upload_photos',locals:{product: product})}" );
    2: msg('#{flash[:notice]}');
  actionpack (3.1.1) lib/action_view/path_set.rb:14:in `find'

需要增加相应的集成测试

saberma was assigned Oct 18, 2011

Owner

saberma commented Oct 18, 2011

已修正,增加相应集成测试

saberma closed this Oct 18, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment