You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sites/intermediate_rails/add_pages_to_create_and_look_at_individual_posts.step
+7-11
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,6 @@ requirements do
2
2
message <<-MARKDOWN
3
3
* The user should be able to create a post with a name, author, date published, and content. The author should be the current user.
4
4
* 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.
8
5
* If the user doesn’t submit all required fields, they should see some error messaging, but shouldn’t lose any of their work.
9
6
MARKDOWN
10
7
end
@@ -13,25 +10,24 @@ discussion do
13
10
message <<-MARKDOWN
14
11
* How do you create a resource? What parameters do you need to pass?
15
12
* 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?
19
14
MARKDOWN
20
15
end
21
16
22
17
tools_and_references do
23
18
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 Callbackshttp://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>
27
22
MARKDOWN
28
23
end
29
24
30
25
hints do
31
26
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!
33
28
* 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.)
Copy file name to clipboardExpand all lines: sites/intermediate_rails/install_devise.step
+5-3
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,9 @@ discussion do
14
14
message <<-MARKDOWN
15
15
* What is devise?
16
16
* 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?
17
18
* 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.
18
20
MARKDOWN
19
21
end
20
22
@@ -30,11 +32,11 @@ hints do
30
32
message <<-MARKDOWN
31
33
* Readme files are your best friends! Love them!
32
34
* 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.
34
36
* 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.
37
38
* 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.
0 commit comments