我在 Heroku 上得到以下内容,但不是在本地,看起来很奇怪,有什么想法吗?
2012-05-22T11:49:53+00:00 app[web.1]: ActionView::Template::Error (undefined method `<=>' for nil:NilClass):
2012-05-22T11:49:53+00:00 app[web.1]: 1: <h3>Product Tracklisting</h3>
2012-05-22T11:49:53+00:00 app[web.1]: 2:
2012-05-22T11:49:53+00:00 app[web.1]: 3: <ol id="track-list" data-update-url=<%= sort_producttracklistings_url %>>
2012-05-22T11:49:53+00:00 app[web.1]: 4: <% @product.producttracklistings.sort_by { |producttracklisting| producttracklisting.position }.each do |products_track| %>
2012-05-22T11:49:53+00:00 app[web.1]: 5:
2012-05-22T11:49:53+00:00 app[web.1]: 6: <%= content_tag_for :li, products_track do %>
2012-05-22T11:49:53+00:00 app[web.1]: 7:
2012-05-22T11:49:53+00:00 app[web.1]: app/views/products/_tracklisting.html.erb:4:in `_app_views_products__tracklisting_html_erb___857430611_70068520180420'
2012-05-22T11:49:53+00:00 app[web.1]: app/views/products/show.html.erb:32:in `_app_views_products_show_html_erb___556626077_70068514945180'
2012-05-22T11:49:53+00:00 app[web.1]: app/controllers/products_controller.rb:91:in `show'
我认为这可能是因为data-update-url=<%= sort_producttracklistings_url %>
以前是data-update-url="<%= sort_producttracklistings_url %>"
,但这根本没有区别。