{"id":15705168,"url":"https://github.com/fdv/acts-as-resource","last_synced_at":"2026-01-26T02:32:49.062Z","repository":{"id":444304,"uuid":"66709","full_name":"fdv/acts-as-resource","owner":"fdv","description":"Acts as resource plugin","archived":false,"fork":false,"pushed_at":"2008-10-23T10:48:34.000Z","size":84,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-23T21:41:20.327Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fdv.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2008-10-23T10:48:33.000Z","updated_at":"2019-08-13T13:39:09.000Z","dependencies_parsed_at":"2022-07-07T14:41:43.292Z","dependency_job_id":null,"html_url":"https://github.com/fdv/acts-as-resource","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fdv/acts-as-resource","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdv%2Facts-as-resource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdv%2Facts-as-resource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdv%2Facts-as-resource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdv%2Facts-as-resource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fdv","download_url":"https://codeload.github.com/fdv/acts-as-resource/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdv%2Facts-as-resource/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28765062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T02:25:41.078Z","status":"ssl_error","status_checked_at":"2026-01-26T02:24:28.809Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-03T20:14:54.836Z","updated_at":"2026-01-26T02:32:49.026Z","avatar_url":"https://github.com/fdv.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"ActsAsResource\n==============\n\nacts_as_resource lets you handle nested resource controllers neatly without\nhaving to modify every single call to a named route to include the full list of\nresources used to reach the target resource.\n\nConsider a routing table like\n\n    map.resources :albums do |album|\n      album.resources :songs\n    end\n\nBy configuring your models like\n\n    class Album \u003c ActiveRecord::Base\n      has_many :songs\n      acts_as_resource\n    end\n\nand\n\n    class Song \u003c ActiveRecord::Base\n      belongs_to :album\n      acts_as_resource :parent =\u003e :album\n    end\n\nYou get a bunch of handy stuff. In your Song views, for instance, where before\nyou had to do +song_path @song.album, @song+, you can now do: +song_path @song+\nand the named route will use the 'parent' info to work out what objects are\nneeded to build the path.\n\nIn your controllers meanwhile, you get a generic +fetch_resources+ which\nautomagically fetches the appropriate resources for the request, checking that\nthey are properly accessible from the 'base' resource and assigns them\nto appropriately named instance variables (following the conventions used by\nthe resource_scaffolding that comes with Rails 1.2.1).\n\nYou also get a new controller method, +resource_chain+, that you can use for\nwriting generic actions. We don't *quite* have enough support to replace the\nscaffold generated controller with simple inheritance, but we're getting there.\n\nBug Reports\n===========\n\nThis is very much beta software with a distinct lack of either documentation or\ntests. I have (at least) worked out how to address the lack of tests, so expect\nmore tests in the next release.\n\nIn the mean time, if you have issues, drop me mail at \u003cpdcawley@bofh.org.uk\u003e,\nor, for the time being, post a ticket on the typo trac\nhttp://www.typosphere.org/, but tag the ticket [acts_as_plugin]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdv%2Facts-as-resource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffdv%2Facts-as-resource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdv%2Facts-as-resource/lists"}