Reputation: 17185
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!
Upvotes: 0
Views: 217
Reputation: 3015
Just an FYI, you may want to checkout highvoltage from thoughbot for handling static pages:
https://github.com/thoughtbot/high_voltage
Upvotes: 0
Reputation: 437
Make sure you have an action in pages
for team
#in PagesController
def team
end
Then rename your file to:
team.html.erb
Upvotes: 2