Skip to content

An Inseparable Peace

Karl McCollester

Primary Menu
  • Home
  • About Karl
  • Contact

Category: Development

TIL: Running Rails 5 / Ruby 2 on Ubuntu 2022.4

Posted on October 29, 2022October 29, 2022 by Karl

I saw an article that Ubuntu 2022.10 had been released, which spurred me to finally upgrade my Dell laptop from 2018.4 to 2022.4 Everything went great!… until I went to write some code.

Continue Reading

TIL – Generating a Model that `references` an Alias

Posted on October 16, 2022October 16, 2022 by Karl

Let’s say you have a Business class in Rails..and maybe you want to records mergers, so you want to create a Merger class. Normally, when we create a model, we use the references type: so rails will automatically create both the <model>_id fields and the index: In this case though, we don’t want to reference […]

Continue Reading

TIL – Using a Cloudinary Resource with the Wicked PDF Gem

Posted on May 26, 2022October 16, 2022 by Karl

Today I was working on an pdf.erb view template in rails. In this case, I wanted to add into the PDF some images that we stored in cloudinary. My first instinct was to use the image tag that’s part of the cloudinary gem: However, the image would not display. Since I’ve rendered images in other […]

Continue Reading

The Difference Between PVID vs Untagged VLANs

Posted on May 25, 2022July 10, 2022 by Karl

I was configuring a Netgear switch today and having trouble getting everything working. Having only worked with Cisco folks and switches previously, I was completely unaware of the PVID setting until I read the Netgear helpdoc on setting a trunk port. I got everything working but still wasn’t clear until I read Jason Doolittle’s article. […]

Continue Reading

Rails Migrations: Set a Default Date for a column

Posted on December 31, 2021May 26, 2022 by Karl
Continue Reading

The Shared Green: Rails Polymorphism Commons

Posted on August 29, 2021May 26, 2022 by Karl

When writing a Rails app I love polymorphic relations. If there’s a good chance I can reuse a model with other objects and I can’t make it a PORO (plain old Ruby object), my relation of choice is likely to be a polymorphic one. Once challenge with polymorphism is documenting the interface future objects will […]

Continue Reading

The Case of the Broken API Params

Posted on December 13, 2020December 13, 2020 by Karl

I’ve been working on a Ruby program and had received a new version of an API to interface with. The new version had moved from GET requests to POST requests, so where before I was getting information with:

Continue Reading
shallow focus photography of computer codes

Is Your Rails Form not Rendering Correctly? Check your HTML

Posted on June 27, 2020May 26, 2022 by Karl

I’ve recently had two instances where I’d create a form: but when I look in my browser, no form tags have been created!

Continue Reading

Using StimulusJS for Type-ahead Search (2/2)

Posted on February 13, 2019 by Karl

The Rails Side I’ve recently started using StimulusJS as the web framework for a Rails 5.2 application. In Part 1 I built a simple type-ahead search form. In this second half I walk through using a controller and partials to render the results, just like a traditional Rails app.

Continue Reading

Using StimulusJS for Type-ahead Search (1/2)

Posted on February 11, 2019February 12, 2019 by Karl

Part 1 – The Front End I’ve recently started using StimulusJS as the web framework for a Rails 5.2 application. My first task with it was to build a simple type-ahead search form.

Continue Reading

Sign Up For Updates from Karl

Powered by Buttondown.

Copyright all rights reserved | Theme: Minimal Blog by WPinterface.