
Accepts_nested_attributes vs the regular way.
0
Rails
So I've spent the last couple days working with `accepts_nested_attributes_for` in an effort to understand them (I've never used them before). I've used a variety of sources (GoRails video of cour...
John Magee posted

What is the best way to determine the country/currency for a user?
1
Rails
I am using a similar set-up as gorails - devise for registration and stripe for subscriptions. I have separate plans for each currency were are going to market to (USD, CAD, GBP). But I want to...
Jacob Montgomery replied
Solved

Devise password after confirmation
0
Rails
Hi, I am fairly new to rails and i'm trying to figure out how to get a user signed up first and later after they go to account confirmation link mailed to them ask for password.
I read about it on...
Brijesh Wawdhane posted

Stimulus Reflex not replacing element?
0
Rails
I have a view that has a search bar and a card deck.
I'm trying to use stimulus reflect to search the card deck and for some reason my card deck is not re-rendering.
Some of my view updated but t...

How to customize jsonapi-serializer caching namespace
0
Rails
In my rails application I have `categories` which are classified based on location. I want to cache these categories on serializer level by using `jsonapi-serializer`'s caching method `cache_option...
mohamed31195 posted

How can I include nested comments into an existing project?
0
Rails
PG::UndefinedTable: ERROR: relation "commentables" does not exist
when rake db:migrate
Berkovich Pavel posted

Many-to-Many associations break in background job
0
Rails
I have a function in my app that emails out a PDF of any invoice as an attachment. Everything works fine if its run in production on the web worker. Of course this bogs the app down and I want to...
Criss Frost posted

Bootstrap v5 tooltip and popover not working (where to put the scripts?)
0
Rails
Hey everyone,
I'm using a Railsbytes script to install bootstrap 5 alpha; https://railsbytes.com/public/templates/VB0s5v.
However, I can't get any of the tooltips and popovers to work. Not sure ...
Jacob Hedengren posted

Is there a way to detect users leaving a page and alerting them
0
Rails
Is there a way to detect users leaving a page and alerting them in rails or would it be better to use jquery?
Thank you!
JP posted

What are the best ways to visualize data in a Rails application?
1
Rails
I am looking for the best way to build a clean, simple, & reactive interface to visualize data in a postgres database. Do you have any recommendations on tutorials/gems that I can follow or loo...
Mads Obel replied

Scheduled Notifications (recurring email at time of choice, in time zone)
0
Rails
I'm wondering about the best way to approach scheduled notifications.
Having users who set their timezone and pick the best time to receive a regular notification (can be daily or less often), I c...
Arnaud posted

How can i do this?
0
Rails
How do i reduce video size while uploading using active storage Rails 5.2.4.3
Asher Namanya posted

Best Approach for Updating Attributes On Join Table
2
Rails
I have a view (show) that display's an Article. The Article has several Author[s]. The Article and Author models look like this:
Associations:
```
Article Model
has_many author_articles
has_many a...
Mountaindog replied

Rails6 - how to make jquery available in chrome console?
1
Rails
I'm new to rails 6, webpack, etc
It's working for me in my app and jquery is loaded (thanks for the intro @Chris)
However - although jquery works correctly in all my loaded js, I can't use it to e...
Chris Oliver replied

Editable emails templates
5
Rails
Hi there 👋
I need users to be able to edit email templates, something like:
`Hello {{ first_name }},`
Please advice, thanks 👍
Henk Jan replied

Invite using phone number instead of email
0
Rails
I am using devise gem for authenticating users. I modified it a bit to let users signup using a mobile number instead of email id. Which now works as expected.
What I want to do next is inviting us...
kshitijLohbare posted

How do I get the value of an attribute in a model method before submitting
0
Rails
Let's say I have an attribute :year_of_birth for example and another field :age (readonly), I fill in the year_of_birth. And I make a method in a model to calculate the age, how does the age get po...
Samantha O posted

Order by score using Pagy pagination?
3
Rails
Hi everyone. I am currently trying to order some ActiveRecord records by score. In my controller i have:
```ruby
def index
@pagy, @drivers = pagy(
Driver.select(
'drivers.*...

Background Jobs
3
Rails
Hey there,
I'm using nested attributes to generate a bunch of records at once. I'm coding a tool that crawls IP and Website Informations.
The nested attributes are set up like this:
-Company
--h...

SweetAlert integration
1
Rails
I was able to intergrate sweetAlert properly(*not using the gem but by including the files manually in vendor *)and overiding the rails defaults as follows in the application.js file=>
```
$....