{"id":30678121,"url":"https://github.com/atd/rails_engine_decorators","last_synced_at":"2025-09-01T13:09:57.454Z","repository":{"id":4846212,"uuid":"6000525","full_name":"atd/rails_engine_decorators","owner":"atd","description":"Extend Rails Engine’s business logic (models, controllers, helpers, etc.) easily from your application or other engine.  ","archived":false,"fork":false,"pushed_at":"2017-01-24T18:59:07.000Z","size":30,"stargazers_count":23,"open_issues_count":1,"forks_count":12,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-20T19:46:07.942Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"cbpowell/MarqueeLabel","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atd.png","metadata":{"files":{"readme":"README.rdoc","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":"2012-09-28T17:17:21.000Z","updated_at":"2022-08-24T20:37:20.000Z","dependencies_parsed_at":"2022-09-05T13:12:06.547Z","dependency_job_id":null,"html_url":"https://github.com/atd/rails_engine_decorators","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/atd/rails_engine_decorators","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atd%2Frails_engine_decorators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atd%2Frails_engine_decorators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atd%2Frails_engine_decorators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atd%2Frails_engine_decorators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atd","download_url":"https://codeload.github.com/atd/rails_engine_decorators/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atd%2Frails_engine_decorators/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273129651,"owners_count":25050791,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-09-01T13:09:55.101Z","updated_at":"2025-09-01T13:09:57.443Z","avatar_url":"https://github.com/atd.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Rails Engine Decorators\n\nExtend Rails Engine's business logic (models, controllers, helpers, etc.) easily from\nyour application or other engine.\n\nThis solution was first implemented in the Forem engine, see https://github.com/radar/forem/pull/260\n\n== Authors\n\n* Kunal Chaudhari, https://github.com/kunalchaudhari\n* Ryan Bigg, https://github.com/radar\n* Philip Arndt, https://github.com/parndt\n* Antonio Tapiador, https://github.com/atd\n\n== Usage\n\n(From Forem's patch):\n\nStandard practice for including such changes in your application or extension is to create a file within the relevant app/models or app/controllers directory with the original class name with _decorator appended.\n\n### Adding a custom method to the Post model:\n    # app/decorators/models/forem/post_decorator.rb\n\n    Forem::Post.class_eval do\n      def some_method\n        ...\n      end\n    end\n\n### Adding a custom method to the PostsController:\n    # app/decorators/controllers/forem/posts_controller_decorator.rb\n\n    Forem::PostsController.class_eval do\n      def some_action\n        ...\n      end\n    end\n\nThe exact same format can be used to redefine an existing method.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatd%2Frails_engine_decorators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatd%2Frails_engine_decorators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatd%2Frails_engine_decorators/lists"}