Skip to content

Commit 6ed4160

Browse files
committed
update first post step
1 parent 3c5435b commit 6ed4160

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

sites/intermediate_rails/add_pages_to_create_and_look_at_individual_posts.step

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
requirements do
22
message <<-MARKDOWN
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.
3+
* The user should be able to create a post with a title, 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).
55
* If the user doesn’t submit all required fields, they should see some error messaging, but shouldn’t lose any of their work.
66
MARKDOWN
@@ -27,8 +27,9 @@ end
2727
discussion do
2828
message <<-MARKDOWN
2929
* How do you create a resource? What parameters do you need to pass?
30-
* Then: what did rails make for you when you called resource? Find all the new files. Maybe even list them out on a whiteboard.
31-
* 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?
30+
* How will you associate the current user with the post?
31+
* Then: what did rails make for you when you used the resource generator? Find all the new files. Maybe even list them out on a whiteboard.
32+
* What's the difference between the `new` and `create` methods in the posts controller?
3233
MARKDOWN
3334
end
3435

@@ -45,6 +46,7 @@ message <<-MARKDOWN
4546
* Don't hand code the form! You don't have to! Rails will help. See RailsGuide link above!
4647
* 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.
4748
* 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.)
49+
* You need a `create` method to store your post data - scroll down a little bit in this section of the Getting Started guide for very helpful information and to see an example of a create method: <http://guides.rubyonrails.org/getting_started.html#creating-new-posts>.
4850
MARKDOWN
4951
end
5052

0 commit comments

Comments
 (0)