{"id":16949021,"url":"https://github.com/technicalpickles/content_given","last_synced_at":"2026-05-18T01:06:48.773Z","repository":{"id":440741,"uuid":"62777","full_name":"technicalpickles/content_given","owner":"technicalpickles","description":"An ActionView helper for determining if content_for","archived":false,"fork":false,"pushed_at":"2008-10-14T03:42:36.000Z","size":76,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-07T21:42:58.794Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/technicalpickles.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}},"created_at":"2008-10-14T03:42:18.000Z","updated_at":"2019-08-13T13:38:01.000Z","dependencies_parsed_at":"2022-07-07T14:41:33.793Z","dependency_job_id":null,"html_url":"https://github.com/technicalpickles/content_given","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/technicalpickles/content_given","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicalpickles%2Fcontent_given","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicalpickles%2Fcontent_given/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicalpickles%2Fcontent_given/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicalpickles%2Fcontent_given/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/technicalpickles","download_url":"https://codeload.github.com/technicalpickles/content_given/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicalpickles%2Fcontent_given/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33161411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"ssl_error","status_checked_at":"2026-05-17T22:39:10.741Z","response_time":107,"last_error":"SSL_read: 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-13T21:52:57.247Z","updated_at":"2026-05-18T01:06:48.759Z","avatar_url":"https://github.com/technicalpickles.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# ContentGiven\n\nAdds a very small helper to your views for determining if `content_for :foo` was used.\n\nThis means you don't always have to render the containing markup around `yield :foo`.\n\n## Example\n\n\n### Before content\\_given:\n\n    \u003c!-- In app/views/layouts/application.html.erb %\u003e\n    \u003chtml\u003e\n      \u003cbody\u003e\n        \u003cdiv id=\"sidebar\"\u003e\n          \u003c%= yield :sidebar\n        \u003c/div\u003e\n        \n        \u003cdiv id=\"content\"\u003e\n          \u003c%= yield %\u003e\n        \u003c/div\u003e\n      \u003c/body\u003e\n    \u003c/html\u003e\n    \n`\u003cdiv id=\"sidebar\"\u003e` is always rendered.\n    \n### After content\\_given:\n\n    \u003c!-- In app/views/layouts/application.html.erb %\u003e\n    \u003chtml\u003e\n      \u003cbody\u003e\n        \u003c% if content_given? :sidebar %\u003e\n          \u003cdiv id=\"sidebar\"\u003e\n            \u003c%= yield :sidebar\n          \u003c/div\u003e\n        \u003c% end %\u003e\n        \n        \u003cdiv id=\"content\"\u003e\n          \u003c%= yield %\u003e\n        \u003c/div\u003e\n      \u003c/body\u003e\n    \u003c/html\u003e\n    \n`\u003cdiv id=\"sidebar\"\u003e` is only rendered if you used `content_for :sidebar`\n\n## Copyright\n\nCopyright (c) 2008 Josh Nichols, released under the MIT license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnicalpickles%2Fcontent_given","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechnicalpickles%2Fcontent_given","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnicalpickles%2Fcontent_given/lists"}