Ticket #215 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

console mode - show_routes and url are broken

Reported by: kevw..@gmail.com Assigned to:
Priority: medium Milestone: 0.4.2
Component: Merb Keywords:
Cc:

Description

I ran "merb -i" and then "merb.show_routes and got:

show_routes(all_opts = false)

RouteMatcher?: NoMethodError?: undefined method `matcher' for Merb::Router:Class

from /opt/local/lib/ruby/gems/1.8/gems/merb-0.4.0/lib/merb/server.rb:376:in `show_routes' from (irb):1

changeset 439 deleted the Merb::Router.matcher, which is used in console mode and is (still) referred to inn Merb::Server line 376.

Change History

11/13/07 10:06:26 changed by iv..@gweezlebur.com

  • milestone changed from 0.4 to 0.4.2.

11/14/07 22:49:10 changed by iv..@gweezlebur.com

  • status changed from new to closed.
  • resolution set to fixed.

(In [1005]) Fix show_routes console helper (Closes #215)

11/14/07 22:49:21 changed by iv..@gweezlebur.com

The new router makes it harder to display routes in a pretty way, but here's what I've come up with:

>> merb.show_routes
Named Routes
  s: /foo
Anonymous Routes
  /:controller(/:action(/:id)?)?(\.:format)?
  /
=> nil
>> merb.url(:s)
=> "/foo"