提交 c6009b2d 编写于 作者: B blahedo

Merged sections to reflect current contents of guide.

Section "allowing the update of fields" was now just a general
introduction to the idea of the model (actual updating was two sections
later).  So, merged into the section about validation.
上级 69e7e6ba
......@@ -723,7 +723,7 @@ TIP: In development mode (which is what you're working in by default), Rails
reloads your application with every browser request, so there's no need to stop
and restart the web server when a change is made.
### Allowing the update of fields
### Adding Some Validation
The model file, `app/models/post.rb` is about as simple as it can get:
......@@ -738,8 +738,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.
### Adding Some Validation
Rails includes methods to help you validate the data that you send to models.
Open the `app/models/post.rb` file and edit it:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册