InertiaJS on Rails #6: Testing

Поделиться
HTML-код
  • Опубликовано: 5 ноя 2024

Комментарии • 11

  • @diegocasmo
    @diegocasmo Год назад +1

    Thanks a lot for these videos about InertiaJS on Rails 👍

  • @spikevinzcruz2312
    @spikevinzcruz2312 2 года назад +2

    Thank you so much for this guide!

  • @lakshmaji.mutyala
    @lakshmaji.mutyala 2 года назад

    subscribed!!!
    How about pagination with inertia and rails!!!

  • @pedroa5720
    @pedroa5720 Год назад

    Hello, amazing videos. Could you share to us how you filtering some data in backend (Like in my user index i want to build a name search form) and how you handle pagination with Inertia Rails

  • @supportcollective5556
    @supportcollective5556 3 года назад +1

    Wondering if we could look into Inertia and ActiveStorage ?

    • @brandonshar1649
      @brandonshar1649  3 года назад

      Anything in particular you'd like to see?

    • @supportcollective5556
      @supportcollective5556 3 года назад

      @@brandonshar1649
      An avatar upload and on page preview would be great ( bonus points for camera integration )
      currently I'm doing below, but keen for the way you would do it ?
      I'm getting the avatar.url
      inertia_share data: {
      avatar: -> { User.find_by(id: current_user.id).avatar_blob if current_user.avatar.attached? },
      user: -> { current_user }
      }

  • @supportcollective5556
    @supportcollective5556 3 года назад +1

    UPDATE:: all works if I comment out user
    I'm getting below if I add user to the factory :user block any ideas?
    Failure/Error: user = FactoryBot.create :user
    FactoryBot::AssociationDefinitionError:
    Self-referencing association 'user' in 'user'
    factory :user do
    email { Faker::Internet.email }
    name { Faker::Name.name }
    password { '123456' }
    password_confirmation { '123456' }
    # user
    end

    • @brandonshar1649
      @brandonshar1649  3 года назад +1

      Does your user model have a user relationship on it? This syntax would imply that a user has a required additional field of "user" to be created.