Skip to content

Instantly share code, notes, and snippets.

@ctrochalakis
Created July 7, 2010 07:25
Show Gist options
  • Save ctrochalakis/466417 to your computer and use it in GitHub Desktop.
Save ctrochalakis/466417 to your computer and use it in GitHub Desktop.
class Apiv2::MainController < ApplicationController
before_filter :lazy_developer
def lazy_developer
redirect_to params.merge(:host => 'localhost', :port => 3000) if params.key? :devel
redirect_to params.merge(:host => 'skroutz.gr', :port => 80) if params.key? :prod
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment