diff options
author | Oscar Del Ben <info@oscardelben.com> | 2012-04-25 12:18:55 +0200 |
---|---|---|
committer | Oscar Del Ben <info@oscardelben.com> | 2012-04-25 12:18:55 +0200 |
commit | 6f0929110464b40072b62cb1c55a0589059fe593 (patch) | |
tree | cf86a60a1f6fbda1ccb28f632499c75a376015b2 /guides | |
parent | f9f52435e7da8cce1b57e24035bdceacc61cab36 (diff) | |
download | rails-6f0929110464b40072b62cb1c55a0589059fe593.tar.gz rails-6f0929110464b40072b62cb1c55a0589059fe593.tar.bz2 rails-6f0929110464b40072b62cb1c55a0589059fe593.zip |
Add screenshot to updating post section
Diffstat (limited to 'guides')
-rw-r--r-- | guides/assets/images/getting_started/index_action_with_edit_link.png | bin | 0 -> 15547 bytes | |||
-rw-r--r-- | guides/source/getting_started.textile | 7 |
2 files changed, 6 insertions, 1 deletions
diff --git a/guides/assets/images/getting_started/index_action_with_edit_link.png b/guides/assets/images/getting_started/index_action_with_edit_link.png Binary files differnew file mode 100644 index 0000000000..6e58a13756 --- /dev/null +++ b/guides/assets/images/getting_started/index_action_with_edit_link.png diff --git a/guides/source/getting_started.textile b/guides/source/getting_started.textile index d52e3f65a7..78e9761570 100644 --- a/guides/source/getting_started.textile +++ b/guides/source/getting_started.textile @@ -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. @@ -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 |