Skip to content

Commit 4451f52

Browse files
author
rachelmyers
committed
Typo fixes and add content to placeholders
1 parent 3b99572 commit 4451f52

10 files changed

+20
-21
lines changed

sites/en/job-board/add_a_navbar.step

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ MARKDOWN
1313
discussion_box "What's an application layout?", <<-MARKDOWN
1414
None of the view pages that we've been working with so far have had the necessary structure for a valid HTML page. No `<head>` or `<body>` or JavaScript or CSS tags. This application layout file is where all of that stuff exists!
1515

16-
* How does is this page related to the individual page content? Try comparing the source in the browser to this file, and see where the individual page's code starts showing up.
16+
* How is this page related to the individual page content? Try comparing the source in the browser to this file, and see where the individual page's code starts showing up.
1717
* If you add something (say, an h1) to this file, where will it show up?
1818
MARKDOWN
1919

@@ -44,7 +44,7 @@ ERB
4444
message <<-MARKDOWN
4545
Things to note:
4646

47-
* We use Rails link helpers instead of typing in `<a href="/jobs/new">Add Job</a>` [SAY WHY]
47+
* We use Rails link helpers instead of typing in `<a href="/jobs/new">Add Job</a>`. The reason is that if the url of a page changes in the future, without the link helpers, we’d have to update every single place we link to that page. The link helpers abstract the actual url for us, so if we change a specific url, we update the address in only one place, in the routes file; and all the places we link to it stay the same.
4848
* The `<header>` tag is HTML5. Aren't we cool!?
4949

5050
So let's take a look at it. Refresh, and ... isn't that horrifying looking? Let's make it look like a nav, albeit a very ugly one.

sites/en/job-board/add_a_new_job_form.step

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ message <<-MARKDOWN
33

44
* Use Rails form helpers to create the HTML for the form
55
* Learn to use the Rails server output for great good
6-
* Update the controller so that the form save submissions to the database
6+
* Update the controller so that the form saves submissions to the database
77
* Learn about the beauty of the params hash
88

99
# Side Note: Web forms are not perfectly straightfoward
@@ -30,7 +30,7 @@ RUBY
3030
message <<-MARKDOWN
3131
Refresh <http://localhost:3000/jobs/new>, and we see that familiar "Template is missing" error. So, let's add that template.
3232

33-
Under app/views/jobs, add a file called new.html.erb. This will be our form. Add some html to the topic to keep things moving along:
33+
Under app/views/jobs, add a file called new.html.erb. This will be our form. Add some html to the template to keep things moving along:
3434
MARKDOWN
3535

3636
source_code :html,

sites/en/job-board/create_a_rails_app.step

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@ message <<-MARKDOWN
1010

1111
First, let's get into a directory for RailsBridge projects (either by finding your existing one & moving there or making a new folder).
1212

13-
If you don't already have a RailsBridge folder, use the command `mkdir` to create one:
13+
If you don't already have a RailsBridge folder, use the commands `mkdir` and `cd` to create one and move into it:
1414
MARKDOWN
1515

1616
console_without_message "mkdir railsbridge"
17+
console_without_message "cd railsbridge"
1718

1819
message <<-MARKDOWN
19-
and then use `cd railsbridge` to move into it.
20-
2120
# Rails New!!!
2221
MARKDOWN
2322

sites/en/job-board/crud_and_resourceful_routing.step

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ message <<-MARKDOWN
1313
!["Screenshot of Rails routes page"](img/rails-routes.png)
1414
MARKDOWN
1515

16-
discussion_box "CRUD", "Really, compare those two things! Out loud! As a group!"
16+
discussion_box "CRUD", "Talk through the different uses for the HTTP verbs. What is their general purpose, and what are we specifically using them for??"
1717

1818
message <<-MARKDOWN
1919
To have a useful app, we need to be able to create job postings, see them all and their details, change them, and delete them. The way that Rails wants us to do this is by following RESTful routing conventions, which are perfectly encapsulated by the output of `resource :jobs` in our routes.rb file.
@@ -28,7 +28,7 @@ message <<-MARKDOWN
2828

2929
You could make your URLs look like anything you wanted, like: `/all_the_jobs` or `/add_a_job` or `show_job`. This would totally work if you set up your controller methods and the route file correctly.
3030

31-
But we don't do this, generally, because Rails prefers resourceful routing, in which the paths are structured around a specific resource &mdash; in our case, jobs.
31+
But we generally avoid this because the RESTful routing is a best practice that Rails makes easy to follow. In RESTful routes, the paths are structured around a specific resource &mdash; in our case, jobs. Check out more about [RESTful](http://en.wikipedia.org/wiki/Representational_state_transfer) urls.
3232

3333
Another example: if we were making a puppy app, I would expect that going to `/puppies` would show me an index of all the puppies, and `/puppies/1` would find the puppy with the ID of one and show me their individual page, and `/puppies/1/edit` would show me the form to update a given puppy.
3434

sites/en/job-board/delete_job_listings.step

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ message <<-MARKDOWN
22
# What we're going to do
33

44
* Remove postings
5-
* That's about it
65

76
Once a job is filled, we don't want a listing for it hanging out forever. Let's add a way to delete postings.
87

sites/en/job-board/listing_the_jobs.step

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ message <<-MARKDOWN
44
* Show the jobs!
55
* Learn about ERB
66

7-
Going back to the jobs index (<http://localhost:3000/jobs>) and not seeing our new jobs kinda sucks. Let's actually build the job board part of this job board now!
7+
Going back to the jobs index (<http://localhost:3000/jobs>), we expect to see the new jobs. Let's actually build the job board part of this job board now!
88

99
# Get all the jobs out of the database
1010

@@ -26,7 +26,8 @@ discussion_box "Rails Console", <<-MARKDOWN
2626
The Rails console is super fun! It's giving us direct access to our local database.
2727

2828
* Try running `Job.all.to_sql`. What does that do?
29-
* Something else here!
29+
* Try selecting an individual Job record.
30+
* Try updating an that individual record from the console!
3031
MARKDOWN
3132

3233
message "# Show those jobs!"

sites/en/job-board/make_a_jobs_home_page.step

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ message <<-MARKDOWN
2828
* typing in `route`
2929
* hitting enter
3030

31-
Magic!
31+
Magic! (Sublime is using fuzzy search, so you can use the entire file path, or just part of the filename to go to files.)
3232
MARKDOWN
3333

3434
source_code_with_message "We're going to need a resource route, which will create EIGHT different routes for us. Add this to line two:", :ruby, "resources :jobs"
@@ -81,7 +81,7 @@ error_box "The action 'index' could not be found for JobsController", <<-MARKDOW
8181
MARKDOWN
8282

8383
message <<-MARKDOWN
84-
It's looking for a method called index on the jobs controller! But there isn't one, boooo. So let's add it.
84+
It's looking for a method called index on the jobs controller! Since there isn't a controller method for this route, we'll need to add it.
8585

8686
Open up your jobs controller (again, try to use keyboard shortcuts: cmd+p on Mac or ctl+p on PC to find the file at app/controllers/jobs_controller.rb).
8787
MARKDOWN

sites/en/job-board/make_the_form_work.step

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ message <<-MARKDOWN
55
* Learn how to read server output
66
* Review happy debugging techniques
77

8-
# Form Partytime
8+
# Partytime: Use the form to Create Objects
99
MARKDOWN
1010

1111
message "Now, try to submit your form."

sites/en/job-board/store_jobs_in_the_database.step

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ message <<-MARKDOWN
3131

3232
# Make that migration file useful
3333

34-
Open up the migration file that you just made (cmd+p / ctl+p and type createjobs and hit enter) and you'll see the following:
34+
Open up the migration file that you just made (cmd+p / ctl+p, type 'create jobs', and hit enter) and you'll see the following:
3535
MARKDOWN
3636

3737
source_code :ruby, <<-RUBY
@@ -77,7 +77,7 @@ MARKDOWN
7777
message <<-MARKDOWN
7878
# Check out the model
7979

80-
The migration we just ran updated the database, but that doesn't mean that we can talk to the database using Ruby yet. Look at the file `app/models/job.rb`. The `jobs` class inherits from ActiveRecord::Base, so that we can talk to the database with Ruby instead of SQL!
80+
The migration we just ran updated the database, but that doesn't mean that we can talk to the database using Ruby yet. Look at the file `app/models/job.rb`. The `Job` class inherits from ActiveRecord::Base, so that we can talk to the database with Ruby instead of SQL!
8181

8282
Okay, so we've got some place to store our jobs. But how can we make any? THROUGH THE MAGIC OF FORMS!!!
8383
MARKDOWN

sites/en/job-board/update_job_listings.step

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ ERB
2626
message <<-MARKDOWN
2727
Okay, so that's awesome. Now we just have to add a form for editing. I wonder if it is any different from the create form? I guess we could copy and paste the other form?
2828

29-
*Noooooooooo!!!!!!!!!!*
29+
We could copy and paste from the other form, but we try to avoid that because duplicated code is hard to maintain. For example, if I want to add placeholder text for the inputs in the form, when the code is duplicated, I’ll need to update the code in each place the form was copied. (In large apps it’s easy to miss a place that would need to be updated.) The solution is to reuse rather than duplicate the code, and the way to reuse code in views is by using partials.
3030
MARKDOWN
3131

32-
discussion_box "Partials",
32+
discussion_box "Don't Repeat Yourself",
3333
<<-MARKDOWN
34-
* What's a partial?
35-
* Why should we use them?
34+
* What are some reasons to DRY up our code?
35+
* What are some strategies for DRYing up code throughout a Rails app?
3636
MARKDOWN
3737

3838
message <<-MARKDOWN

0 commit comments

Comments
 (0)