Module: Rails::ExtJS::Direct::Controller::Helper
- Defined in:
- lib/rails-extjs-direct/helpers/direct_controller_helper.rb
Instance Method Summary collapse
Instance Method Details
#get_extjs_direct_provider(type, url = nil) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/rails-extjs-direct/helpers/direct_controller_helper.rb', line 2 def get_extjs_direct_provider(type, url=nil) @providers = {} if @providers.nil? if @providers[type].nil? begin @providers[type] = "Rails::ExtJS::Direct::#{type.capitalize}Provider".constantize.new(type, url) rescue NameError raise StandardError.new("Unknown Direct Provider '#{type}'") end end @providers[type] end |