When I attempt to use the same query in rails console, it works
perfectly
fine. When I try to use it inside of the partial view, nothing shows at
all.
feed_controller.rb
def hashtags
@hashtags = SimpleHashtag::Hashtag.order(‘created_at DESC’).limit(10)
end
_hashtag_list.html.erb
<% if @hashtags.present? %>
- <%= link_to hashtag.name, hashtag_path(hashtag.name)
%>
<% @hashtags.each do |hashtag| %>
<% end %>
<% end %>
I have the slightest clue to why the list elements aren’t being
populated by the data.