КОМЕНТАРІ •

  • @subem81
    @subem81 2 роки тому +3

    Wow CJ. Thank you so much for this series! Rails doesn't get enough love and your content is truly a pillar for me. Thank you!

  • @dhrusoni1
    @dhrusoni1 3 роки тому +5

    Clear understanding on the factory bot. Thank you
    Can you create how the traits, associations work with it with the next episode. Waiting for the next demo.

    • @cjav_dev
      @cjav_dev 3 роки тому

      I definitely want to dive deeper in factory bot. It’ll be at least a few weeks before I get to this tho!

  • @qonaahnurussalamah7098
    @qonaahnurussalamah7098 2 роки тому +1

    Well explained, super helpful. Thankyou!

  • @CHACHANUS
    @CHACHANUS 3 роки тому +1

    Excellent video ... A question.. how can I create a hash with factory...with traits to add additional attributes to principal factory hash..is that possible?

    • @cjav_dev
      @cjav_dev 3 роки тому

      Thanks Pierre! I believe the factories with factory bot only return instances of those underlying models. I would likely create a custom HashFactory class that doesn't use factory bot, but instead exposes a class method `create` that allows you to pass in your own override properties. Perhaps even a making HashFactory the parent of some other sub classes like CarHashFactory < HashFactory or similar.

    • @CHACHANUS
      @CHACHANUS 3 роки тому

      @@cjav_dev ah ok.. thanks a lot...

  • @tuchandra1729
    @tuchandra1729 Рік тому

    Thank you for content 🎉

  • @Cabugamer
    @Cabugamer 6 місяців тому

    Your videos are amazing, but something that I'm really jealous of is your control of Vim...

  • @ThangPhan-t2o
    @ThangPhan-t2o Рік тому

    Thank you so much :)

  • @haroldpepete
    @haroldpepete Рік тому +1

    can you do a video about has_and_belongs_to_many
    in factorybot?

  • @AlainPilon
    @AlainPilon Рік тому

    How do you handle a situation where you have a model with a very deep belongs_to association tree. In my case, the tree is 12 level deep and if I dont provide the belongs_to associated model in the factory, I get the ActiveRecord::RecordInvalid: Validation failed: XXXX must exist.