Skip to content

Instantly share code, notes, and snippets.

@jackdempsey
Created May 11, 2012 00:59
Show Gist options
  • Save jackdempsey/2656858 to your computer and use it in GitHub Desktop.
Save jackdempsey/2656858 to your computer and use it in GitHub Desktop.
Resolvers gem
1 module Resolvers
2 autoload :MobileFallbackResolver, 'resolvers/mobile_fallback_resolver'
3
4 #ActiveSupport.on_load(:action_controller) do
5 #append_view_path(MobileFallbackResolver.new('app/views'))
6 #end
7
8 # class Railtie < ::Rails::Railtie
9 # initializer 'resolvers.mobile_fallback_resolver' do |app|
10 # ActiveSupport.on_load(:action_controller) do
11 # append_view_path(MobileFallbackResolver.new('app/views'))
12 # end
13 # end
14 # end
15 end
@jackdempsey
Copy link
Author

Both commented out blocks seem to work correctly. Is one preferred over another, or better yet, is there a more correct way to do something like this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment