Ruby on Rails Community Forum

State of frontend 2022

0
General

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

Black Friday 2021 Deals on GoRails, courses, and Jumpstart Pro! Discussion

3
General
Hi, I saw the deal was until tonight but it's not showing up :(
Marcos V Bohrer replied

Testing Emails in Development with Mailcatcher Discussion

9
General
Any good reason why I might use this instead of letter_opener gem?
Stéphane Paquet 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

Redirect To Current Page After Login Discussion

2
General
exactly what I needed
苑畅 replied

How do I connect multiple devise apps for a single login to any of the apps?

11
Gems / Libraries
For a rails/devise project I'm trying to figure out how to have the same devise login (email/password) work for multiple apps on different domains. I can't figure out if this would that be conside...
Jerome . replied

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...

Group Chat with ActionCable: Part 7 Discussion

30
General
Hi! response for the new userundefined method `last_read_at' for nil:NilClass for Chatrooms#show how to solve?
FX replied

Devise: current_user not saving to @forum_post.user

1
Gems / Libraries
I'm currently having an issue when I create posts, I always seem to get undefined method "username" or "email", but when using current_user.username or current_user.email it will display just fine....

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'...

Turbolinks 5 Forms for Mobile Discussion

7
General
Chris, great episode!I'm really interested in learning more about turbolinks 5 and creating hybrid apps. I would love to see more, even the more basic/beginner stuff.Thanks!

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

I get error when deploy to heroku

1
General
I get error when deploy to heroku Here is the log file: -----> Building on the Heroku-20 stack -----> Determining which buildpack to use for this app ! Warning: Multiple default buildpa...
Alan Reid replied

Learning Ruby on Rails? Join our newsletter.

We won't send you spam. Unsubscribe at any time.