
What's a good way for upgrading a server?
4
Servers
I have an internal application that is running fine now, but I need to upgrade the version of Ubuntu Server on it. I have put this off wayyyy too long. Essentially I have a "VMWare box" on the co...
Chris Oliver replied
Solved

User model guidance
1
Rails
Hi All,
I'm creating a coaching app and have two users that use the system a coach and a client. A coach can also be a client of another coach. So I will need to be able to switch accounts to eith...
Chris Oliver replied
Solved

Looking for advice on how to setup a relationship.
7
Databases
I'm trying to figure out the best way to setup relationships between models which allows users to publish saved content from multiple models.
**ExampIe:**
I have a **Post** model which allows use...
Solved

Navbar with Vue.js and webpacker - Flickering at page load 😒
1
Javascript
I have a classic RoR - Webpacker app.
On top of Webpacker, we have implemented Vue as our frontend framework and Tailwind as our css framework 👌
Everything is functioning fine. Yet I am not quite ...
Thomas Sohet replied
Solved

ActionController::Parameters.new.require(:person)
1
Rails
Hello,
Note:I configured the App with config.action_controller.action_on_unpermitted_parameters = :raise.
Assuming I have a Model Person with attributes :name, :age.
If params = { name: "penguin...
Penguin replied
Solved

Render partial via AJAX without JQuery
9
Javascript
I've got a standard Comment.model - I'm trying to use AJAX to render partial. Using JQuery works but I'm trying to use VanillaJS only. The AJAX is working but it's rendering the markup inside of th...
Solved

Nested Parameters returns ActionController::Parameters rather than parameter value
5
Rails
Hello,
With the payload:
{
"ref": "The penguin ref",
"object":{
"a": 300,
"b": 30000,
"c": 10022
}
}
params.require(:stuff).permit(:ref, object: [:a, :b, :c]...
Chris Oliver replied
Solved

Adding Javascript to Rails 6
7
Javascript
Hi. I am fairly new to Rails and so far I have been unsucessful at adding any JS to my Rails 6 project. I have seen many videos and tutorials but i seem to run in to the same issue. Basically I get...
Chris Oliver replied
Solved

How do I create a delete button for images uploaded with Active Storage
2
Rails
I am creating a user interface for users to upload images and delete ones they've already uploaded. It is using Rails 5.2 Active Storage and Amazon S3.
The issue I am experiencing is similar to t...
Dmitriy replied
Solved

How do I show a query result in browser in excel/sheet style?
0
General
In our application we generate several reports. Instead of downloading them as Excel or CSV want to render them similar to Excel/Google sheet
anyone any ideas what the best approach is?
Peter vande Put posted
Solved

Question about twitter clone
1
Rails
Hello. I’ve been seeing a few tutorials on twitter clones and I was thinking of trying one. With my idea, instead of following people, I would like it so users can follow hashtags. Is that even pos...
Chris Oliver replied
Solved

Gem for making user groups
2
Rails
I was wondering if there is a gem for making user groups in my project. Or do I have to learn the hard way how to make user groups.
Btw I’m a hobbiest not wanting to make a living. Just want to ma...
Chris Oliver replied
Solved

CRUD on attribute in N/N join table
3
Rails
Hi!
I am struggling with a many to many relation to access an attribute stored in the join table.
I basically have two models :
- "User" which has_or_belongs_to_many :items
- "Item" which has_or...
Chris Oliver replied
Solved

Best Practices for storing API Keys, DB user / passwords, etc...
1
Rails
I would like to get everyone's take on what are is the best practice for storing DB usernames/passwords, API keys, Contstants, Etc... Should they be stored in config/environments/ then in test, dev...
Chris Oliver replied
Solved

Active storage has_many_attach replaces older images instead of appending them in Rails 6
1
Rails
Was having issues with this but found out behavior was changed from Rails 5. You have to now add the following in your `application.rb` file:
```
config.active_storage.replace_on_assign_to_many...
Marcus S replied
Solved

How do I override the default link_to helper?
3
Rails
I accept a lot of user input links and output them as anchor tags. As a result, I'm worried that there may be cases of users trying to inject Javascript into the href attribute.
I would like to ov...
Chris Oliver replied
Solved

Mailboxer Issue
1
Rails
I setup the Mailboxer gem in my application. Everything was working fine, except a read conversation kept showing up as unread. I decided to run this command in the rails console: [user].mailbox.co...
MicahBHoward replied
Solved

Nested preference settings with activerecord store
2
Rails
As per this [Episode 191][1] is there any way I can add nested settings? for example:
```
{
"wants_reminders": true,
"wants_deals_offers": true,
"subscribed_to_newsletter": true,
"something_here":...
Chris Oliver replied
Solved

Dynamic nested forms with Stimulus *and* has_many :through relationship
4
General
Hi team,
I've been following along with the [Dynamic Nested Forms with Stimulus JS](https://gorails.com/episodes/dynamic-nested-forms-with-stimulus-js?autoplay=1) lesson, but I've been attempting ...
David McDonald replied
Solved

PG::InsufficientPrivilege: ERROR: permission denied to create extension "pgcrypto" HINT: Must be superuser to create this extension. : CREATE EXTENSION IF NOT EXISTS "pgcrypto"
1
Databases
Hi everyone, I have been deploying following the guides of this site. However, I had introduced the use of UUID and so I have set the use of extensions for PostgreSQL. Now, when I deploy, I get the...
Julio Cesar Fausto replied
Solved