Save 36% for Black Friday! Save 36% on GoRails for Black Friday! Learn more
Rod Klingler
Joined
Activity
Never mind. I got it figured out! Thanks for this!
This doesn't seem to be working for me. I;m using:
@articles = Article.all.order(post_on_date: :asc)
respond_to do |format|
format.rss
end
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.
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.
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.
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.
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!
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!
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?
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.
Posted in Advanced Search, Autocomplete and Suggestions with ElasticSearch and the Searchkick gem Discussion
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!
Posted in Advanced Search, Autocomplete and Suggestions with ElasticSearch and the Searchkick gem Discussion
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.