It is probably understood that I am pretty new to Rails without me even mentioning it 🙂
So I have a static controller which is working. Here is the route:
match "/pages/:page" => "pages#team"
And I am able to confirm that this route is working because this controller code outputs things to the console:
def team
print("Output some test code to see if system gets here\n")
end
What I am trying to do is have the controller redirect to a view page that I made. My view page is: team.html.rb and it is located at /app/views/pages/team.html.rb
How can I make the controller redirect there?
Thanks!
Make sure you have an action in
pagesfor teamThen rename your file to:
team.html.erb