When saving changes to a model in rails, two popular gems to track changes are paper_trail and audited. These gems create records that contain versioning inform
I am trying to write some rspec tests and I want to mock a static method from a module. The setup is like this: module MyModule def self.my_method 'end' en
I'm trying to create an api to get a model's original image and other variants. Right now I'm not storing attachments on external storage, but I plan to save th
I want to profile a Jest test, but I only want to see the behavior for some specific methods. In ruby, I can do that with ruby-prof, but is there an equivalent
I'd like to read out an USB Device in Ruby with libusb, which has two endpoints for input, once 0x81, which is in fact a Midi input Connector, and 0x82, which i
How would I do this using ruby and only using a while loop with if, elsif and else only?
I'm trying to set a route that accepts a dynamic field. Restaurants have categories [:chinese, :fast_food, :french, :vegan] and the route restaurants/vegan allo
I need to display flash in the same view (:edit) after successfully updating an object. If I redirect to another action - everything works correctly. But when I
When searching, keywords 'block' and ruby 'define_method' keep telling me to explicitly define + call the block. Tried a bunch of stuff, including looking at so
<a href="/"> <i class="material-icons">file_download</i> Export to CSV </a> I am using a material_icon gem. "file_download" is a do
I was wondering if there is anything wrong about updating the updated_at attribute of a record through a db trigger in terms of fragment caching (i.e. the parti
I'm trying to create an array that only allows strings to be passed through, no numbers at all. Is there a way to make this possible? I've tried the below expec
Hi I started using hotwire in rails app (currently I am working on adding comments) and I found that partials used for turbo streaming are free of global refere
I am trying to create a deterministic UUID in java to generate same UUID as we have in our ruby codebase but unable to do so and need help. #ruby code using uui
I want to create a new Webpage using Jekyll, but when I execute jekyll new <page>, Ruby crashes with a really long Crash Report that starts like this: /Li
Please help me finding the solution sort by based on priority Im not getting the solution priority based on: 1st pick earliest slot 2nd max rating 3rd cronofy_e
I'm trying to seed some data using an external trivia API. Here's what I have in my seeds.rb file where HTTParty is a gem that parses JSON into a ruby hash: res
I ran the command rail new friends After a couple of minutes I get the following error Installing bootsnap 1.11.1 with native extensions Bundle complete! 15 Gem
While running Sidekiq I am getting this error: #<SearchService::Errors::DefaultSearchException: SearchService::Errors::DefaultSearchException> This is o
I'm new to Rails and trying to use some Javascript, but everywhere I go I see application.js mentioned, but it's nowhere to be found in my directories. I follow