Displaying 1 result from an estimated 1 matches for "xhtmlmp".
Did you mean:
xhtml
2007 Jan 20
0
Best way to force a respond_to format
...then I
may just fall through to the typical ACCEPT header.
I''m wondering what others thoughts are on the best way to do this.
I have found that I can simply set the params[:format] to what I want.
such as:
before_filter :typecheck
def typecheck
somelogic...
params[:format] = "xhtmlmp"
or...
params[:format] = "wml"
end
Then in my view, I will have a respond_to block something like.
respond_to do |format|
format.html
format.xml { :render :xml => @object.to_xml }
format.xhtmlmp { render :template => ''object/xhtmlmp-index'',...