/ Published in: Rails
Put the following in your controller to define the content-type for *that* specific controller.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
class SampleController < ApplicationController def index headers["Content-Type"] = "text/html" # Use "text/xml" for XML files and so forth. end end