1
有没有办法告诉整个控制器渲染一个特定的部分或文本?Rails 3全局渲染
例子:
class PageNotesController < ApplicationController
render :text => "Testing"
def index
@notes = PageNotes.all
end
def show
@note = PageNotes.find(params[:id])
end
def create
@note = PageNotes.create(params[:note])
end
end
现在很明显,我可以进入每个人的方法,并告诉它渲染的东西,但我只是好奇,想知道这是可能的。
在此先感谢!
谢谢!这似乎是我的问题的最佳解决方案 – dennismonsewicz 2010-10-20 21:18:29