aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorYoni Yalovitsky <yoni@fewbytes.com>2012-12-03 03:11:16 +0200
committerYoni Yalovitsky <yoni@fewbytes.com>2012-12-03 03:11:16 +0200
commit57c60d36d365c8722947001c42b722902b086e0a (patch)
tree8c79992d04f32691233677c9178040ca463e380b /guides
parentef4e8352fe39a7b7495c68aeaa77c5296b9de82d (diff)
downloadrails-57c60d36d365c8722947001c42b722902b086e0a.tar.gz
rails-57c60d36d365c8722947001c42b722902b086e0a.tar.bz2
rails-57c60d36d365c8722947001c42b722902b086e0a.zip
added full file path in all file references
It's really comfy being able to copy-paste the file paths. I suppose there's also some benefit in trying to figure out the file name as a small exercise, but I don't think that sort of thing belongs in "Getting Started".
Diffstat (limited to 'guides')
-rw-r--r--guides/source/getting_started.md18
1 files changed, 9 insertions, 9 deletions
diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md
index eefffbe87e..b1ca8da292 100644
--- a/guides/source/getting_started.md
+++ b/guides/source/getting_started.md
@@ -520,7 +520,7 @@ invoking the command: `rake db:migrate RAILS_ENV=production`.
### Saving data in the controller
Back in `posts_controller`, we need to change the `create` action
-to use the new `Post` model to save the data in the database. Open that file
+to use the new `Post` model to save the data in the database. Open `app/controllers/posts_controller.rb`
and change the `create` action to look like this:
```ruby
@@ -558,8 +558,8 @@ parameter, which in our case will be the id of the post. Note that this
time we had to specify the actual mapping, `posts#show` because
otherwise Rails would not know which action to render.
-As we did before, we need to add the `show` action in the
-`posts_controller` and its respective view.
+As we did before, we need to add the `show` action in
+`app/controllers/posts_controller.rb` and its respective view.
```ruby
def show
@@ -1216,7 +1216,7 @@ This command will generate four files:
| test/models/comment_test.rb | Testing harness for the comments model |
| test/fixtures/comments.yml | Sample comments for use in testing |
-First, take a look at `comment.rb`:
+First, take a look at `app/models/comment.rb`:
```ruby
class Comment < ActiveRecord::Base
@@ -1277,7 +1277,7 @@ this way:
* One post can have many comments.
In fact, this is very close to the syntax that Rails uses to declare this
-association. You've already seen the line of code inside the `Comment` model that
+association. You've already seen the line of code inside the `Comment` model (app/models/comment.rb) that
makes each comment belong to a Post:
```ruby
@@ -1286,7 +1286,7 @@ class Comment < ActiveRecord::Base
end
```
-You'll need to edit the `post.rb` file to add the other side of the association:
+You'll need to edit `app/models/post.rb` to add the other side of the association:
```ruby
class Post < ActiveRecord::Base
@@ -1609,7 +1609,7 @@ So first, let's add the delete link in the
Clicking this new "Destroy Comment" link will fire off a `DELETE
/posts/:post_id/comments/:id` to our `CommentsController`, which can then use
this to find the comment we want to delete, so let's add a destroy action to our
-controller:
+controller (`app/controllers/comments_controller.rb`):
```ruby
class CommentsController < ApplicationController
@@ -1667,7 +1667,7 @@ action if that method allows it.
To use the authentication system, we specify it at the top of our
`PostsController`, in this case, we want the user to be authenticated on every
-action, except for `index` and `show`, so we write that:
+action, except for `index` and `show`, so we write that in `app/controllers/posts_controller.rb`:
```ruby
class PostsController < ApplicationController
@@ -1682,7 +1682,7 @@ class PostsController < ApplicationController
```
We also only want to allow authenticated users to delete comments, so in the
-`CommentsController` we write:
+`CommentsController` (`app/controllers/comments_controller.rb`) we write:
```ruby
class CommentsController < ApplicationController