Is there a way to tell an entire controller to render a particular partial or text?
Example:
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
Now obviously I can go into each individual method and tell it to render something, but I was just curious to know if this is possible.
Thanks in advance!
you can tell an entire controller to render a layout.
if you want a controller to render the same action then you can create one action and pass it different options and find results by params conditions.
to explicitly answer your question. I don’t know.