diff --git a/app/helpers/containers_helper.rb b/app/helpers/containers_helper.rb index ed112856..73e33691 100644 --- a/app/helpers/containers_helper.rb +++ b/app/helpers/containers_helper.rb @@ -16,7 +16,7 @@ def contest_description_action_links(container, description) def render_eligibility_rules(description) eligibility_plain = description.eligibility_rules.to_plain_text - if eligibility_plain.length > 100 + if eligibility_plain.length > 60 content_tag(:div) do truncate(eligibility_plain, length: 60, omission: '') + link_to(' ...more', '#', diff --git a/app/views/containers/_entries_summary.html.erb b/app/views/containers/_entries_summary.html.erb index e11a9b50..77bc2705 100644 --- a/app/views/containers/_entries_summary.html.erb +++ b/app/views/containers/_entries_summary.html.erb @@ -11,7 +11,7 @@
-
Total Entries in all Active Contests: <%= container.total_active_entries %>
+
Total Entries in all Active Instances of Active Contests: <%= container.total_active_entries %>
<% if container.entries_summary.any? %>
Entries by Campus:
diff --git a/spec/helpers/containers_helper_spec.rb b/spec/helpers/containers_helper_spec.rb index 45f7ecc0..cff1112a 100644 --- a/spec/helpers/containers_helper_spec.rb +++ b/spec/helpers/containers_helper_spec.rb @@ -48,8 +48,8 @@ end describe "#render_eligibility_rules" do - context "when eligibility rules are longer than 100 characters" do - let(:long_text) { "These are very long eligibility rules that will definitely exceed the 100 character limit and therefore trigger the modal functionality." } + context "when eligibility rules are longer than 60 characters" do + let(:long_text) { "These are very long eligibility rules that will definitely exceed the 60 character limit and therefore trigger the modal functionality." } let(:rich_text) { instance_double(ActionText::RichText, to_plain_text: long_text) } before do @@ -66,10 +66,10 @@ expect(link['data-action']).to eq('click->modal#open') expect(link['data-modal-title']).to eq('Eligibility Rules') expect(link['href']).to eq('#') - expect(link.text).to eq('...more') + expect(link.text).to eq(' ...more') # Check truncated text - expect(parsed_result.text).to include(long_text[0..99]) + expect(parsed_result.text).to include(long_text[0..59]) end end