Ruby on Rails Community Forum

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

Code Coverage with SimpleCov and RailsBytes Discussion

0
General
Hi - Simplecov shows that three lines are missing. I don't know what wrong with it. Please have a look at once and let me know your thoughts. sorry - can't add an attachment. require 'test_helper'...
Pardha posted

Issue with Hash Serialization during update

0
Rails
Hi all, I am working on fixing an issue that came up in our app and have been struggling to nail this one down. I have a Company model that is a one to one with a FileCompleteness model so I have ...
Ben Densmore posted

has many through with devise and subdomains.

0
Rails
based on what I saw and learned from that lesson, I am trying to do what you said - one account could have many users - but I don't get it right, I used - has many through, because I want any user ...
ash posted

backup_code error in 2FA with devise

0
Rails
I am having similar problem, please advise! Thanks, Mike ( Head Adm of [Plakaty Zdrapki](https://zdrap.to) )
MikeJonson posted

How to change de database of Sqlite3 to MongoDB on rails 5?

0
Databases
Hello guys i have a project Rails 5 with database sqlite3 and a lot scaffolds, but now i need change the databse for MongoDB, but the MongoDB dont use the active record. How i change this or remove...
Thomaz Wanderbruck Schmidt posted

grouped_options_for_select --- include a select all

0
Rails
Hi, I have Categories and CategoryType. A Category has_many CategoryTypes. In my form, I am using grouped_options_for_select to display the different category types for a category. Form: ...
Amanda posted

Refreshing the page with form errors

2
Rails
Hey all. Currently building a project with rails and so far really enjoying it. I've been using php & laravel for a long time and let me say ruby and rails are quite refreshing. In laravel wh...
Chris Oliver replied

Trix issue driving me crazy

2
Rails
Hey folx, I've been banging my head against the wall for the past two days, and I'm at this stage where it's time to ask smarter guys than me (cough, cough Chris) to help me out. This is a 7 year...
Marianna Szinek Kenesy replied

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

User logoff/clear session

1
General
Hello, folks, rails developer with week experience here :) I tried to make user sign up/log on/log off functionality from scratch, but after clicking on logoff link the session remains active becau...
Chris Oliver replied

I’m trying to create a parallax effect on Squarespace 7.1 without custom code injection.

0
General
And I’m like close, but I either scroll past containers or end up with one scrollbar per block. Has anyone done this before successfully? I don’t just want the background pics static; they should s...
DanielHenry posted

Video request: using message_bus gem

2
Gems / Libraries
Message_bus is a really nice gem by Sam Saffron that powers Discourse and thousands of other sites; it offers a server-to-server channel based notification system (so, as far as I understand, your ...
Ryan Chin replied

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

How do I deploy Spree Commerce to Heroku?

7
General
Who can direct me to a guide on how to deploy Spree Commerce to Heroku? I would really appreciate.
merolaagi replied

Using Purchased Themes with Rails | GoRails - GoRails

28
General
2 Pro episodes in a row? :(
Chris Oliver replied

ruby version 2.4.1

0
General
Hi I am looking for an migration from assembla to jira, For this i need Ruby version 2.4.1(windows exe file) but i am unable to find it anywhere still now . can anyone share me the link. so, i will...
vinodh4474 posted

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

How to use Webpack require.context Discussion

1
General
This video came out at the perfect time--I just started splitting up my public/private controllers to lighten up the assets required to view amd interact with my website, and I was having a hard ti...
Carl Tanner replied

Simple Test with empty rails fails

0
Testing
Hi everyone, I'm currently trying to create a template for internal Rails development and I just tried the newest Rails 6.0.3.1 and it fails with a simple test: ``` /tmp $ mkdir app-test /tmp $ c...
Andreas Steinel posted

Learning Ruby on Rails? Join our newsletter.

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