Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

0 votes
0 answers
34 views

HABTM relationship / validates associated: valid? is true even though I don't think it is

I made the following join table to be used in a HABTM relationship between tasks and itself: create_table :tasks_tasks, id: false do |t| t.belongs_to( :dropoff_task, null: false, ...
rwg05's user avatar
  • 127
1 vote
0 answers
29 views

Rails globalize error undefined method `translates' for Post:Class

I am using rails 6.1.4 and added transalations table to post via this migration class TransalatePosts < ActiveRecord::Migration[6.1] def change def self.up Post.create_translation_table!...
Krapi Rastogi's user avatar
0 votes
0 answers
27 views

Rails 5 -> 6 upgrade, deprecation warning from zeitwerk:check

Anyone game to dredge up memories of your Rails 5 -> 6 upgrade? I’m running bin/rails zeitwerk:check and while it is, at the end, telling me All is good! I do get a pretty big deprecation warning: ...
denishaskin's user avatar
  • 3,385
0 votes
1 answer
58 views

Rails lockbox and blind index, unable to access encrypted field

I have lockbox v1.3.3 / blind index v2.3.2 gems installed (have to use this version, can't upgrade at the moment). I am using rails 6.0.3.2 and ruby 2.6.9. I followed these steps: https://ankane.org/...
sckdd's user avatar
  • 21
0 votes
2 answers
126 views

override belongs_to association in subclass

class Post < ActiveRecord::Base belongs_to :user end class ExtraPost < Post belongs_to :user, optional: true end Rails 6.1 When creating an instance of the ExtraPost class, an error occurs ...
baim's user avatar
  • 36
0 votes
1 answer
63 views

invitation_accepted? returns FALSE in after_invitation_accepted CALLBACK

I use devise_invitable (2.0.6) invitation_accepted? returns FALSE in after_invitation_accepted CALLBACK but when I pause here and check in rails console it gives me true for invitation_accepted? user....
praaveen V R's user avatar
  • 1,261
1 vote
0 answers
58 views

Rails 6 - <%= link_to %> Is Not Opening Modal to Confirm Deletion and Just Deleting, How to Ensure Confirmation Before Deletion?

I'm currently facing a problem in my project. I'm on Rails 6.0.4.8 and Ruby 2.6.8. The issue I'm running into is that I would like a user to be able to delete a notes record by clicking on an icon but ...
Richard Wright's user avatar
0 votes
1 answer
146 views

Flash messages missing in a server rendered page

I have a Rails 6 app (migrated from Rails 5 a while ago) which manages Items and an Overview of those Items. When you update an Item you're redirected to it's Overview. Therefore in my Items ...
gemp's user avatar
  • 139
0 votes
0 answers
24 views

Possible to use Action Cable in Rails 6 on Sprockets?. I am stuck here

I realize this is a bit of a non-specific question, but I'm not exactly sure where my issue lies, so bear with me please. I am attempting to setup Action Cable in Rails 6.1.4.1 on Sprockets (no ...
Danish Rasheed's user avatar
0 votes
1 answer
61 views

ActionController::ParameterMissing in StaticPagesController#contact (Ruby on Rails 6)

How to solve this missing params? StaticPagesController: class StaticPagesController < ApplicationController def home end def about @hero_title = 'about_us' end def services @...
Rafi Ferdian's user avatar
1 vote
1 answer
67 views

Rails | Use Nested Attribute as Foreign Type For Polymorphic Association?

In Rails, I would like to structure my models such that the main record (lets call it Shipment) has a detail record (base type: ShipmentDetail) that is polymorphic such that the structure of the data ...
Ryan Pierce Williams's user avatar
1 vote
2 answers
162 views

Understanding Ruby Versioning Conflicts: Unraveling the Net::ProtocRetryError and Net::BufferedIO::BUFSIZE Warnings

Every time i'm working when i try to launch any gem like mailcatcher, start my server or run the command rails c i see this error message and i don't know why it's look like some kind of error ...
Santiago Almiron's user avatar
0 votes
1 answer
53 views

log error with passenger in rails 6 app : set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable

I have a rails 6 app, working fine, using passenger with nginx, but there is log error like this : App 759213 output: [passenger_native_support.so] trying to compile for the current user (www-data) ...
Matrix's user avatar
  • 3,461
0 votes
0 answers
40 views

Testing Devise sign_in in a multi-threaded environment

I am using the following code to test multi-threading in a Rails app where users are handled by Devise. test "multi-threaded sign-in with Devise" do user1 = create(:user) user2 = ...
user2453676's user avatar
1 vote
1 answer
237 views

wrong number of arguments (given 2, expected 1) in Rails

module ApplicationHelper def t(*a) translate(*a) end end Case 1 :- t('views.home.welcome_updated', default: 'Updated') => Getting Error: (wrong number of arguments (given 2, expected 1)) ...
Ankur  Kumar's user avatar

15 30 50 per page
1
2 3 4 5
107