diff options
author | Ryan Bigg <radarlistener@gmail.com> | 2012-05-16 17:47:34 +1000 |
---|---|---|
committer | Ryan Bigg <radarlistener@gmail.com> | 2012-05-16 18:05:35 +1000 |
commit | 9a8c91d8e8d958eed5c0854517428104f585149b (patch) | |
tree | ccf4b060d5352376f1485838f40cc634c5f8c20f /guides/source | |
parent | aa7f2a3564aeae17adfbf0c8f40fe38b072c7d52 (diff) | |
download | rails-9a8c91d8e8d958eed5c0854517428104f585149b.tar.gz rails-9a8c91d8e8d958eed5c0854517428104f585149b.tar.bz2 rails-9a8c91d8e8d958eed5c0854517428104f585149b.zip |
[getting started] add attr_accessible to Post model
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/getting_started.textile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/guides/source/getting_started.textile b/guides/source/getting_started.textile index d718ba409a..c33e92c547 100644 --- a/guides/source/getting_started.textile +++ b/guides/source/getting_started.textile @@ -672,6 +672,8 @@ 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 |