{"id":13484352,"url":"https://github.com/jackdempsey/acts_as_commentable","last_synced_at":"2025-12-17T08:05:34.340Z","repository":{"id":386228,"uuid":"3605","full_name":"jackdempsey/acts_as_commentable","owner":"jackdempsey","description":"The ActiveRecord acts_as_commentable plugin","archived":false,"fork":false,"pushed_at":"2023-01-12T10:51:16.000Z","size":73,"stargazers_count":835,"open_issues_count":24,"forks_count":182,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-27T16:40:17.451Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://juixe.com/svn/acts_as_commentable/","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/jackdempsey.png","metadata":{"files":{"readme":"README.rdoc","changelog":"CHANGELOG","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":"2008-03-12T07:11:22.000Z","updated_at":"2025-02-23T12:26:42.000Z","dependencies_parsed_at":"2023-01-14T11:00:21.884Z","dependency_job_id":null,"html_url":"https://github.com/jackdempsey/acts_as_commentable","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jackdempsey/acts_as_commentable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackdempsey%2Facts_as_commentable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackdempsey%2Facts_as_commentable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackdempsey%2Facts_as_commentable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackdempsey%2Facts_as_commentable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackdempsey","download_url":"https://codeload.github.com/jackdempsey/acts_as_commentable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackdempsey%2Facts_as_commentable/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27779877,"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-12-17T02:00:08.291Z","response_time":55,"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":"2024-07-31T17:01:22.934Z","updated_at":"2025-12-17T08:05:34.323Z","avatar_url":"https://github.com/jackdempsey.png","language":"Ruby","readme":"= Acts As Commentable\n\nProvides a single Comment model that can be attached to any model(s) within your app. It creates\na Comment model and handles the plumbing between that model and any models that you declare to be\ncommentable models.\n\n\n== Installation :\n\nAdd the following line to your Gemfile\n\n=== Rails 4\n\n  gem 'acts_as_commentable'\n\n=== Rails 3\n\n  gem 'acts_as_commentable', '3.0.1'\n\n=== Rails 2\n\n  gem 'acts_as_commentable', git: 'git@github.com:jackdempsey/acts_as_commentable.git', branch: '2.x'\n\n \n== Generator\n\n\n=== Rails 3+\n\n  rails g comment\n\n=== Rails 2\n  \n  script/generate comment\n\nThen migrate your database to add the comments model:\n\n  rake db:migrate\n\n== Usage\n\nMake the desired ActiveRecord model act as commentable:\n \n  class Post \u003c ActiveRecord::Base\n    acts_as_commentable\n  end\n\nAdd a comment to a model instance by adding the following to the controller:\n \n  commentable = Post.create\n  comment = commentable.comments.create\n  comment.title = \"First comment.\"\n  comment.comment = \"This is the first comment.\"\n  comment.save\n\n\nFetch comments for the commentable model by adding the following to the view:\n \n  commentable = Post.find(1)\n  comments = commentable.comments.recent.limit(10).all\n\nYou can also add different types of comments to a model:\n \n  class Todo \u003c ActiveRecord::Base\n    acts_as_commentable :public, :private\n  end\n\n*Note:* This feature is only available from version 4.0 and above\n\nTo fetch the different types of comments for this model:\n\n  public_comments = Todo.find(1).public_comments\n  private_comments = Todo.find(1).private_comments\n\n\nBy default, `acts_as_commentable` will assume you are using a `Comment` model.\nTo change this, or change any other join options, pass in an options hash:\n\n    class Todo \u003c ActiveRecord::Base\n      acts_as_commentable class_name: 'MyComment'\n    end\n\nThis also works in conjunction with comment types:\n\n    class Todo \u003c ActiveRecord::Base\n      acts_as_commentable :public, :private, { class_name: 'MyComment' }\n    end\n\n\n== Credits\n\nXelipe - This plugin is heavily influenced by Acts As Taggable.\n\n== Contributors\n\nJack Dempsey, Chris Eppstein, Jim Ray, Matthew Van Horn, Ole Riesenberg, ZhangJinzhu, maddox, monocle, mrzor, Michael Bensoussan\n\n== More\n\nhttp://www.juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/\nhttp://www.juixe.com/projects/acts_as_commentable\n","funding_links":[],"categories":["ORM/ODM Extensions"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackdempsey%2Facts_as_commentable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackdempsey%2Facts_as_commentable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackdempsey%2Facts_as_commentable/lists"}