我的原子文件在本地输出不同的内容括号,然后在heroku上输出
本地xml文件正在输出
<content> <div class="category-wrap">
<p class="category">Whatever:</p>
<div class="lead">
<div class="photo-wrap"><img src="pn.png"></div>
<p class="description">
<b><a href="lome.com">I was all like ye whatveer</a></b> | Name: Robert Hellsing | Email: <a href="MAILTO:budabakasha@gmail.com">budabakasha@gmail.com</a> | <a href="ho">Website</a> | <a href="bro">Twitter</a> | <a href="chill">Linkedin</a> | Budget: $50000
</p>
</div>
</div>
</content>
但是在heroku上它是空的
<content></content>
此外,它应该在html中渲染部分内容,但它没有做到。 &#34;&安培; LT;&#34;而不是括号
这是我的atom.builder文件
atom_feed do |feed|
feed.title "Workshop Leads"
feed.updated @leads.maximum(:updated_at)
@leads.each do |lead|
feed.entry lead do |entry|
entry.title lead.title
entry.author do |author|
author.name lead.name
end
entry.content render :partial => 'lead_render.atom.erb', :type => 'html'
end
end
end
这是他尝试渲染
的部分内容<% @leads.today.most_recent.group_by(&:category).each do |category, leads| %>
<div class="category-wrap">
<p class="category"><%= category %>:</p>
<% leads.each do |lead| %>
<% puts lead.title %>
<div class="lead">
<div class="photo-wrap"><img src="<%= lead.photo %>"></div>
<p class="description">
<b><a href="<%= lead.url %>"><%= lead.title %></a></b> | Name: <%= lead.name %> | Email: <a href="MAILTO:<%= lead.email %>"><%= lead.email %></a> <% if lead.website.present? %>| <a href="<%= lead.website %>">Website</a> <% end %> <% if lead.twitter.present? %>| <a href="<%= lead.twitter %>">Twitter</a> <% end %> <% if lead.linkedin.present? %>| <a href="<%= lead.linkedin %>">Linkedin</a> <% end %> <% if lead.budget.present? %>| Budget: $<%= lead.budget %> <% end %>
</p>
</div>
<% end %>
</div>
<% end %>
答案 0 :(得分:0)
可能是由于atom_feed没有值。你确认atom_feed有值吗?
您可以在视图中添加一些内容,例如
<%= "Atom feed value: #{atom_feed.inspect}" %>