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

Dynamic select field #1589

Merged

Conversation

bekicot
Copy link
Contributor

@bekicot bekicot commented Mar 26, 2020

first of all, sorry for the late PR :)

allow collection to accept proc as value.
usage:

release_year: Field::Select.with_options(collection: -> { (Time.current.year - 10)..Time.current.year })

closes #1535

cc @nickcharlton @pablobm

@bekicot bekicot changed the title feat: dynamic select field [wip] feat: dynamic select field Mar 26, 2020
@bekicot bekicot force-pushed the allow-procs-for-select-field branch 4 times, most recently from 07156f1 to cb02581 Compare March 26, 2020 23:09
@bekicot bekicot changed the title [wip] feat: dynamic select field Dynamic select field Mar 26, 2020
@nickcharlton
Copy link
Member

Thanks!

Could you add something to the documentation to show that this new feature exists?

@nickcharlton nickcharlton added feature new functionality that’s not yet implemented fields new fields, displaying and editing data labels Mar 27, 2020
allow collection to accept proc as value.
usage:
```
release_year: Field::Select.with_options(collection: -> { (Time.current.year - 10)..Time.current.year })
```
@bekicot bekicot force-pushed the allow-procs-for-select-field branch from cb02581 to 02d89a0 Compare March 27, 2020 17:10
@nickcharlton
Copy link
Member

Thanks! I'll go ahead and merge this now.

@nickcharlton nickcharlton merged commit c28e4c6 into thoughtbot:master Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature new functionality that’s not yet implemented fields new fields, displaying and editing data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dynamic select field
2 participants