Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Using BETWEEN condition in squeel? #405

Open
simkessy opened this issue Oct 27, 2015 · 0 comments
Open

Using BETWEEN condition in squeel? #405

simkessy opened this issue Oct 27, 2015 · 0 comments

Comments

@simkessy
Copy link

Is there anyway to write this in squeel without the SQL syntax?

  scope :within_weekday, -> (weekday) {where('? BETWEEN start_day AND end_day', weekday)}
  scope :within_time, -> (time) {where('? BETWEEN start_time AND end_time', time)}
@simkessy simkessy reopened this Nov 10, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant