-
-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Display additional fields when attaching a record to another (…
…#3048) * add fields * Apply options like update_using when attaching record * Lint * Use keyword arguments * Ensure through attachments without additional params are correctly attached * Refactor: use fill_record method itself * Refactor: do not send redundant args to fieldsexecContext * Add translation key * Refactor: use @reflection and remove duplication * Use extra_fields instead of extra * Update app/controllers/avo/associations_controller.rb Co-authored-by: Paul Bob <[email protected]> * wip styling * include blank on the select * Do not pass in nil value for model because it is deprecated * Remove duplicate key * Format * Give clear name * Update app/controllers/avo/associations_controller.rb Co-authored-by: Paul Bob <[email protected]> * Rename to attach_fields * Display correct label * Enable additional fields when select is searchable * Lint * Add label_text * Fix indentation * Change texts to reflect the association * Fix tests * Fix feature test * Refactor associations controller and display sigularized field names * Remove useless assignment * Update app/controllers/avo/associations_controller.rb * Update app/controllers/avo/associations_controller.rb * Update app/views/avo/associations/new.html.erb * Update app/views/avo/associations/new.html.erb * Update spec/system/avo/for_attribute_spec.rb * Update app/controllers/avo/associations_controller.rb * field_wrapper on searchable * Update app/controllers/avo/associations_controller.rb --------- Co-authored-by: Paul Bob <[email protected]> Co-authored-by: Adrian Marin <[email protected]> Co-authored-by: Paul Bob <[email protected]>
- Loading branch information
1 parent
9b4479b
commit e5ae21d
Showing
35 changed files
with
231 additions
and
44 deletions.
There are no files selected for viewing
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
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,13 @@ | ||
module Avo | ||
class FieldsExecutionContext < Avo::ExecutionContext | ||
include Avo::Concerns::HasItems | ||
|
||
def detect_fields | ||
self.items_holder = Avo::Resources::Items::Holder.new(parent: self) | ||
|
||
instance_exec(&target) if target.present? && target.respond_to?(:call) | ||
|
||
self | ||
end | ||
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
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
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
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.