Resources for the TIY-Durham Rails course.
Students should be comfortable with the following at the end of this week:
Challenge: Include
Problem of the Day: My First Website
theironyard.com
h1
- h6
p
a
div
span
ul
, li
, ol
table
, etcimage
href
src
style=
attributes - thumbs down.<style>
tags - thumbs mostly down.id
and class
attributesli {}
to select everything in all li
sdiv li {}
to select every li
inside a div
li, p {}
to select everything in all li
s and p
s#id
to select the element with an id
of “id”.class
to select everything with a class
of “class”li.class
to select every li
with a class
of “class”border:
width:
color:
box-shadow
transform
Websites that are “static”:
Webapps that do processing on the server (and/or have a database):
Helpful Links:
Challenge: Discuss Ruby
Challenge: Discuss HTTP
Problem of the Day: Using ERB
#shipit
and putting a bow on itrails new .
form
input
(all sorts)select
button
checkbox
form_tag
elements<%= f.select :teacher_id, Teacher.all.map {|t| [t.name , t.id]} %>
<%= f.collection_select :teacher_id, Teacher.all, :id, :name %>
strftime()
strftime()
Problem of the Day: Albums Resource
before_action
(similar to before_create
)ApplicationController
rails-footnotes
gemjbuilder
from Gemfile if you don’t want an API.form_for
and related methodsrails generate rails_footnotes:install
Challenge: Router
||=
config.action_controller.action_on_unpermitted_parameters = :raise
.html_safe
git remote
reviewsqlite3
gem to development and testpg
and rails_12factor
gems to productionpuma
gem to base of Gemfileweb: bundle exec puma -C config/puma.rb
config/puma.rb
per Heroku’s instructionsbundle install --without production
heroku git:remote -a damp-peak-9050
git push heroku master
heroku run rake db:migrate
heroku run rake db:seed