Skip to content

Commit

Permalink
fix carnegie page route helpers (DLC-1056)
Browse files Browse the repository at this point in the history
  • Loading branch information
barmintor committed Dec 13, 2023
1 parent c49164b commit 80c15c1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/views/carnegie/centennial/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div id="about_the_project" class="row hide-xs">
<p class="lead">
Carnegie Corporation of New York celebrated its centennial in 2011. <a class="continued" href="<%=carnegie_about_path()%>#about_the_centennial">Read more &raquo;</a>
Carnegie Corporation of New York celebrated its centennial in 2011. <a class="continued" href="<%= carnegie_page_path('about', anchor: 'about_the_centennial')%>">Read more &raquo;</a>
</p>
</div>
<%= render template: '/shared/index' %>
6 changes: 3 additions & 3 deletions app/views/carnegie/home.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
This website provides a portal into the Corporation’s philanthropy from the 1870s to the 21st century. The reach is increasingly global, from early twentieth century gifts in support of library construction to more recent interviews relating to the Corporation's Russia Initiative. Scholars studying the history of philanthropy, capital, education, race, foreign relations, and a range of other topics will find that the website contains valuable primary resource material.
</p>
<p>
<a class="color_" href="<%=carnegie_about_path()%>#about_the_project">Read more &raquo;</a>
<a class="color_" href="<%=carnegie_page_path('about')%>#about_the_project">Read more &raquo;</a>
</p>
<hr>
<h2 class="h5 text-uppercase">Oral History Projects</h2>
<p>
Carnegie Corporation of New York Oral History Project began in 1966 and continued in three phases over a fifty year period (1966-1974, 1996-2004, 2011-2013). In total nearly 850 hours of testimony reflect the thinking of the Corporation’s officers, staff members, and grantees. They offer a rich portrait of the Corporation’s evolution over the first 58 years of its existence.
</p>
<p>
<a class="color_" href="<%=carnegie_about_path()%>#oral_history_projects">Read more &raquo;</a>
<a class="color_" href="<%=carnegie_page_path('about')%>#oral_history_projects">Read more &raquo;</a>
</p>
<hr class="visible-sm">
</div>
Expand All @@ -40,7 +40,7 @@
By 1911 Andrew Carnegie had endowed five organizations in the United States and three in the United Kingdom, and had given away over $43 million for public library buildings and close to $110 million for other purposes. Nevertheless, ten years after the sale of the Carnegie Steel Company, he still had more than $150 million and, at the age of 76, was tiring of the burden of philanthropic decision making. On the advice of Elihu Root, a long-time friend, he decided to establish a trust to which he could transfer the bulk of his remaining fortune and, ultimately, the responsibility for distributing his wealth after his lifetime. Having already used the conventional labels for his previously endowed institutions, he selected "corporation" for this last and largest. It was chartered by the State of New York as Carnegie Corporation of New York.
</p>
<p>
<a class="color_" href="<%=carnegie_about_path()%>#about_the_corporation">Read more &raquo;</a>
<a class="color_" href="<%=carnegie_page_path('about')%>#about_the_corporation">Read more &raquo;</a>
</p>
</div> <!--/.inner-->
</div><!--/-->
Expand Down
9 changes: 9 additions & 0 deletions spec/routing/carnegie_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'rails_helper'

describe CarnegieController, type: :routing do
describe "routing" do
it "routes to about page" do
expect(carnegie_page_path('about', anchor: 'about_the_centennial')).to eql("/carnegie/about#about_the_centennial")
end
end
end

0 comments on commit 80c15c1

Please sign in to comment.