Skip to content

Allow configuring multiple fields for a section at once#3406

Merged
mshibuya merged 1 commit into
railsadminteam:masterfrom
codealchemy:patch/configure-multiple-fields
Oct 30, 2021
Merged

Allow configuring multiple fields for a section at once#3406
mshibuya merged 1 commit into
railsadminteam:masterfrom
codealchemy:patch/configure-multiple-fields

Conversation

@codealchemy

Copy link
Copy Markdown
Contributor

This allows passing an array of field names to the configure block to simplify configuring multiple fields that share the same settings within a section.

Closes #2667

This allows passing an array of field names to the `configure` block to simplify configuring multiple fields that share the same settings within a section.
@mshibuya

Copy link
Copy Markdown
Member

#field should accept multiple names as well, since a usage like this also makes sense:

config.model Team do
  field [:name, :players]
end

@codealchemy

Copy link
Copy Markdown
Contributor Author

#field should accept multiple names as well

Thanks for the feedback, though I'm not sure I follow. #fields is available and (unless I'm missing something) can be used to effectively do the same thing as you're suggesting (ref, doc example).

@mshibuya mshibuya merged commit ad760ca into railsadminteam:master Oct 30, 2021
@mshibuya

Copy link
Copy Markdown
Member

Ah I didn't realize the #fields. That makes sense, thanks!

@codealchemy codealchemy deleted the patch/configure-multiple-fields branch October 30, 2021 17:23
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.

Multiple field support in configure call

2 participants