This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Generally speaking, the controller will be pointing towards a view using either render or redirect_to: | |
| 1. render: tells Rails which view to show; doesn't run target action's code | |
| 2. redirect_to: tells Rails that the browser needs to send a new request to whatever the redirect_to value is; runs target action's code | |
| Render vs. redirect_to can be confusing; here's a clear snippet of code from the Ruby on Rails Guide that should clarify | |
| ''' | |
| def index | |
| @books = Book.all | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | https://github.com/morganwildermuth/ar-sunlight-legislators | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class Vehicle | |
| attr_accessor :status | |
| attr_reader :gas_chance | |
| attr_writer :color | |
| def initialize(args) | |
| @color = args[:color] | |
| @wheels = args[:wheels] | |
| @gas_chance = args[:gas_chance] | |
| end |