0
我最近将我的应用程序从Rails2转移到Rails3。给'TemplateError'不能将字符串转换为整数
在 '应用程序/视图/分销/ index.html.erb' 的代码是这样的: -
<div style="padding-bottom:10px; padding-left:0px;float:left;display:<%= (!session[:album][@artist.id.to_s].empty? && !session[:album][@artist.id.to_s].nil?)?'block' : 'none' %>" id = "make_payment_enabled">
<%= link_to 'Make Payments',{:action => 'pay', :album=>@album.id}, :class => "button" %>
</div>
它给我TemplateError在线: -
<div style="padding-bottom:10px; padding-left:0px;float:left;display:<%= (!session[:album][@artist.id.to_s].empty? && !session[:album][@artist.id.to_s].nil?)?'block' : 'none' %>" id = "make_payment_enabled">
如何化解问题?