-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Value of submit button lost after upgrate to rails_admin 3.0 #3513
Comments
The code in For the |
Thanks for your reply Mitsuhiro. The code in Regarding
Above, I'll modify a version of |
I copied in and modified
Worked a treat. Thanks very much Mitsuhiro! |
I don't know if it's related but since rails_admin 3.x, the
I have no solution to load |
I had the same problem and so copied
|
That's what I was planning to do at first but I would have to check every It seems to me that it should not be async using sprockets. Or at least give a possibility to change it in settings or override it without having to patch it. This library should load its dependencies first or let sprockets settings to handle the order so that I can make sure jQuery is loaded when I need it even if it's async. |
Thanks for the comments. I came to conclude that it would make more sense to use |
Describe the bug
I use a number of submit buttons on my forms, and distinguish between them by reading the value of
params[:button]
. After upgrade to rails_admin 3.0, irrespective of the submit button pressed, the value ofparams[:button]
is alwaystrue
.Reproduction steps
Have a form with submit buttons..
Expected behavior
Clicking on
First button
should result inparams[:button]
returningbutton_1
, and similarly clicking onSecond button
should result inparams[:button]
returningbutton_2
but they both return value oftrue
inparams[:button]
Additional context
rails
version: 6.1.5rails_admin
version: 3.0rails_admin
npm package version: using sprocketsAdd any other context about the problem here.
In order to get rails_admin 3.0 to initialise on each form, I had to change the sprockets load to
defer
by copying_head.html.erb
from gem intolayouts/rails_admin/_head.html.erb
and changingasyncto defer..I think there could be two reasons for my troubles..
I tracked it down to
src/rails_admin/ui.js
changing my DOM - why does rails_admin 3.0 do this and is there any way of disabling this feature other than hacking out the code?By the way thanks for maintaining this fantastic admin solution and making it rails 7 ready.
The text was updated successfully, but these errors were encountered: