Layouts and Rendering in Rails 知识总览
- 同一个action中,render和redirect_to不能同时调用,也不能重复调用任意一个。
Rails默认render
render
- an Action’s View
- :nothing
- :file
- :action
- :template
- :plain
- :html
- :json
- :js
- :xml
- :content_type
- :layout
- :status
redirect_to
- :status
render 和 redirect_to 的区别
理解yield, 理解layout的作用
content_for
Partials
- :layout
- :locals
- :object