Rod Klingler


6,730 Experience
66 Lessons Completed
0 Questions Solved


Posted in Basic Authentication and RSS Feeds Discussion

Never mind. I got it figured out! Thanks for this!

Posted in Basic Authentication and RSS Feeds Discussion

This doesn't seem to be working for me. I;m using:

 @articles = Article.all.order(post_on_date: :asc)

    respond_to do |format|

but I keep getting ActionController::UnknownFormat in RssController#index

I had to use assert_select for this in Rails 6. assert_selector wouldn't work.

Posted in How to write System Tests in Rails Discussion

Yeah, weird. I looked at the video again after posting that, and checked that I have the :fixtures and everything else set up just as you do, but my system tests are definitely pulling my local data.

Posted in How to write System Tests in Rails Discussion

I think it should be mentioned that system tests use whatever data you have already seeded into your local environment instead of your fixtures, which is what the controller tests use. This confused me at first. I was testing for the presence of fixture data, LOL.

Posted in Testing External APIs with VCR Discussion

I looked at VCR in the past and was a little intimadeted by it. Now that I have tried it, all I can say is how amazing it is!

For n00bs, it is worth noting that after putting the configuration in place in your test_helper.rb file, you can run your tests and it will warn you when it notices an API request, so you know which files to go back and add the setup/teardown to.

Posted in Tracking Metrics with Ahoy and Blazer Discussion

No, it turns out I have a Rails 5 app that uses Webpacker, and what I implemented was apparently causing confusion in my app. I took the Webpacker stuff out and it works fine now. Thanks, anyway!

Posted in Tracking Metrics with Ahoy and Blazer Discussion

Hey, Chris! It looks like a lot has changed with ahoy in the past two years. Any way you could update this?

Posted in Ruby's Array() and Array.wrap Discussion

Nice, dude! I had no idea this existed. I'll definitely be using this when I go back through and optimize my code. Thanks!

Posted in Direct File Uploads to S3: Part 2 Discussion

Hey, Chris! According to the Shrine plugins page, "direct_upload is [OBSOLETE]" and they want you to "Use upload_endpoint and presign_endpoint plugins instead." I have been following along with this video and having problems getting it to work. Specifically, I get to about 9:45 and then my rails server won't start, nor, I discovered, will the rails console.

Going back through the video again, I noticed that the roda gem is for presigned endpoints, which is exactly what one of the newer Shrine plugins is supposed to be for. Could this be the problem?

Posted in Multitenancy with the Apartment gem Discussion

I would really like to know the answer to this! It would be great to offer ActiveAdmin functionality to each Company in a subdomain. If I figure it out I will post here.

I figured my own problem out, finally. It is a <ul> and each <li> in the dropdown has the ui-menu-item class, and that's really all you need to attach the styling to, plus :hover for some feedback when the user mouses over the list items. Hope this helps someone else!

Hey man, I can't figure out how to style the suggestions that show up beneath the search bar. Any links or ideas? I keep trying to Google this in different ways but I'm still coming up emptyhanded.

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

© 2024 GoRails, LLC. All rights reserved.