1,810 Experience
9 Lessons Completed
1 Question Solved




Posted in Can anyone suggest me best Ruby on Rails 5 book?

Seems to be more of these link spam posts lately...

Perhaps constructive for future readers, here's a Trello example with Turbo, Stimulus and Sortable, to work with multiple nested resources (:compitems/:lists):

Posted in Sortable Drag and Drop Discussion

This worked for me:

Start with removing jquery-ui:

yarn remove jquery-ui

Posted in cloudflare vs cloudfront vs ?

Hey Chris,

I've many images on S3 with avg size of 30KB per img that take about 1-2 seconds to display. I'm looking at cloudfront & cloudflare to speed this up. Later perhaps imgix, but I see it as too costly now.

Which one is a good choice? What should I look at besides pricing for my decision?

Posted in SQL for search

Hi Chris,

I had a question, solved it, now I'm looking for your feedback. For readability I use `a` in the example below:

a = params[:query]
Item.where("name ILIKE ? OR tagline ILIKE ? OR details ILIKE ?", "%#{a}%", "%#{a}%", "%#{a}%")

Do you have a similar query on gorails search for episode titles and forum thread titles?

Your pseudo code works out of the box :)

First tried it with counter cache, that works. But your method seems more elegant. And it also works.

Hey Chris,

I have an item model which gets submitted. With

has_many :comments, as: :commentable, dependent: :destroy

then in the comment model I have

belongs_to :commentable, polymorphic: true
has_many :comments, as: :commentable

I probably have to do something with recursion

(as discussed here: )

Someone said: but that is only 1 level deep as far as I can see.

Please advise

Posted in What are your goals for 2018?

Goals for 2018:

  • visit and watch episodes in my spare time
  • build out my hobby project (comparison website)
  • get a better understanding of the basics
  • a minimum of 1000 hours of dev time.

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

© 2023 GoRails, LLC. All rights reserved.