Skip to content

Instantly share code, notes, and snippets.

@walf443
Last active August 29, 2015 14:05
Show Gist options
  • Save walf443/5f3a7311a1d66ac4f94c to your computer and use it in GitHub Desktop.
Save walf443/5f3a7311a1d66ac4f94c to your computer and use it in GitHub Desktop.
config/routes.rbを別ファイルへ分割したい
module SomeModule
def self.apply(context)
context.instance_exec do
# 実行させたい処理を書く
end
end
end
Your::Application.routes.draw do
SomeModule.apply(self)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment