diff --git a/app/views/home/_discuss.html.haml b/app/views/home/_discuss.html.haml index c5c430907..f3359b784 100644 --- a/app/views/home/_discuss.html.haml +++ b/app/views/home/_discuss.html.haml @@ -1,6 +1,6 @@ %h2.text-center= t('.discussion') .list-group - - Post.order(created_at: :desc).limit(max).each do |post| + - Post.order(created_at: :desc).limit(6).each do |post| = link_to post, class: 'list-group-item list-group-item-action flex-column align-items-start' do .d-flex.w-100.justify-content-between %h5.mb-2.h5= truncate(strip_tags(post.subject)) diff --git a/app/views/home/_members.html.haml b/app/views/home/_members.html.haml index 87bd563d9..90d4c7078 100644 --- a/app/views/home/_members.html.haml +++ b/app/views/home/_members.html.haml @@ -1,6 +1,6 @@ - cache cache_key_for(Member) do .hidden-xs - - members = Member.includes(plantings: :crop).interesting.limit(max) + - members = Member.includes(plantings: :crop).interesting.limit(6) - if members.present? %h2.text-center= t('.title') .member-cards.index-cards diff --git a/app/views/home/_seeds.html.haml b/app/views/home/_seeds.html.haml index f01acb725..bff02e70d 100644 --- a/app/views/home/_seeds.html.haml +++ b/app/views/home/_seeds.html.haml @@ -1,5 +1,5 @@ - cache cache_key_for(Seed) do %h2.text-center= t('home.seeds.title') .homepage-cards - - Seed.current.tradable.includes(:owner, :crop).order(created_at: :desc).limit(max).each do |seed| + - Seed.current.tradable.includes(:owner, :crop).order(created_at: :desc).limit(6).each do |seed| = render 'seeds/card', seed: seed diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 72e094c0c..dd748925f 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -29,8 +29,8 @@ %p.text-right= link_to "#{t('home.harvests.view_all')} »", harvests_path, class: 'btn btn-block' .col-md-6 %section.seeds.mx-auto - = render 'seeds', max: 6 + = render 'seeds' %p.text-right= link_to "#{t('home.seeds.view_all')} »", seeds_path, class: 'btn btn-block' .col-md-6 - %section.members.mx-auto= render 'members', max: 6 - %section.discussion.mx-auto= render 'discuss', max: 3 \ No newline at end of file + %section.members.mx-auto= render 'members' + %section.discussion.mx-auto= render 'discuss' \ No newline at end of file