Module: Ext::AppUtil::Helpers

Defined in:
lib/ext/app_util.rb

Instance Method Summary collapse

Instance Method Details

#appObject

this is a curious method that’s needed because I can’t access MyApp::C in extensions. I think this is because of how constants are resolved in ruby. I’ve seen that Rite will change that. Mabye it will be not needed then.

In the meanwhile, you can use app::Controllers, app::Views, …



21
22
23
# File 'lib/ext/app_util.rb', line 21

def app
  @__app ||= Kernel.const_get(/^\w+/.match(self.class.name).to_a.first)
end