Sha256: 972f538918ccdf7d76b0e4bc83af99ccd1c2d11cd350ab2f8d9b38c3c61b0eec

Contents?: true

Size: 290 Bytes

Versions: 1

Compression:

Stored size: 290 Bytes

Contents

module Highway
  class Application
    def get_controller_and_action(env)
      _, cont, action, after =
        env['PATH_INFO'].split('/', 4)
      cont = cont.capitalize # "People"
      cont += 'Controller' # 'PeopleController'

      [Object.const_get(cont), action]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
highways-0.0.2 lib/highway/routing.rb