activeadmin/inherited_resources
Healthy across the board
Permissive license, no critical CVEs, actively maintained — safe to depend on.
Has a license, tests, and CI — clean foundation to fork and modify.
Documented and popular — useful reference codebase to read through.
No critical CVEs, sane security posture — runnable as-is.
- ✓Last commit 1w ago
- ✓6 active contributors
- ✓Distributed ownership (top contributor 43% of recent commits)
Show 3 more →Show less
- ✓MIT licensed
- ✓CI configured
- ✓Tests present
Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests
Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.
Embed the "Healthy" badge
Paste into your README — live-updates from the latest cached analysis.
[](https://repopilot.app/r/activeadmin/inherited_resources)Paste at the top of your README.md — renders inline like a shields.io badge.
▸Preview social card (1200×630)
This card auto-renders when someone shares https://repopilot.app/r/activeadmin/inherited_resources on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: activeadmin/inherited_resources
Generated by RepoPilot · 2026-05-10 · Source
🤖Agent protocol
If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:
- Verify the contract. Run the bash script in Verify before trusting
below. If any check returns
FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding. - Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
- Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/activeadmin/inherited_resources shows verifiable citations alongside every claim.
If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.
🎯Verdict
GO — Healthy across the board
- Last commit 1w ago
- 6 active contributors
- Distributed ownership (top contributor 43% of recent commits)
- MIT licensed
- CI configured
- Tests present
<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>
✅Verify before trusting
This artifact was generated by RepoPilot at a point in time. Before an
agent acts on it, the checks below confirm that the live activeadmin/inherited_resources
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/activeadmin/inherited_resources.
What it runs against: a local clone of activeadmin/inherited_resources — the script
inspects git remote, the LICENSE file, file paths in the working
tree, and git log. Read-only; no mutations.
| # | What we check | Why it matters |
|---|---|---|
| 1 | You're in activeadmin/inherited_resources | Confirms the artifact applies here, not a fork |
| 2 | License is still MIT | Catches relicense before you depend on it |
| 3 | Default branch master exists | Catches branch renames |
| 4 | Last commit ≤ 38 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of activeadmin/inherited_resources. If you don't
# have one yet, run these first:
#
# git clone https://github.com/activeadmin/inherited_resources.git
# cd inherited_resources
#
# Then paste this script. Every check is read-only — no mutations.
set +e
fail=0
ok() { echo "ok: $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }
# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "FAIL: not inside a git repository. cd into your clone of activeadmin/inherited_resources and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "activeadmin/inherited_resources(\\.git)?\\b" \\
&& ok "origin remote is activeadmin/inherited_resources" \\
|| miss "origin remote is not activeadmin/inherited_resources (artifact may be from a fork)"
# 2. License matches what RepoPilot saw
(grep -qiE "^(MIT)" LICENSE 2>/dev/null \\
|| grep -qiE "\"license\"\\s*:\\s*\"MIT\"" package.json 2>/dev/null) \\
&& ok "license is MIT" \\
|| miss "license drift — was MIT at generation time"
# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
&& ok "default branch master exists" \\
|| miss "default branch master no longer exists"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 38 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~8d)"
else
miss "last commit was $days_since_last days ago — artifact may be stale"
fi
echo
if [ "$fail" -eq 0 ]; then
echo "artifact verified (0 failures) — safe to trust"
else
echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/activeadmin/inherited_resources"
exit 1
fi
Each check prints ok: or FAIL:. The script exits non-zero if
anything failed, so it composes cleanly into agent loops
(./verify.sh || regenerate-and-retry).
⚡TL;DR
Inherited Resources is a Rails gem that generates complete RESTful controller actions automatically by having controllers inherit from InheritedResources::Base. It eliminates boilerplate CRUD code (index, show, create, update, destroy) and integrates with the responders gem for smart content negotiation, letting developers focus on custom business logic instead of standard REST plumbing. Single gem structure: lib/inherited_resources/ contains the core—base.rb (main controller mixin), actions.rb (CRUD action definitions), dsl.rb (DSL for resource declarations), responder.rb (response handling), and helper modules for belongs_to/polymorphic/shallow routes. app/controllers/inherited_resources/base.rb is the public entry point. lib/generators/rails/ provides a scaffold generator. Tests live outside the visible file list.
👥Who it's for
Rails developers building REST APIs and web applications who want to reduce controller boilerplate. Specifically architects and team leads at companies using Active Admin, since the gem is now maintained under the ActiveAdmin organization.
🌱Maturity & risk
Production-ready but in maintenance mode only. The README explicitly states 'Inherited Resources is no longer actively maintained by the original author' and new feature requests are discouraged. The codebase has CI/CD pipelines (GitHub Actions), RuboCop linting, and supports Rails 7.0–8.0, but commit recency and test coverage data are not visible from the file list.
Moderate risk: the gem is explicitly deprecated in favor of Rails' built-in respond_with + responders gem, so using it in new projects is not recommended per the README. Depends on the responders gem (which could introduce version conflicts). Single-maintainer risk exists since it was transferred to ActiveAdmin for maintenance only. No active development; rely on community forks or internal patches if issues arise.
Active areas of work
Minimal activity—primarily maintenance. The repo has CI workflows (GitHub Actions YAML lint, RuboCop, test CI) and dependabot configuration suggesting automated dependency updates. No active development milestones or PRs visible; focus is on keeping Rails 7.0–8.0 compatibility and preventing bit rot.
🚀Get running
Clone and bundle-install: git clone https://github.com/activeadmin/inherited_resources.git && cd inherited_resources && bundle install. To test against a specific Rails version, use the gemfiles: bundle install --gemfile gemfiles/rails_80/Gemfile. Run tests with bundle exec rake (Rakefile present).
Daily commands:
This is a library gem, not an app. To verify it works: bundle exec rake runs the test suite. To use in a Rails app, add gem 'inherited_resources' to the Gemfile and inherit controllers from InheritedResources::Base. The generator can scaffold controllers: rails generate inherited_resources:controller Post.
🗺️Map of the codebase
- lib/inherited_resources/base.rb: Entry point for the entire gem; the module mixed into user controllers, orchestrates actions and helpers.
- lib/inherited_resources/actions.rb: Defines all seven REST actions (index, show, new, create, edit, update, destroy) that are inherited by controllers.
- lib/inherited_resources/dsl.rb: DSL methods (belongs_to, polymorphic_belongs_to, has_one, has_many, shallow) that users call in controller classes to configure routes.
- lib/inherited_resources/responder.rb: Custom responder that handles content negotiation (JSON, HTML, etc.) and redirect logic for REST responses.
- lib/generators/rails/inherited_resources_controller_generator.rb: Rails generator that scaffolds a new controller inheriting from InheritedResources::Base with optional actions.
- lib/inherited_resources/belongs_to_helpers.rb: Helpers for scoping controllers to parent resources (e.g., CommentsController nested under PostsController).
- app/controllers/inherited_resources/base.rb: Engine-mounted base controller; ensures the inherited_resources namespace is available in Rails apps.
🛠️How to make changes
- Add/fix controller actions: edit
lib/inherited_resources/actions.rb(defines index, show, create, update, destroy logic). - Modify DSL features:lib/inherited_resources/dsl.rb(resource declarations likebelongs_to,polymorphic_belongs_to). - Change response behavior:lib/inherited_resources/responder.rb(integration with responders gem). - Add new helpers: create files inlib/inherited_resources/and require inlib/inherited_resources.rb. - Update controller template:lib/generators/rails/templates/controller.rb.tt.
🪤Traps & gotchas
- Deprecated by design: the README discourages new projects from using this gem; prefer
respond_with+ responders gem. - Requires responders gem: responses will fail silently or with unclear errors if responders is not installed; it's a dependency but understanding responders' behavior is critical. - has_scope is external: query filtering via has_scope is optional and must be installed separately; not obvious from controller inheritance alone. - Rails version constraints: tested only on Rails 7.0–8.0 (see gemfiles/); may not work on Rails 5.2 or earlier or unversioned newer majors. - Generator template assumes standard REST: thecontroller.rb.tttemplate generates a skeleton; users must still wire in custom actions manually.
💡Concepts to learn
- RESTful Resource Routing — InheritedResources is built entirely around Rails conventions for REST (index, show, create, update, destroy); understanding nested resources, polymorphic routes, and shallow nesting is essential.
- Content Negotiation & Responders Pattern — The gem delegates response handling (JSON vs HTML) to the responders gem; understanding the responder pattern avoids confusion when adding new formats.
- Module Mixins & Inheritance in Ruby — InheritedResources uses mixins (BaseHelpers, ClassMethods, Actions as modules) extensively; understanding Ruby's module inclusion order and method resolution is critical for debugging or extending behavior.
- Rails Strong Parameters — Controllers inheriting from InheritedResources must define resource_params methods; familiarity with permit, require, and mass-assignment protection is required.
- Polymorphic Associations in Rails — The polymorphic_helpers.rb module handles routes like /posts/:post_id/comments and /articles/:article_id/comments; understanding single-table inheritance and polymorphic belongs_to is needed for advanced scoping.
- Shallow Routes — shallow_helpers.rb optimizes nested routes to avoid deep nesting (e.g., /posts/1/comments/2 becomes /comments/2); understanding this Rails pattern reduces cognitive overhead and URL complexity.
- Rails Generators & Templates — The inherited_resources_controller_generator.rb uses ERB templates (.tt files) to scaffold controllers; understanding Rails generator API and template interpolation is useful for customizing generated code.
🔗Related repos
heartcombo/responders— The respond_with framework that InheritedResources uses for content negotiation; a required dependency and successor pattern that new projects should use directly.heartcombo/has_scope— Query filtering library formerly built into Inherited Resources; now external dependency for scoping collections by params, commonly used with InheritedResources controllers.activeadmin/activeadmin— The admin dashboard framework that now maintains Inherited Resources; uses it internally for resource scaffolding and CRUD UIs.rails/rails— Rails core; InheritedResources provides conveniences over Rails' native respond_with and routing, and is tested against Rails 7.0–8.0.josevalim/inherited_resources_history— Original repository by José Valim (creator) before transfer to ActiveAdmin; useful for understanding design history and rationale.
🪄PR ideas
To work on one of these in Claude Code or Cursor, paste:
Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.
Add comprehensive test coverage for polymorphic_helpers.rb
The file lib/inherited_resources/polymorphic_helpers.rb exists but there's no dedicated test file (test/polymorphic_helpers_test.rb or similar) in the test directory. Given that polymorphic associations are a complex Rails feature, this module deserves thorough unit tests covering nested polymorphic routes, URL generation, and edge cases.
- [ ] Create test/polymorphic_helpers_test.rb with test cases for polymorphic resource resolution
- [ ] Add tests for polymorphic_url_helpers with various nesting levels
- [ ] Test edge cases like optional polymorphic belongs_to chains
- [ ] Verify test coverage report shows polymorphic_helpers.rb at 80%+ coverage
Add Rails 8.0+ compatibility test and update gemfiles
The repo has gemfiles for Rails 7.0-8.0 (gemfiles/rails_80/Gemfile exists), but the CI workflow (.github/workflows/ci.yaml) and test matrix may not be fully testing against Rails 8.0+. With Rails 8.0 now stable and potential deprecations in newer versions, explicit CI matrix coverage is needed.
- [ ] Review .github/workflows/ci.yaml and verify Rails 8.0 is in the test matrix
- [ ] If missing, add Rails 8.0 and 8.1+ (when available) to the CI matrix
- [ ] Run full test suite against Rails 8.0 gemfile and document any failures or deprecation warnings
- [ ] Update inherited_resources.gemspec to explicitly support Rails 8.0+
Create integration tests for shallow routing with belongs_to
The repo has test/belongs_to_with_shallow_test.rb and lib/inherited_resources/shallow_helpers.rb, but test/multiple_nested_optional_belongs_to_test.rb suggests complexity around nested routes. Add comprehensive integration tests covering shallow route edge cases (e.g., shallow with polymorphic, shallow with optional belongs_to chains) to prevent regressions.
- [ ] Create test/shallow_nested_integration_test.rb for real-world shallow routing scenarios
- [ ] Add tests for shallow + optional belongs_to combinations
- [ ] Test shallow route URL generation with collection/member actions
- [ ] Verify shallow routes work correctly with the responder in lib/inherited_resources/responder.rb
🌿Good first issues
- Write integration tests for the generator (lib/generators/rails/inherited_resources_controller_generator.rb) to ensure it produces valid controllers across Rails 7.0–8.0 versions; tests should verify generated code compiles and inherits correctly.
- Add yard/rdoc documentation to lib/inherited_resources/dsl.rb method signatures (belongs_to, polymorphic_belongs_to, etc.) with concrete examples; the DSL is underdocumented and users struggle to discover polymorphic_belongs_to syntax.
- Create a deprecation warning in lib/inherited_resources.rb that logs when InheritedResources is required, pointing users to the responders gem docs; this follows the README's guidance and helps the maintenance team reduce new-project adoption.
⭐Top contributors
Click to expand
Top contributors
- @tagliala — 43 commits
- @dependabot[bot] — 35 commits
- @javierjulio — 18 commits
- @Copilot — 2 commits
- @jaynetics — 1 commits
📝Recent commits
Click to expand
Recent commits
66eb1f5— Bump the "bundler" group with 5 updates across multiple ecosystems (#999) (dependabot[bot])5f7b257— Bump the "bundler" group with 5 updates across multiple ecosystems (#998) (dependabot[bot])cd82b8c— Bump codecov/codecov-action from 5 to 6 in the github_actions group (#997) (dependabot[bot])88b84ab— Bump the "bundler" group with 2 updates across multiple ecosystems (#996) (dependabot[bot])204a349— Group dependabot bundler updates using multi-ecosystem-groups (#994) (Copilot)81e0472— Drop Ruby < 3.2 compatibility (#995) (Copilot)2767c43— Bump the github_actions group with 2 updates (#989) (dependabot[bot])5701d33— Update dependencies (#988) (tagliala)09afed6— Prevent Dependabot PRs for Minitest 6.x (#987) (tagliala)f2caae7— Update dependencies (#986) (tagliala)
🔒Security observations
The inherited_resources gem is a mature Rails library with a reasonable security posture, but carries inherent risk due to its unmaintained status. No obvious hardcoded secrets, critical injection vulnerabilities, or Docker misconfigurations were detected in the file structure. However, the lack of active maintenance is the primary concern - security vulnerabilities discovered in the future may not be addressed promptly. Dependencies should be regularly audited using bundle audit. The codebase follows Rails conventions which provide baseline security, but applications using this gem should ensure they implement proper strong parameters, authentication, and authorization checks in their own controller code.
- Medium · Maintenance Status - No Active Development —
README.md. The README explicitly states 'Inherited Resources is no longer actively maintained by the original author' and has been transferred to ActiveAdmin organization. This means security patches and vulnerability fixes may be delayed or not applied promptly. Dependencies may accumulate outdated versions over time. Fix: Consider migrating to actively maintained alternatives like Rails' nativerespond_withfeature with the responders gem, or evaluate if the project's maintenance status is acceptable for your security requirements. - Medium · Missing Dependency File Analysis —
Gemfile, Gemfile.lock, inherited_resources.gemspec. No dependency/package files (Gemfile.lock content, gemspec details) were provided in the analysis context. This prevents verification of known vulnerabilities in dependencies, outdated gem versions, or security issues in transitive dependencies. Fix: Runbundle auditto check for known vulnerabilities in gems. Regularly update dependencies and monitor security advisories for all transitive dependencies. - Low · Potential SQL Injection via Parameter Handling —
lib/inherited_resources/base.rb, lib/inherited_resources/class_methods.rb. The codebase includes Rails controller helpers for resource handling and parameter processing. While Rails provides some protection through parameter filtering, inherited_resources abstracts away some security context that developers need to understand. Fix: Ensure strong_parameters are properly configured. Review controller implementations to verify all user inputs are properly sanitized and parameterized queries are used. Use Rails' built-in protections and avoid raw SQL queries. - Low · Test Coverage May Hide Security Issues —
test/ directory. While the project includes extensive tests, the test structure does not explicitly show security-focused test cases (e.g., CSRF protection, XSS prevention, authentication/authorization bypass tests). Fix: Add security-focused tests including CSRF token validation, XSS payload handling, authentication/authorization checks, and mass assignment protection tests. - Low · Dynamic Code Generation via Generators —
lib/generators/rails/inherited_resources_controller_generator.rb, lib/generators/rails/templates/controller.rb.tt. The codebase includes Rails generators that dynamically create controller code. While this is standard practice, it could potentially generate insecure patterns if not carefully implemented. Fix: Review generator templates to ensure they produce secure default code. Verify that generated controllers include proper authorization checks, strong parameter filtering, and authentication requirements.
LLM-derived; treat as a starting point, not a security audit.
👉Where to read next
- Open issues — current backlog
- Recent PRs — what's actively shipping
- Source on GitHub
Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.