-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
feature: Implement multiple option for select field #3572
Open
zhephyn
wants to merge
16
commits into
avo-hq:main
Choose a base branch
from
zhephyn:feature/multiple_select_field_for_products
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 13 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
e599393
Implement multiple select feature for the sizes column of the product…
zhephyn 77d8daf
Merge branch 'main' into feature/multiple_select_field_for_products
zhephyn fdaf270
Update select_field.rb
zhephyn c833b6b
Update select_field_spec.rb
zhephyn 4931ab8
Update select_field_spec.rb
zhephyn e91098e
Merge branch 'avo-hq:main' into feature/multiple_select_field_for_pro…
zhephyn 4c9410b
Update to multiple select PR
zhephyn 76185b2
Update select field spec file
zhephyn 24c59f3
Move sanitization of multiple select field to be handled by the contr…
zhephyn bae862e
Fix Lint issues raised by Rubocop
zhephyn 67a12b0
Fix migration version error thrown with rails 8 plus lint issues
zhephyn 3446019
Merge branch 'main' into feature/multiple_select_field_for_products
zhephyn f688e59
fix migration version
Paul-Bob f8a4a3e
Update spec/dummy/db/schema.rb
Paul-Bob 557e303
Merge branch 'main' into feature/multiple_select_field_for_products
Paul-Bob 9f26661
Merge branch 'main' into feature/multiple_select_field_for_products
Paul-Bob File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
app/components/avo/fields/select_field/edit_component.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddSizesToProducts < ActiveRecord::Migration[6.1] | ||
def change | ||
add_column :products, :sizes, :string, array: true, default: [] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@zhephyn let's start by fixing the schema, the
AddSizesToProducts
migration is adding thesizes
array column to theproducts
table however the schema is also changing thestage
column to array on theprojects
table.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.
I'm directly committing this change to speed up the process
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.
Okay no problem. Im not directly in contact with my computer at the moment
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.
@Paul-Bob . Though I didn't quite understand what you referenced, you specified a migration named AddSizesToProducts, yet according to the suggested change, it's like you're changing the stage column to a non array column, and the stage column is part of the projects table not the products table. Could you kindly clarify if this is the case?