Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config.buttons_on_form_footers breaks new belongs_to record functionality #2008

Closed
4 of 10 tasks
xeron opened this issue Nov 1, 2023 · 0 comments · Fixed by #2020
Closed
4 of 10 tasks

config.buttons_on_form_footers breaks new belongs_to record functionality #2008

xeron opened this issue Nov 1, 2023 · 0 comments · Fixed by #2020
Assignees
Labels

Comments

@xeron
Copy link

xeron commented Nov 1, 2023

Describe the bug

Creating a belongs_to record from the associated record screen doesn't work when buttons on form footer are enabled.

#1876 (comment)

Steps to Reproduce

Steps to reproduce the behavior:

  1. Add this configuration config.buttons_on_form_footers = true
  2. Go to new record which has belongs_to field
  3. Click on 'Create new $parent_model' link under the belongs_to selector
  4. See the error No route matches {:action=>"new", :controller=>"avo/$parent_model"}

Expected behavior & Actual behavior

It should open a new modal window with new parent record form. It shows no route error instead.

Models and resource files

This is enough to reproduce the issue as long as config.buttons_on_form_footers = true is set in config/initializers/avo.rb:

./bin/rails g scaffold author name:string
./bin/rails g scaffold post title:string content:text author:references

System configuration

Avo version: 2.43.0

Rails version: 7.1.1

Ruby version: 3.2.2

License type:

  • Community
  • Pro

Are you using Avo monkey patches, overriding views or view components?

  • Yes. If so, please post code samples.
  • No

Screenshots or screen recordings

N/A

Additional context

A bit more context in comments: #1876 (comment)

Impact

  • High impact (It makes my app un-usable.)
  • Medium impact (I'm annoyed, but I'll live.)
  • Low impact (It's really a tiny thing that I could live with.)

Urgency

  • High urgency (I can't continue development without it.)
  • Medium urgency (I found a workaround, but I'd love to have it fixed.)
  • Low urgency (It can wait. I just wanted you to know about it.)
@adrianthedev adrianthedev moved this to Next up in Issues Nov 1, 2023
@Paul-Bob Paul-Bob self-assigned this Nov 9, 2023
@Paul-Bob Paul-Bob added the Avo 2 label Nov 9, 2023
@Paul-Bob Paul-Bob moved this from Next up to In Progress in Issues Nov 9, 2023
@Paul-Bob Paul-Bob moved this from In Progress to In Review in Issues Nov 9, 2023
@github-project-automation github-project-automation bot moved this from In Review to Done in Issues Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants