Skip to content

Commit

Permalink
Add screenshot to updating post section
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardelben committed Apr 25, 2012
1 parent f9f5243 commit 6f09291
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion guides/source/getting_started.textile
Expand Up @@ -858,7 +858,7 @@ that you want to update. As before, if there was an error updating the
post we want to show the form back to the user.

TIP: you don't need to pass all attributes to +update_attributes+. For
example, if you'd call +@post.update_attributes(:title => 'A new title')
example, if you'd call +@post.update_attributes(:title => 'A new title')+
Rails would only update the +title+ attribute, leaving all other
attributes untouched.

Expand Down Expand Up @@ -894,6 +894,11 @@ Finally, we want to show a link to the +edit+ action in the +index+ and
| <%= link_to 'Edit', :action => :edit, :id => @post.id %>
</erb>

And here's how our app looks so far:

!images/getting_started/index_action_with_edit_link.png(Index action
with edit link)!

h4. Using the Console

To see your validations in action, you can use the console. The console is a
Expand Down

0 comments on commit 6f09291

Please sign in to comment.