-
Notifications
You must be signed in to change notification settings - Fork 403
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
Bugfix #827 Fix nested forms f.fields
#828
Bugfix #827 Fix nested forms f.fields
#828
Conversation
Hi, thanks for the report and for the PR Could you please
|
Sure @tagliala |
Amazing, thanks Specs are still failing on CI for different reasons Please take a look at the Travis Build If this method is only used in Rails 6.1, all the previous versions of rails should not test it. You may want to provide conditional testing like it has been done with |
Please rebase on main, I've already cherry-picked 1159720, thanks |
@tagliala I am trying to fix specs.
Difference is |
Is this question related to this PR? |
I can see that there are some errors like
This happens because the specs are calling Here it is the signature of fields: https://apidock.com/rails/v5.1.7/ActionView/Helpers/FormHelper/fields Since I do not use |
@tagliala Yes you are right about spec errors. I was fixing failures on local. So that signature is corrected but now there are failures due to mismatch between expected and actual behaviour in terms of ID being created. I will keep working to fix specs over weekend. |
There is a helper called client_side_validations/test/action_view/cases/test_legacy_form_with_helpers.rb Lines 137 to 139 in 2b8021e
But I think that if the ID is not provided, then there will be issues with the front-end validations (CSV uses ids to identify fields)
I guess this is an issue only for 5.0 and 5.1, and we should add to the readme this note, correct? |
@AquisTech I'm working on this and I've got the issue, thanks |
6475baf
to
2d869e4
Compare
test/base_helper.rb
Outdated
@@ -29,6 +29,8 @@ | |||
|
|||
module TestApp | |||
class Application < Rails::Application | |||
config.try :load_defaults, "#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AquisTech this one was important to set that configuration variable according to Rails version. But during the tests, it still doesn't generate the id, so I'm keep investigating.
config.try
is used because this method didn't exist in Rails 5.0
2d869e4
to
46bb703
Compare
Added
fields
method.This I am using in my project and is running well.
But please review and suggest if you foresee any issues or any other changes are expected.