display results with a show more link

Multi tool use
Multi tool use
The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


display results with a show more link



I'm trying to figure out a way to always show 5 jobs in my Rails app and then have a link that when clicked will show all of the remaining jobs. Should I do something in my jobs_controller where I'm just getting the first 5 and then getting the rest, or is it better to do it in the view somehow?


<!-- company -->
<div class="vertical-space">
<b>Company Name</b><br />
<div class="sub-text">

<% Job.by_company_count.size.each do |name, count| %>
<div class="indent"><%= link_to name, filtered_jobs_path(company: name) %>
(<%= count %>)
<br>
</div><!--./indent-->
<% end %>
</div><!--./sub-text-->
</div>









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

2RoqymBX6eg43Q6Dfb4V57mtWrqdK7nrbTcFbmRr7ICQ5F9,CjCvD7A8g4Xdcs SP,JbjGg1LrZk0 a0 NJ,XJw
703n4vQuFJiJI9nDV8UdvSsb9Cj5,9O9YIWZZD

Popular posts from this blog

Makefile test if variable is not empty

Visual Studio Code: How to configure includePath for better IntelliSense results

Will Oldham