Closed shioyama closed 7 years ago
@shioyama Seems we should pass klass along if someone passes in a value. Update that and i'm fine with merging it.
@jackdempsey I had that at first, but noticed no difference and this was simpler so just passed it as nil by default. But I'll make the change if you think that's better.
Yeah, even if it works now, something may change and break in the future, etc. This should make it more bulletproof. Thanks!
Ok updated, have a look :smile:
Thanks!
@shioyama @jackdempsey
what about handling all options but not :class
only?
association_options = { ... }.merge(options)
(in all methods)
@kuraga Good point, I was only thinking about my immediate need. Would there be any issue with passing through options, i.e. could they affect polymorphic associations in a way that would break them? I guess not but I'm new to Sequel.
I can make another PR with the merge(options)
approach.
@shioyama we couldn't, user (programmer) could. But that's user's decision (pass some options
).
This is quite a simple change and allows more flexible association/class name relationships.