Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

This project is archived and is in readonly mode.

ActiveRecord::Base#path function

#455

I had an idea for a helper function in ActiveRecord::Base, the #path function.

It could be used in tags like link_to, to assert the RESTful path for the model. ie:

Reported by Bryce · June 20th, 2008 @ 08:36 AM

State: invalid
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Bryce
    Bryce

    Well, for some reason the example didn't come up:

    link_to job.title, job.path

    June 20th, 2008 @ 08:37 AM

  2. Cheah Chu Yeow
    Cheah Chu Yeow

    Actually, you should already be able to do:

    link_to job.title, job_path # uses named route
    # OR
    link_to job.title, job # /jobs/[id]
    

    June 23rd, 2008 @ 04:26 PM

  3. Bryce
    Bryce

    Duh! Feel free to close this idiotic ticket

    On Tue, Jun 24, 2008 at 1:26 AM, Lighthouse

    wrote:

    June 23rd, 2008 @ 10:25 PM

  4. Jeremy Kemper
    Jeremy Kemper
    • State changed from new to invalid

    June 23rd, 2008 @ 11:09 PM