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

Add Sequel::Model.dataset? method #1508

Merged

Conversation

AlexWayfer
Copy link
Contributor

Because .dataset raises error if there is no dataset,
and there is no quiet way to check dataset existing, except rescue.

Useful for multiple-inherited abstract classes.

Reference: https://groups.google.com/d/msg/sequel-talk/OG5ti9JAJIE/G8ncUsT4BAAJ

@jeremyevans
Copy link
Owner

I think this idea is good, but please rename the method has_dataset?.

Because `.dataset` raises error if there is no dataset,
and there is no quiet way to check dataset existing, except `rescue`.

Useful for multiple-inherited abstract classes.

Reference: https://groups.google.com/d/msg/sequel-talk/OG5ti9JAJIE/G8ncUsT4BAAJ
@AlexWayfer AlexWayfer force-pushed the add_model_dataset_predictive_method branch from e25fd75 to 02f3a01 Compare May 17, 2018 15:31
@AlexWayfer
Copy link
Contributor Author

I think this idea is good, but please rename the method has_dataset?.

Okay. I thought it's deprecated because of RuboCop, but it's not.

I can make an alias, but I think you don't want this.

Done.

@jeremyevans jeremyevans merged commit 02f3a01 into jeremyevans:master May 17, 2018
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.

None yet

2 participants