Thank you man. This is the most detailed guide for datatables implementation! These gems are really useful
@iamjustine1
2 ай бұрын
This is so helpful! Thank you for sharing. Please continue your rails tutorials!
@kalist8938
3 ай бұрын
Omg super useful gems and video, thanks a lot !
@SupeRails
2 ай бұрын
Glad it was helpful!
@keilmillerjr9701
10 ай бұрын
Thank you for these tutorials. I like that you make mistakes in the video, and then resolve them. It helps others learn how to diagnose errors.
@ledockol
11 ай бұрын
Як завжди - чудовий і дуже корисний матеріал! Ярослав, ти майстер своєї справи! Дякую. Прим. Якби була трохи складніша розмітка, може б запхнув би цю таблицю (разом із сортуванням, фільтрацією) у турбо фрейм щоб оновлювати тільки її контент. Слава Україні!
@SupeRails
11 ай бұрын
turbo frames and complex markup problems? ok, in the next video!
@volodymyrshabaldas6349
11 ай бұрын
yep, it will be a greate tutorial.@@SupeRails In my case, I already use ransak, pagy, turbo stream and frame in tables (like you did tutrorials before kzitem.info/news/bejne/om-nnI2toX50rH4) But I have issues with sort_link, when I take filtered data. By the way, thanks a lot, and plz. continue your greate work
@SupeRails
11 ай бұрын
@@volodymyrshabaldas6349 what kind of issues with sort link?
@volodymyrshabaldas6349
11 ай бұрын
It display turbo request in UI (views), when I tried to press sort link after filtered data @@SupeRails
@ledockol
11 ай бұрын
@@volodymyrshabaldas6349 If both turbo_request and turbo_stream are used within one action in the controller, it would be better to separate them to avoid complicating the logic of their interaction. In my opinion, it is better to have turbo_frame + broadcast or turbo_stream + broadcast. Although there are exceptions in real projects)
@frankrobinson1007
3 күн бұрын
Thank you Yaroslavl, excellent tutorial. You are so quick, but luckily we can stop and start the video to catch up, unlike an in person tutorial! I am not able to figure out how the highlighting works, and that is a really neat feature. Is it embedded in Tailwind? That is the only part of your setup that I am not using.
@SupeRails
3 күн бұрын
@@frankrobinson1007 using highlight: - docs apidock.com/rails/v6.1.7.7/ActionView/Helpers/TextHelper/highlight - good examples: boringrails.com/tips/rails-highlight-search-results
there is rsome issue of ransack with rails 7.1 , don't know how much time will it take to be compatible with rails 7.1
@SupeRails
10 ай бұрын
actually for this tutorial I am using rails 7.1 - seems to work!
@YuriyChamkoriyski
8 ай бұрын
Thanks, Yaroslav! Your videos are always interesting and useful! I have one question, though. When you do the sort, the gem makes it very easy, and when you click on the column's title it sorts the column right away. My question is, once I load the page how can I have some kind of default sorting already executed, without clicking on any particular column's title? So, the table should have some initial sort (let's say by first_name: DSC) and then the user could change it by clicking on the different column's title.
@SupeRails
8 ай бұрын
if you are using ransack, the best way to set default sort order is with "@q.sorts". Example: @q = Event.where(visible: true).ransack(params[:q]) @q.sorts = "name asc" if @q.sorts.empty? @events = @q.result(distinct: true)
@SupeRails
8 ай бұрын
without ransack: @events = Event.all.order(created_at: :desc)
Пікірлер: 27