title: Ruby on Rails 4 Routing/Views/Path
body: <p>I have 2 questions: </p>
  
  <p>I have a controller called homepage. I have a view called samplegraph in my homepage's view directory. I want to get the routing working correctly such that <strong>www.homepage.com/samplegraph takes me to the samplegraph page.</strong> </p>
  
  <p>As far as I can tell, the route for it in routes.rb should be something like this:</p>
  
  <pre><code>GET 'homepage/samplegraph' =&gt; 'homepage#showgraph1'
  </code></pre>
  
  <p>If I'm understanding rails routing correctly, this statement routes GET requests to homepage/samplegraph to the homepage controller's showgraph1 action. At this point I'm not particularly sure what the showgraph1 action should be in order to render the view page(samplegraph). At the moment the action is simply empty. I don't really know what to put here. </p>
  
  <p><strong>Second question:</strong></p>
  
  <p>Also, while I was researching rails routing, I was looking into resource based routing. For my purposes, I don't need most of the stuff generated by that. One thing I am interested in is that invoking resource based routing automatically generates Paths for you via helpers(I think?).</p>
  
  <p>How would I generate a Path for my route, such that I'd be able to use a link_to method to link various parts of the application together? Any help/comments would be greatly appreciated. </p>