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

Allow use another field as default #8

Open
paulodiovani opened this issue Feb 17, 2016 · 0 comments
Open

Allow use another field as default #8

paulodiovani opened this issue Feb 17, 2016 · 0 comments

Comments

@paulodiovani
Copy link

Take the folowing example:

  split_accessor :starts_at, default: -> { Time.current }, time_format: '%H:%M'
  split_accessor :ends_at, default: -> { starts_at }, time_format: '%H:%M'

I want that, if ends_at is empty, TimeSplitter uses starts_at as default value.
Currently this is not allowed since the lambda is executed in Class scope.

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 a pull request may close this issue.

1 participant