All threads / Pair Programming on Rails Scopes Discussion

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Pair Programming on Rails Scopes Discussion

For your business days scope, could you not use Time.now.wday to keep it all ruby and DB agnostic, rather than using EXTRACT? (http://ruby-doc.org/core-2....

The EXTRACT is required because you need something to pull out the week day inside the database so you can make the comparison. The Ruby method unfortunately can't help you here because this is running a query inside the database.

Reply

Are you going to do more pair programming videos in the future? This and the one where you're fixing a bug in Devise are my favourites.

Definitely planning to! I think it helps explain things a lot better with the discussion.

Reply

This sort of tutorial is really so helpful. It would have been more nice if we could watch how to change default week days and starting week day in rails.

Reply
Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 38,558+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.