{"id":15405576,"url":"https://github.com/krisleech/path-finder","last_synced_at":"2025-03-24T21:41:37.644Z","repository":{"id":56887557,"uuid":"509509","full_name":"krisleech/Path-Finder","owner":"krisleech","description":"A Rails plugin which extends ActiveRecord to allow self-referential models (eg. acts_as_tree) to maintain a textual path representing itself and its ancestors.","archived":false,"fork":false,"pushed_at":"2010-02-11T12:46:25.000Z","size":80,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T04:44:46.423Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krisleech.png","metadata":{"files":{"readme":"README.textile","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-02-09T13:35:58.000Z","updated_at":"2013-12-04T18:30:34.000Z","dependencies_parsed_at":"2022-08-20T15:20:53.956Z","dependency_job_id":null,"html_url":"https://github.com/krisleech/Path-Finder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krisleech%2FPath-Finder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krisleech%2FPath-Finder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krisleech%2FPath-Finder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krisleech%2FPath-Finder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krisleech","download_url":"https://codeload.github.com/krisleech/Path-Finder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245359248,"owners_count":20602322,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T16:17:13.182Z","updated_at":"2025-03-24T21:41:37.614Z","avatar_url":"https://github.com/krisleech.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"h2. PathFinder\n\nA Rails plugin which extends ActiveRecord using the decorator pattern to allow self-referential models (eg. acts_as_tree) to maintain a textual path representing itself and its ancestors.\n\nh3. Install\n\ngem install path_finder\n\nh3. Example\n\nIn association with a catch-all route you can find a record using the URL:\n\nHierarchy -\u003e Generated Path\n\n# Categories -\u003e /categories\n## Books -\u003e /categories/books\n### Hardback -\u003e /categories/books/hardback\n### Paperback -\u003e /categories/books/paperback\n## Websites -\u003e /categories/websites\n\t\nExample URL: http://mywebsite.co.uk/categories/books/hardback\n\t\n_category_controller.rb_\n\ndef show\n  @category = Category.find_by_path(request.path)\nend\n\n_category.rb_\n\nclass Category \u003c ActiveRecord::Base\n  acts_as_tree\n  path_finder :column =\u003e 'path', :uid =\u003e 'to_param', :deliminator =\u003e '/'\n\n\tdef to_param\n\t\tpermalink\n\tend\nend\n\nh3. Notes\n\nThe model must respond_to 'children'\n\nCopyright (c) 2010 Kris Leech, released under the MIT license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrisleech%2Fpath-finder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrisleech%2Fpath-finder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrisleech%2Fpath-finder/lists"}