I have a legacy database where I have two models as: class Purchase belongs_to :product end class Product has_many :purchases end Now over time some of
I'm trying to add a button to my page that exports a list of the invited users with Devise Invitable. I want to include the invitation_tokens in that list. User
To get a single random record from the db, I'm currently doing: User.all.sample But when there are 100000+ users, it takes a few seconds to load them all, jus
I am making a shopping cart for a web app. So far it has 3 components: 'products', 'line_items' and 'carts'. The flow seems to be okay. I am getting all the
I get an error when trying to reference the javascript packs in my code. Any thoughts on what I might be missing? application.js import Rails from "@rails/ujs"
I followed the pull request from the branch to the master (devise) but I'm still having the error and I can't deploy the api to the server anymore I also tried
I am trying to find way to get data from a has_and_belongs_to_many association through a secondary model. I'll say sorry now as I might not explain this right,
I attempted to make a new app using rails new command and the bundle is completed. However, it said that rails aborted! and appeared another error: Bundle compl
i already add gem 'tzinfo-data' on my gemfile but its keep saying please add tzinfo-data when I make rails server. Is it because of the rails that I install or
I am trying to fix the CVE's related to jquery as follows. So for that I am trying to consume latest version of jquery. Earlier I had //= require jquery in ap
I'm trying to rewrite an rspec mailer test and I cannot figure out how to account for the special character ¡ in this text: <p> You have been add
Im facing missing 'spree-dashboard.js' file not found on fresh spree 4.4. Its not fixed by runing yarn install.
I have a Rails 7 project using TailwindCSS deployed to Heroku that is not building tailwind.css during rake asset:precompile and I don't know why. When I try to
I have a Rails project and i'm working on 2 computers ( MacBook and Imac ). Suddenly letter_opener stopped to work on MacBook. I recently updated both computers
I am using rails 6.1.4 (Ubuntu 20.04) and am running tests with rspec, factorybot, and capybara. I also got database_cleaner where I'm using :truncation to star
I using a has_many :through many-to-many relation in a multi-select via collection_select :multiple => true. I don't understand, why "genre_ids"=>["", "2"
I using a has_many :through many-to-many relation in a multi-select via collection_select :multiple => true. I don't understand, why "genre_ids"=>["", "2"
Rails 6, Devise 4.7.3 I have a forgotten password template in my views as users/passwords/new.html.erb that renders fine, collects an email, and sends that ba
I upgraded to Puma 5.0.2 and started my rails app as usual with: bundle exec puma -d -e production -b unix:///home/user/app/tmp/puma.sock Now I get the error:
I know that ActiveRecord::RecordNotFound can be mapped to http 404 error. Is there any other resource in ruby on rails whose non-existence will raise something