1,370 Experience
5 Lessons Completed
1 Question Solved


Posted in Sortable Drag and Drop Discussion

This worked for me: https://stackoverflow.com/a/58580434/6430382

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: https://stackoverflow.com/a/35248329/6430382 )

Someone said: https://gorails.com/episodes/counter-caches 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 gorails.com 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.
logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2021 GoRails, LLC. All rights reserved.