I have a request that comes in like this: api/v1/photos/1/media/2 "1" and "2" are ids I need to read out in the controller. "2" I can get through the parameters
I'm currently developing my first application with Rails and Hotwire. It includes a comment form visible to all users. When unauthenticated users submit it, I'd
I want to import and use functions from my javascript/helpers/functions.js file in my stimulus controllers. I tried pinning it with: # importmap.rb pin_all_from
I’m using Rails 6 with RSpec 3.10. I have the following directory structure spec/models/my_object_spec.rb spec/models/module_name/product_spec.rb I run
I'm using the friendly_id gem in a Rails application, to be able to view organisations at site.com/organisation-name The problem is that I have a few static pag
I am still getting this error when I'm trying to register new user, but I can log in to created user after refreshing page. Here is code which I'm getting on th
I have a calculator which users would enter in values, hit submit and without refreshing or re-rendering, the calculated values would display on the page. All w
@some_instance_var = Concurrent::Hash.new (0...some.length).each do |idx| fetch_requests[idx] = Concurrent::Promise.execute do response = HTTP.get(EXTD
I have a nested form where the nested form items are conditional on the selections in the main form. I have the nested part of the form in a turbo frame. I ha
I'm upgrading a large, commercial (proprietary) Rails 6 application to Rails 7. We never used Webpacker, and are instead going directly from bundled gems for th
I want to create a simple app where admins can post their job offers and regular users can apply to those job offers. For that I have created a joint table: My
I want to auto-format all html, css, sass, rb, and html.erb,js files with setting.json_Vs-code. But the next file after setting.json can only be the above *.rb
I am using rack-reducer with rails. I am getting the error: #<NoMethodError: undefined method 'order_from_user_input' for #<DataPoint::ActiveRecord_Relati
This is my first time working with Requests and i'm a little confused, any guidance would be greatly appreciated. Task: after a user is created i would like to
I have the following Alert object that looks like this: <Alert id:1, message: "{\"body\": "\This is a test.\"}" > I'm trying filter the body content f
Say I have the below ruby hash nested hash_or_array = [{ "book1" => "buyer1", "book2" => { "book21" => "buyer21", "book22" => ["buyer23", "b
I use Paper Trail gem to capture versions of my models and it works very nicely. But Paper Trail don't capture version on bulk insert. Example: User.bulk_import
I am learning Docker and have a little confusion that I would greatly appreciate some advice on. When creating a new rails application. Following the guidelines
I am trying to bundle install my application. I have the gem stackprof and i keep getting this error whenever i try to install this gem. I am using M1 with Ruby
I am doing the installation on m1 mac and I am stuck mysql issue. my rails server is working fine but when I run my spec then I got cannot load such file -- m