Skip to content

fix: use resource_default_view in frame field default_view#4658

Merged
adrianthedev merged 1 commit into
mainfrom
fix/frame-field-default-view-config
Jul 23, 2026
Merged

fix: use resource_default_view in frame field default_view#4658
adrianthedev merged 1 commit into
mainfrom
fix/frame-field-default-view-config

Conversation

@adrianthedev

@adrianthedev adrianthedev commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Avo::Fields::FrameBaseField#default_view called Avo.configuration.skip_show_view, which was removed and replaced by resource_default_view (a ViewInquirer). The old call would raise NoMethodError.

This maps the old behavior faithfully:

skip_show_view ? :edit : :show    resource_default_view.edit? ? :edit : :show

Matches how spec/system/avo/group_3/skip_show_view_spec.rb already sets resource_default_view = :edit.


Note

Low Risk
Single-line config API swap with equivalent behavior; no auth or data-path changes.

Overview
Avo::Fields::FrameBaseField#default_view no longer calls the removed skip_show_view config (which would raise NoMethodError). It now uses Avo.configuration.resource_default_view.edit? to pick :edit vs :show, matching the old skip_show_view ? :edit : :show behavior and the same pattern used elsewhere (e.g. show authorization).

Reviewed by Cursor Bugbot for commit bf81966. Bugbot is set up for automated code reviews on this repo. Configure here.

skip_show_view was removed from Avo.configuration and replaced by
resource_default_view; the frame field still called the removed method.
@github-actions github-actions Bot added the Fix label Jul 23, 2026
@adrianthedev
adrianthedev merged commit a6b3264 into main Jul 23, 2026
25 checks passed
@adrianthedev
adrianthedev deleted the fix/frame-field-default-view-config branch July 23, 2026 12:38
@github-actions

Copy link
Copy Markdown
Contributor

This PR has been merged into main. The functionality will be available in the next release.

Please check the release guide for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant