jeremyevans / sequel

Sequel: The Database Toolkit for Ruby
http://sequel.jeremyevans.net
Other
4.98k stars 1.07k forks source link

Expose the model class inside the dataset module #2040

Closed davekaro closed 1 year ago

davekaro commented 1 year ago

One reason you might want this is to qualify the columns in your method. For example, where :kept, Sequel[model.table_name][:discarded_at] => nil

See discussion https://github.com/jeremyevans/sequel/discussions/2038. I'm not sure the test is up to standards, I struggled at first so happy for any feedback/adjustments needed.

davekaro commented 1 year ago

~Sorry didn't notice the whitespace changes... will follow up shortly.~ All set now.

jeremyevans commented 1 year ago

Looks good, thanks for the patch!