{"id":16701654,"url":"https://github.com/coryodaniel/within_named_scope","last_synced_at":"2025-04-10T04:12:10.336Z","repository":{"id":9839436,"uuid":"11829906","full_name":"coryodaniel/within_named_scope","owner":"coryodaniel","description":"Determine if an activerecord instance is within a named scope.","archived":false,"fork":false,"pushed_at":"2023-12-21T20:04:25.000Z","size":124,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T05:34:46.317Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/coryodaniel.png","metadata":{"files":{"readme":"README.markdown","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-08-01T23:03:55.000Z","updated_at":"2023-12-21T19:39:32.000Z","dependencies_parsed_at":"2025-02-16T14:37:53.673Z","dependency_job_id":"a9049fe0-c985-47c8-9e82-364a6a937d11","html_url":"https://github.com/coryodaniel/within_named_scope","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryodaniel%2Fwithin_named_scope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryodaniel%2Fwithin_named_scope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryodaniel%2Fwithin_named_scope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryodaniel%2Fwithin_named_scope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coryodaniel","download_url":"https://codeload.github.com/coryodaniel/within_named_scope/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154994,"owners_count":21056543,"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-12T18:45:03.919Z","updated_at":"2025-04-10T04:12:10.317Z","avatar_url":"https://github.com/coryodaniel.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Within Named Scope\n====================\n\nA simple gem for drying up checking if an ActiveRecord instance is within a named scope.\n\nSupport for Rails 3.2+ and 4.0+\n\nUsage\n---------------------\n\nUsing the 'in_scope?' method:\n\n```ruby\nclass Post \u003c ActiveRecord::Base\n  scope :published, -\u003e { where(published: true)}\nend\n\nPost.first.in_scope? :published\n```\n\nAdding a named method:\n\n```ruby\nclass Post \u003c ActiveRecord::Base\n  scope :published, -\u003e { where(published: true)}\n  \n  # Would default to published?\n  scope_membership :published, as: :is_published?\nend\n\nPost.first.is_published?\n```\n\n\nAuthors\n---------------------\n\n  * Cory ODaniel\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoryodaniel%2Fwithin_named_scope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoryodaniel%2Fwithin_named_scope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoryodaniel%2Fwithin_named_scope/lists"}