Partial view won't render content

6 views
Skip to first unread message

David Williams

unread,
Apr 25, 2016, 1:30:44 PM4/25/16
to rubyonra...@googlegroups.com
When I attempt to use the same query in activerecord, 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? %>
<ul>
<% @hashtags.each do |hashtag| %>
<li><%= link_to hashtag.name, hashtag_path(hashtag.name)
%></li>
<% end %>
</ul>
<% end %>

I have the slightest clue to why the list elements aren't being
populated by the data.

--
Posted via http://www.ruby-forum.com/.

David Williams

unread,
Apr 25, 2016, 2:24:21 PM4/25/16
to rubyonra...@googlegroups.com
David Williams wrote in post #1183071:

> I have the slightest clue to why the list elements aren't being
> populated by the data.

I fixed it. Thanks.
Reply all
Reply to author
Forward
0 new messages