Ruy Rocha
Ruy Rocha
Hm, no errors while using a global variable:  How do you set `DESTROY_EVENTS` in your Rails app? Are you doing that inside an initializer?
@jamesst20 I can confirm the odd behavior is still present, and it will randomly succeed across multiple runs (of the debugging script).
It's the way it is: https://github.com/rails/rails/blob/efeee786cf0f41df35b5ed540bca47d397453fbb/activerecord/lib/active_record/model_schema.rb#L330-L334 Please give a try to this test script: ```ruby class BugTest < Minitest::Test def setup @post = Post.create! @comment = Comment.create! end def test_error_when_assigning_post_to_comment...
@alexanderholder it fails since you're touching the association, e.g: ```ruby class ProjectItem < ActiveRecord::Base belongs_to :project, touch: true, counter_cache: true # Only an issue with counter_cache ```
It wont. This is what I mean: ```ruby class NoTouchingProjectItem < ActiveRecord::Base self.table_name = :project_items belongs_to :project end class AnotherProjectItem < ActiveRecord::Base self.table_name = :project_items belongs_to :another_project, touch: true def...
It uses SSHKit under the hood, which [supports per host SSH port](https://github.com/capistrano/sshkit/blob/4628a4422fc5cd62156dae8c8979c128c3a11340/EXAMPLES.md#connect-to-a-host-on-a-port-different-than-22) and the code is already there, e.g: https://github.com/basecamp/kamal/blob/4b88852aea58bf94009a6d854afdc630a5c111b5/lib/kamal/cli/base.rb#L155-L159 I was checking the `Accessory` code and looks like it...
@JesseChavez there's #1157 with the proposed change, and I'll just wait on CI as it's super weird.
It happens as the `default_charset` is `utf-8` for text-based responses unless it's explicitly set, e.g: https://github.com/rails/rails/blob/b5b6900868712352b1b589ebfe201c7dd1d9bb75/actionpack/lib/action_dispatch/http/response.rb#L309-L313
You could trigger it in a `before_validation` callback, e.g: ```ruby class Post < ApplicationRecord has_many :comments validate :has_valid_comments before_validation { raise ActiveRecord::StrictLoadingViolationError if strict_loading? } def has_valid_comments comments.each do |c|...
:+1: on this one, as it's pretty much similar to delano/rye#63 I faced a while ago, and I think delano/rye#38 has more context on this cc @djmb @jfanals