
Ordering with included models
1
Rails
Is there a way to order results using a column from a model and a column from a related model via includes? Here is a scenario:
A product that has many parts, each of which has a numerical value a...
HP replied
Solved

How to delete parent object when last associated child is deleted?
1
Rails
I have a Family model that `has_many` Kids. I'm using `dependent: :destroy` on the family so when it is destroyed the associated kids are destroyed too. All good.
Now I need to destroy the family ...
Suleman Uzair replied

Devise and OmniAuth - correct approach?
0
Rails
Hello,
I decided to start building a social media scheduling tool as I figured it would be decent portfolio project for a junior dev. I'm a little confused as to how to integrate Users' social me...
Christian posted

API params validation in Rails app
5
Rails
Hey guys!
I'm wondering, what could be a good and scalable way to validate if API request is well formed, before processing it. Rails has strong params for that, but I have a case when an API endp...
simrel12 replied
Solved

With Hotwire and a long-running background job, how can I show a message indicating that data is loading?
1
Rails
So I have a long-running API call running in a background job. As records are created/updated/removed in that job I have them broadcasted to the user. I would like to have a notification/badge adde...
Solved

PDF generate
1
Rails
I am using PRAWNS gem and i need to know how to generate pdf using prawns in a rails project
runte damaris replied

Turbo Stream - dynamically replacing partial on the page
6
Rails
I have an edit user page that has multiple cards on it. I have each card wrapped in its own turbo frame tag with a unique id. On the update action in my controller if I just redirect_to @user the s...

Failed to run sidekiq properly to heroku
0
Rails
After deploying sidekiq to heroku, everything works properly except when I try to run a job I get this error Redis::CommandError: ERR invalid password
John Nonso posted

Issue when adding Confirmable in Devise - [ArgumentError - wrong number of arguments (given 0, expected 1)]
0
Rails
I've been setting up Devise Confirmable for my development environment Rails 5.1.7 app.
My initializers/devise.rb looks like:
Devise.setup do |config|
require 'devise/orm/active_record'...

How do I get Multiple Output files with cssbundling-rails and Tailwind.
1
Rails
It took me a couple of days to find this answer:
https://dev.to/nikz/multiple-output-files-with-cssbundling-rails-and-tailwind-3b4k
A Tutorial here might help.
Chris Oliver replied

How do I insert smart variables with a text editor?
5
Rails
I would really appreciate some insight to how you could let a user select from pre-definied variables in a dropdown and insert them into a text area; some people have mentioned saving a liquid and ...
Leon Entrup replied

CSRF logging me out
0
Rails
Rails 5, Ruby 2.7.
I'm getting the dreaded error "Can't verify CSRF token authenticity." and I'm being logged out and my tokens don't seem to match. This is happening on a new development machine (...
Bruce Lulu posted

Rails 6, Webpacker and Docker on Apple M1
0
Rails
Hi Chris,
I tried to leave a comment for episode #389 but was not successful. Not sure why. Anyway, I'm developing in Apple M1 and trying to dockerize a Rails 6 application, but running into a lot...
Gabriela Jack posted

how i can implement this functionality
0
Rails
Seller can perform CRUD on his/her listing(product i.e laptop)
Seller can upload multiple product images.
faheem ismail posted

Using find_or_create_by with accepts_nested_attributes_for
7
Rails
Hi gang...I have a Book which has_many :authors, through: :book_authorsInstead of creating a new Author each time I create a book I'd like to use find_or_create_by on the author's name attribute. R...
Solved

Heroku Error - We're sorry, but something went wrong.
2
Rails
Hey Guys,
I deployed my app to Heroku but I am getting the "We're sorry, but something went wrong.
" so I ran heroku logs and this is what I got:
```
2019-11-07T18:45:20.355498+00:00 app[web.1]:...

How do i save a field in a separate table when using devise?
6
Rails
I am using devise for my users, during sign up i have an extra field i want to store in a different table in my Postgres DB. How would i go about storing this extra field?
So a **company** `has_ma...
Solved

Date range option
0
Rails
Can any one tell me how to provide a Date Range option on one of the pages of my project???What changes needed to be done in index file and corresponding controller to show it?
vinit rawat posted

Provide sort option
0
Rails
How can i provide the sorting feature on all the pages of my project dashboard??
vinit rawat posted

How do you charge for building web app projects?
4
Rails
Hey all.. Just needed some advice/suggestions on how to charge for building a web app. Would be great to hear how you (freelancer or agencies) charge for projects? Do you breakdown into front end +...
Solved