Denis Omerovic

Joined

9,230 Experience
91 Lessons Completed
0 Questions Solved

Activity

Posted in How to prevent Turbo from striping params from form URL

After Turbo upgrade:

I have a form that is sending a GET request with the following URL /some-url?param1="hello"

When the form is submitted param1 is being striped out so it's not being sent. There is a known issue with this but still not sure how to make it work.

Posted in Action listener for submit on return??

You can listen on keydown event and detect when return is pressed and call the function. More on keydown event here https://developer.mozilla.org/en-US/docs/Web/API/Document/keydown_event

I have a user model and around 1milion user records in my database and I'm using ILIKE to match the users by name or email. Sometimes it's very slow since I have a lot of records in my DB so I'm looking for a better way to search users. I would appreciate any suggestions.

Looks like if scroll too fast the same data is fetched twice, even in the video you can see the same. So basically we should still use this.loading to prevent fetching same data multiple times.

Posted in Rails for Beginners Part 17: Login Form Discussion

Probably because you created your user before you added has_secure_password. Try to delete the user from DB and create a new one and then try to log in.

logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2022 GoRails, LLC. All rights reserved.