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
@@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 } }
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
Thanks a lot for these videos about InertiaJS on Rails 👍
Thank you so much for this guide!
subscribed!!!
How about pagination with inertia and rails!!!
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
Wondering if we could look into Inertia and ActiveStorage ?
Anything in particular you'd like to see?
@@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 }
}
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
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.