The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Finding a Rails Route from a Path

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jake Scruggs

Posts: 336
Nickname: aurorae314
Registered: Feb, 2008

Jake Scruggs is a developer at ThoughtWorks
Finding a Rails Route from a Path Posted: May 31, 2009 8:08 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Jake Scruggs.
Original Post: Finding a Rails Route from a Path
Feed Title: Jake Scruggs
Feed URL: http://jakescruggs.blogspot.com/feeds/posts/default
Feed Description: Ruby, Rails, Metrics, Testing, and pursuit of clean code.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Jake Scruggs
Latest Posts From Jake Scruggs

Advertisement
Fred Polgardy and I were looking up how to find out what path in the browser corresponds to what controller/action combination in a Rails application today and I realized that I've looked this up before... So I'm putting this information here so I can find it in the future:

(from inside the console)
>> ActionController::Routing::Routes.recognize_path '/seo/hotness/path/705105'
=> {:controller=>"products", :action=>"show", :id=>"705105"}

Yeah I know you can do a 'rake routes' and hunt around but this gets me where I need to be quicker.

Read: Finding a Rails Route from a Path

Topic: RubyGems 1.3.4 Previous Topic   Next Topic Topic: Moosy

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use