This code in a partial:
<div class ="vote_updated">
<p><%= event.actor %> <% case event.subject.value
when 1
puts " upvoted"
when -1
puts " downvoted"
when 0
puts " removed a vote from"
end %> a song. </p>
<div class="video_div">
<%= render 'videos/video', :video => event.secondary_subject %>
</div>
</div>
is being rendered as one big string instead of the resulting HTML code from the embedded ruby being evaluated.
This is the code that renders the partial:
<div id="feed_div">
<%= render_timeline current_user.recent_events %>
</div>
and this is the render_timeline method in application_helper.rb:
def timeline(events)
events.map do |event|
render(:partial => "timeline_events/#{event.event_type}", :locals => {:event => event})
end.join
end
It might be that your call to
.joinintimelineis marking the string as unsafe – maybe try altering it to:and see if that helps 🙂