Episode

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ย. 2024
  • In this episode, we look at what would seemingly be simple queries, but are more complex once you start looking into them. Using built in ActiveRecord functions, we can make the queries readable and easy to work with. www.driftingru...
    ► Visit the Merchandise Store - www.railsstore...
    ► Uptime Monitoring with pingVerse - www.pingverse.com
    ► Ruby on Rails Templates - www.rubidium.io
    ► Subscribe to Drifting Ruby at www.driftingru...

ความคิดเห็น • 19

  • @swan4163
    @swan4163 6 ปีที่แล้ว +17

    You can refactor your command line at the beginning to be rake db:{create,migrate,seed}

  • @Shakas420
    @Shakas420 2 ปีที่แล้ว

    Great vid my man

  • @gosukiwi
    @gosukiwi 6 ปีที่แล้ว +7

    Did you guys just recommend using default scopes? Eager loading something on the default scope is not that bad, but it's so easy to abuse I'd rather avoid it, especially in educational videos.

    • @deadleaves1985
      @deadleaves1985 5 ปีที่แล้ว

      being explicit is always better with scopes, faster than not you'll find yourself with situation when you want to reverse default_scope, and unscoped ugliness is confusing and bug-prone

    • @theodorejayden1864
      @theodorejayden1864 3 ปีที่แล้ว +1

      I guess I am kinda off topic but do anybody know a good website to stream newly released tv shows online?

    • @ankk98
      @ankk98 ปีที่แล้ว

      I don't think that using default scope is a good idea. If the team is large, in future there is high chances of someone not checking default scope. I prefer using "includes" wherever necessary explicitly.

  • @imomar
    @imomar 6 ปีที่แล้ว

    Great video, thanks Dave!

  • @likeuwill
    @likeuwill 6 ปีที่แล้ว +2

    great! nice tricks, didn't know about merge ;)

  • @misakyanzye4269
    @misakyanzye4269 5 ปีที่แล้ว

    Very cool tricks!, I am a subscriber now

  • @oliveirades
    @oliveirades 6 ปีที่แล้ว

    Very nice video. Thank you

  • @patrickcandlin7420
    @patrickcandlin7420 5 ปีที่แล้ว

    Thank you great video

  • @giridharan4771
    @giridharan4771 5 ปีที่แล้ว

    What is the difference between includes and join can any one explain?

    • @nikitak9628
      @nikitak9628 5 ปีที่แล้ว +1

      includes does two things, it eager loads and does an inner join. A join does not eager load.

    • @giridharan4771
      @giridharan4771 5 ปีที่แล้ว +1

      @@nikitak9628 thank you nikita.

  • @RazTheFireBender
    @RazTheFireBender 3 ปีที่แล้ว

    ah what i wouldn't do for that repo to practice on.

    • @DriftingRuby
      @DriftingRuby  3 ปีที่แล้ว +1

      The repo is available at www.driftingruby.com/episodes/activerecord-tricks

    • @RazTheFireBender
      @RazTheFireBender 3 ปีที่แล้ว

      @@DriftingRuby Amazing! Thank you.

  • @JonathanJumper
    @JonathanJumper 5 ปีที่แล้ว

    A fcking genius man!