Sha256: 0208ab35dc85a1a107eff3507a9baf13ffb66c9987514abdcad5dcff2e7c809f

Contents?: true

Size: 1014 Bytes

Versions: 11

Compression:

Stored size: 1014 Bytes

Contents

# require_relative './jeff_controller.rb'

# module ActionDispatch
#   module Routing
#     class RouteSet
#       class Dispatcher
#         def controller(params, default_controller=true)
#           if params && params.key?(:controller)
#             controller_param = params[:controller]
#             controller_reference(controller_param)
#           end
#         rescue NameError => e
#           raise ActionController::RoutingError, e.message, e.backtrace if default_controller
#         end

#         def controller_reference(controller_param)
#           begin
#             const_name = @controller_class_names[controller_param] ||= "#{controller_param.camelize}Controller"
#             ActiveSupport::Dependencies.constantize(const_name)
#           rescue NameError => e
#             Kernel.class_eval("class ::#{const_name} < ApplicationController; end")
#             ActiveSupport::Dependencies.constantize("::#{const_name}")
#           end
#         end
#       end
#     end
#   end
# end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ez-1.3.0 lib/ez/dispatcher.rb
ez-1.2.0 lib/ez/dispatcher.rb
ez-1.1.3 lib/ez/dispatcher.rb
ez-1.1.2 lib/ez/dispatcher.rb
ez-1.1.1 lib/ez/dispatcher.rb
ez-1.1.0 lib/ez/dispatcher.rb
ez-1.0.0 lib/ez/dispatcher.rb
ez-0.9.9 lib/ez/dispatcher.rb
ez-0.9.7 lib/ez/dispatcher.rb
ez-0.9.6 lib/ez/dispatcher.rb
ez-0.9.5 lib/ez/dispatcher.rb