Skip to content

Commit 2f442bf

Browse files
committed
separate post requirements into two steps
1 parent bfc6937 commit 2f442bf

5 files changed

+45
-17
lines changed

sites/intermediate_rails/add_posts_functionality.step renamed to sites/intermediate_rails/add_pages_to_create_and_look_at_individual_posts.step

+7-11
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ requirements do
22
message <<-MARKDOWN
33
* The user should be able to create a post with a name, author, date published, and content. The author should be the current user.
44
* The complete post should appear on its own page (aka its show page).
5-
* The user should be able to see each post’s name, author, and date published on the overview page (aka the index page).
6-
* The name of the post should link to the post show page.
7-
* The index page should include a “New Post” link or button.
85
* If the user doesn’t submit all required fields, they should see some error messaging, but shouldn’t lose any of their work.
96
MARKDOWN
107
end
@@ -13,25 +10,24 @@ discussion do
1310
message <<-MARKDOWN
1411
* How do you create a resource? What parameters do you need to pass?
1512
* Then: what did rails make for you when you called resource? Find all the new files. Maybe even list them out on a whiteboard.
16-
* You’re gonna need a posts controller, a post model, and probably a couple of different views. What’s the best order to make them in?
17-
* The command rake routes: what does it give you? How is it helpful?
18-
* What is Active Record?
13+
* You’re gonna need a posts controller, a post model, and a couple of different views. What’s the best order to make them in?
1914
MARKDOWN
2015
end
2116

2217
tools_and_references do
2318
message <<-MARKDOWN
24-
* RailsGuides - Form Helpers, section 2.2: http://guides.rubyonrails.org/form_helpers.html#binding-a-form-to-an-object
25-
* RailsGuides - Layout and Rendering in Rails http://guides.rubyonrails.org/layouts_and_rendering.html
26-
* RailsGuides - Active Record Validations and Callbacks http://guides.rubyonrails.org/active_record_validations_callbacks.html
19+
* RailsGuides - Form Helpers, section 2.2: <http://guides.rubyonrails.org/form_helpers.html#binding-a-form-to-an-object>
20+
* RailsGuides - Routes - CRUD, Verbs, and Actions: <http://guides.rubyonrails.org/routing.html#crud-verbs-and-actions>.
21+
* RailsGuides - Active Record Validations and Callbacks: <http://guides.rubyonrails.org/active_record_validations_callbacks.html>
2722
MARKDOWN
2823
end
2924

3025
hints do
3126
message <<-MARKDOWN
32-
* Don't hand code the form! You don't have to! Rails will help.
27+
* Don't hand code the form! You don't have to! Rails will help. See RailsGuide link above!
3328
* Rails has a built-in way to note when something was stored in the database. Probably handy for showing the date / time a post was created.
29+
* For now, we're going to use the user's email address to identify them. You can add names or other identifiers later! (Also, even though you're going to get the current user's email address from the User model, you'll still need a user parameter for your Post resource.)
3430
MARKDOWN
3531
end
3632

37-
next_step "add_commenting"
33+
next_step "make_a_posts_index_page"

sites/intermediate_rails/create_a_new_rails_app_with_a_static_home_page.step

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ end
2020

2121
tools_and_references do
2222
message <<-MARKDOWN
23-
* Rails Guides has a nice overview of controllers: <http://guides.rubyonrails.org/action_controller_overview.html>.
23+
* RailsGuides - Setting the Application Home Page: <http://guides.rubyonrails.org/getting_started.html#setting-the-application-home-page>.
24+
* Rails Guides - controllers overview: <http://guides.rubyonrails.org/action_controller_overview.html>.
2425
MARKDOWN
2526
end
2627

sites/intermediate_rails/install_devise.step

+5-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ discussion do
1414
message <<-MARKDOWN
1515
* What is devise?
1616
* What files did devise add to your rails app?
17+
* Someone Who Knows: explain how to read the output of the command `rake routes`. What does it give you? How is it helpful?
1718
* How will you add the log out link? What's the syntax for a DELETE action?
19+
* You're going to be editing your application layout to add error messaging. If you haven't already, discuss the relationship between the application layout and all the other views you'll be creating.
1820
MARKDOWN
1921
end
2022

@@ -30,11 +32,11 @@ hints do
3032
message <<-MARKDOWN
3133
* Readme files are your best friends! Love them!
3234
* The convention for naming models is to capitalize the first letter, like: User.
33-
* When you run rails generate devise:install, you get four instructions for things to configure. 2 & 3 are good to do.
35+
* When you run `rails generate devise:install`, you get four instructions for things to configure. 2 & 3 are good to do.
3436
* The routes file goes through many common types of routes in the comments. This is also your friend.
35-
* Devise has some magic that will help you with your logout link. Run rake routes and look for a route that helps you sign out.
36-
* Any time you generate a model in rails, you can use Rails Console to look at that model's methods and behavior interactively.
37+
* Devise has some magic that will help you with your logout link. Run `rake routes` and look for a route that helps you sign out.
3738
* You'll probably want to show the current user's email address only if they are presently signed in, right? Devise has a helper for you.
39+
* Optional: any time you generate a model in rails, you can use Rails Console to look at that model's methods and behavior interactively.
3840
MARKDOWN
3941
end
4042

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
requirements do
2+
message <<-MARKDOWN
3+
* The user should be able to see each post’s name, author, and date published on the overview page (aka the index page).
4+
* The name of the post should link to the post show page.
5+
* The index page should include a “New Post” link or button.
6+
MARKDOWN
7+
end
8+
9+
discussion do
10+
message <<-MARKDOWN
11+
* Maybe now would be a good time to discuss Active Record! Can anyone explain it?
12+
MARKDOWN
13+
end
14+
15+
tools_and_references do
16+
message <<-MARKDOWN
17+
* RailsGuides - Listing All Posts: http://guides.rubyonrails.org/getting_started.html#listing-all-posts
18+
* Feel free to disregard the JSON stuff on this page, if you're so inclined.
19+
* Bootstrap - Style that table! http://twitter.github.com/bootstrap/base-css.html#tables
20+
MARKDOWN
21+
end
22+
23+
hints do
24+
message <<-MARKDOWN
25+
26+
MARKDOWN
27+
end
28+
29+
next_step "add_commenting"

sites/intermediate_rails/make_it_pretty_with_bootstrap.step

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ hints do
2727
message <<-MARKDOWN
2828
* Don't forget to read the readme!
2929
* You’ll need to make your application.css file into a .scss file. (just add .scss to the end!)
30-
* There are a couple of Bootstrappy ways to move text around — you'll want to put your look for "Component alignment" in the docs.
30+
* There are a couple of Bootstrappy ways to move text around — look for "Component alignment" in the docs.
3131
* Devise has a helper method for accessing the current user's info - go back to the devise readme to find it.
3232
MARKDOWN
3333
end
3434

35-
next_step "add_posts_functionality"
35+
next_step "add_pages_to_create_and_look_at_individual_posts"

0 commit comments

Comments
 (0)