capitalize to match the specs

This commit is contained in:
Brenda Wallace
2019-05-29 15:09:34 +12:00
parent 210b912859
commit f0d49b7e9d
3 changed files with 19 additions and 5 deletions

View File

@@ -87,18 +87,18 @@
.list-group-item.list-group-flush.d-flex.justify-content-between.align-items-center
= link_to crop_plantings_path(@crop), class: 'card-link' do
= planting_icon
#{@crop.name} plantings
#{@crop.name.capitalize} plantings
%span.badge.badge-primary.badge-pill=@crop.plantings.size
.list-group-item.d-flex.justify-content-between.align-items-center
= link_to crop_harvests_path(@crop) do
= harvest_icon
#{@crop.name} harvests
#{@crop.name.capitalize} harvests
%span.badge.badge-primary.badge-pill=@crop.harvests.size
.list-group-item.d-flex.justify-content-between.align-items-center
= link_to crop_seeds_path(@crop) do
= seed_icon
#{@crop.name} seeds
#{@crop.name.capitalize} seeds
%span.badge.badge-primary.badge-pill=@crop.seeds.size
- if member_signed_in?
@@ -109,10 +109,20 @@
.card-body
= render 'scientific_names', crop: @crop
= render 'alternate_names', crop: @crop
.card-body
%h3 See who's planted #{@crop.name.pluralize}
%ul.list-group.list-group-flush
- @crop.plantings.order(planted_at: :desc).limit(5).each do |planting|
%li.list-group-item
= link_to planting do
= planting_icon
= planting
- if planting.owner.location.present?
%small=planting.owner.location
%hr/
= render 'find_seeds', crop: @crop
%hr/

View File

@@ -1,7 +1,7 @@
%h2 All about #{member.login_name}
- if member.bio.blank?
- if can? :edit, member
= link_to "Add a bio to complete your profile."
= link_to "Add a bio to complete your profile.", edit_member_path(member)
- else
#{member.login_name} hasn't written a bio yet.
- else

4
script/percy-new.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
bundle exec rails assets:precompile
export PERCY_TOKEN=047f5b0ecf3ca0a2bc94a6cfc837e625ace93ef0d81cc8ac82e3fb3aebd5c17f
PERCY_TARGET_BRANCH=dev npx percy exec -- bundle exec rspec spec/features/percy/