Skip to content

Instantly share code, notes, and snippets.

@satococoa
Created January 25, 2012 17:47
Show Gist options
  • Save satococoa/1677558 to your computer and use it in GitHub Desktop.
Save satococoa/1677558 to your computer and use it in GitHub Desktop.
lib/lokka/before.rb
# encoding: utf-8
module Lokka
module Before
def self.registered(app)
app.before do
# 追加
if request.host == '223soft.net' || request.host == 'www.223soft.net'
redirect 'http://blog-223soft.heroku.com'+request.path, 301
end
# /追加
@site = Site.first
@title = @site.title
# (以下省略)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment