fix error when post is tagged and dont have current locale version #270

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
@keram
Contributor

keram commented Aug 20, 2012

reproduce steps:
create blog post with tag "ipsum" and current locale "sk",
on frontend change locale to "en" and click an link to see posts tagged with "ipsum"
and that leads to this:

NoMethodError in Refinery/blog/posts#tagged

Showing /home/web-data/work/test/web/vendor/refinerycms-blog/app/views/refinery/blog/shared/_post.html.erb where line #26 raised:

undefined method `html_safe' for nil:NilClass
Extracted source (around line #26):

23:     </header>
24:     <section class='clearfix'>
25:       <% if blog_post_teaser_enabled? %>
26:         <%= blog_post_teaser(post) %>
27:       <% else %>
28:         <%= post.body.html_safe %>
29:       <% end %>
Trace of template inclusion: vendor/refinerycms-blog/app/views/refinery/blog/posts/tagged.html.erb

and this PR fix that error

@parndt

This comment has been minimized.

Show comment Hide comment
@parndt

parndt Aug 20, 2012

Owner

Merged to 50661cc thank you!

Owner

parndt commented Aug 20, 2012

Merged to 50661cc thank you!

@parndt parndt closed this Aug 20, 2012

@travisbot

This comment has been minimized.

Show comment Hide comment
@travisbot

travisbot Aug 20, 2012

This pull request passes (merged 15246dd into 8c12290).

This pull request passes (merged 15246dd into 8c12290).

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