aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--guides/source/getting_started.md11
1 files changed, 0 insertions, 11 deletions
diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md
index e4e65d99d2..d181bed424 100644
--- a/guides/source/getting_started.md
+++ b/guides/source/getting_started.md
@@ -693,7 +693,6 @@ The model file, `app/models/post.rb` is about as simple as it can get:
```ruby
class Post < ActiveRecord::Base
- attr_accessible :text, :title
end
```
@@ -703,12 +702,6 @@ your Rails models for free, including basic database CRUD (Create, Read, Update,
Destroy) operations, data validation, as well as sophisticated search support
and the ability to relate multiple models to one another.
-Rails includes methods to help you secure some of your model fields. The Rails
-model generator added the `attr_accessible` line to your model file. This change
-will ensure that all changes made through HTML forms can edit the content of
-the text and title fields. Accessible attributes and the mass assignment problem is covered in
-details in the [Security guide](security.html#mass-assignment)
-
### Adding Some Validation
Rails includes methods to help you validate the data that you send to models.
@@ -716,8 +709,6 @@ Open the `app/models/post.rb` file and edit it:
```ruby
class Post < ActiveRecord::Base
- attr_accessible :text, :title
-
validates :title, presence: true,
length: { minimum: 5 }
end
@@ -1229,7 +1220,6 @@ First, take a look at `comment.rb`:
```ruby
class Comment < ActiveRecord::Base
belongs_to :post
- attr_accessible :body, :commenter
end
```
@@ -1292,7 +1282,6 @@ makes each comment belong to a Post:
```ruby
class Comment < ActiveRecord::Base
belongs_to :post
- attr_accessible :body, :commenter
end
```