Return to Snippet

Revision: 18608
at October 4, 2009 14:51 by chrisamini


Initial Code
class SampleController < ApplicationController
  def index
    headers["Content-Type"] = "text/html"  # Use "text/xml" for XML files and so forth.
  end
end

Initial URL


Initial Description
Put the following in your controller to define the content-type for *that* specific controller.

Initial Title
Set Content-Type

Initial Tags
rails, ruby

Initial Language
Rails