-
Notifications
You must be signed in to change notification settings - Fork 42
Home
happypeter edited this page Nov 5, 2014
·
45 revisions
- 已添加 font-awesome 为例子,提一下 gem
开始表单讲解。如果用户能自己从网页提交新 issue 数据,那是用起来才算方便。这就要用到 form 表单了,表单相当于网页的耳朵,用来听取用户发出的声音。
- form_for 的 learning curve 非常的 steep
- params[:things]
- complex routes requirements
- model should be there
- Blog.new(params[:blog])
- post action
- strong params
最好能把这个坡拉缓,提前用用 post/model/params/rails console 等工具。
中级内容先不讲:
- session 管理,current_user 是怎么来的, authentication ...
- comments 表里面村上用户的 name 和 email 也可以取出 avtar 来
- 复杂的 route 中级中最好也别讲
- 打造常用 form 使用技巧集合
- 部署到 digitalocean,不讲,最后展望一下就好
- 例子还是选择 http://offline.happycasts.net/