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

Fix custom fields checkbox list #1318

Merged

Conversation

stanleylhs
Copy link
Member

@stanleylhs stanleylhs commented Aug 6, 2024

  • Fix error when saving custom fields checkbox list (YAML serialization is not required on the form)
  • Removed obselete "checkbox" field code in render method. This was legacy code.
  • Added warning to restart Rails server as 'Checkbox list' custom field serialization must apply to all instances of Rails (eager load issue).

image

New checkbox list need serialization thus restarting the server is required.
@stanleylhs stanleylhs requested a review from steveyken August 6, 2024 11:01
Copy link
Member

@CloCkWeRX CloCkWeRX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failing tests

@steveyken
Copy link
Member

I'm happy to dig into this in a couple of weeks time.

@steveyken steveyken self-assigned this Aug 9, 2024
)
object = double('Object')
context "render" do
let(:field) { FactoryBot.create(:field, as: as) }

Check notice

Code scanning / Rubocop

Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a => 1, :b => 2 }. Note test

Style/HashSyntax: Omit the hash value.
end
end

Check notice

Code scanning / Rubocop

Keeps track of empty lines around block bodies. Note test

Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body end.
@steveyken
Copy link
Member

I've re-written the failing specs to ensure this is working properly.

Copy link
Member

@steveyken steveyken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've improved the specs and tested the changes locally. This will fix the checkbox list form rendering

@steveyken steveyken merged commit 1821acc into fatfreecrm:master Aug 21, 2024
8 checks passed
@steveyken steveyken deleted the fix-custom-fields-checkbox-list branch August 21, 2024 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants