you are here: codestackercodes [RSS] → tag feedburner [RSS]

feedburner on rails

class PostsController < ApplicationController
  def show
    respond_to do |format|
      format.html
      format.rss do
        unless request.env['HTTP_USER_AGENT'].match(/feedburner|feedvalidator/i)
          redirect_to 'http://feeds.feedburner.com/myfeedburner', :status=>307
        end
      end
    end
  end
end
Displaying 1 Code