Last active
August 29, 2015 13:57
-
-
Save r38y/9421780 to your computer and use it in GitHub Desktop.
Initializes a registry of view paths for the various themes in our apps.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is an initializer and used to set up various themes | |
# so we can use the same instances on each request | |
# I'm wondering if $path_set_registry should be a | |
# constant instead of a global variable | |
$path_set_registry = {} | |
Dir.entries('app/views/site_overrides').reject{|e| e.in?(['.', '..'])}.each do|domain| | |
paths = ["app/views/site_overrides/#{domain}"] | |
$path_set_registry[domain] = ActionView::PathSet.new(paths) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment