 
          slides: http://gdibtv.github.io/gdi-rails
Girl Develop It is here to provide affordable and accessible programs to learn software through mentorship and hands-on instruction.
Some "rules"
Rails provides a variety of ways to make forms
            
  <%= form_tag do %>
    Form contents
  <% end %>
            
          
          
            
<form accept-charset="UTF-8" action="/" method="post">
  <input name="utf8" type="hidden" value="✓" />
  <input name="authenticity_token" type="hidden" value="J7CBxfHalt49OSHp27hblqK20c9PgwJ108nDHX/8Cts=" />
  Form contents
</form>
            
          
        
            
  <%= check_box_tag(:like_song) %>
  <%= label_tag(:like_song, "I like this song") %>
            
          
        
            
  <input id="like_song" name="like_song" type="checkbox" value="1" />
  <label for="like_song">I like this song</label>
            
          
        
            
  <%= text_area_tag(:message, "Hi, nice site", size: "24x6") %>
  <%= password_field_tag(:password) %>
  <%= hidden_field_tag(:parent_id, "5") %>
  <%= search_field(:user, :name) %>
  <%= telephone_field(:user, :phone) %>
  <%= date_field(:user, :born_on) %>
  <%= datetime_field(:user, :meeting_time) %>
  <%= datetime_local_field(:user, :graduation_day) %>
  <%= month_field(:user, :birthday_month) %>
  <%= week_field(:user, :birthday_week) %>
  <%= url_field(:user, :homepage) %>
  <%= email_field(:user, :address) %>
  <%= color_field(:user, :favorite_color) %>
  <%= time_field(:task, :started_at) %>
  <%= number_field(:product, :price, in: 1.0..20.0, step: 0.5) %>
  <%= range_field(:product, :discount, in: 1..100) %>
            
          
        
            
  # Form Helper
  <%= text_field(:artist, :full_name) %>
  # Form Output
  <input id="artist_full_name" name="artist[full_name]" type="text" value="ACDC"/>
            
          
        
            
    <%= form_for [ @artist, @song ] do |f| %>
      <%= f.label :title %>
      <%= f.text_field :title %>
      <%= f.check_box :like_song %>
      <%= f.submit 'Submit' %>
    <% end %>
            
          
         
        
            
<h2>Suggest a New Song</h2>
<form class="new_song" id="new_song" action="/artists/1/songs" accept-charset="UTF-8" method="post">
  <input name="utf8" type="hidden" value="✓" />
  <input type="hidden" name="authenticity_token" value="K/DYug/8kXlH6G8L9Zym9KMsFnZ6hdINC66EfCSlxKLnJhTikezTC6QelJHqjynAHkl4lEYRAVUutXD2fMBycQ==" />
  <label for="song_title">
  Title
  </label>
  <input type="text" name="song[title]" id="song_title" />
  <input type="submit" name="commit" value="Submit" />
</form>
            
          
        We are going to follow the documentation's instructions, as it is well maintained and accurate.
As of this writing, steps for Devise setup are:
Tool check!
$ heroku --help
$ git --help
          If you don't get help menus back, get a TA to help you install Heroku and Git correctly.
Let's follow Railsbridge's instructions.
There is one correction- step 4 on the next slide.
As of this writing, steps to deploy to Heroku are:
production:
  adapter: postgresql
  database: db/production
          In db/seeds.rb, you can write code that will populate the database. Syntax is exactly like the Rails Console, so it should look familiar to you.
Whenever the app is setup on a new machine (your collaborator's, Heroku's servers, etc), 'rake db:seed' can be run, and the database will be populated with the data from seed file. Sweet!
In my db/seeds.rb file, I added this:
Artist.create(name: "Shonen Knife", hometown: "Osaka")
Artist.create(name: "Shakira", hometown: "Barranquilla")
Artist.create(name: "Beyonce", hometown: "Houston")
Artist.create(name: "Teagan and Sara", hometown: "Calgary")
        After saving db/seeds.rb, in the terminal run:
$ rake db:seed
          After pushing your changes to Heroku, in the terminal run:
$ heroku run rake db:seed
           
        | Ruby-doc.org | Official Ruby documentation | 
| Ruby on Rails Guides | Excellent documentation for Rails | 
| Rails Casts | Screencasts on how to do almost everything with Rails | 
| The Rails Tutorial | Great free (HTML version) book with step-by-step instructions on building Rails apps | 
| RubyGems.org | Listing of all available Gems | 
| Ruby the Hard Way | Fun, free (HTML version) book with great information about programming | 
| Girl Develop It | Local workshops, events, and coding sessions with awesome people <3 |