Fix auto-MR-close text from branch name
Rails's form helpers use the `$attr_before_type_cast` method where available, and this value only appears to be updated on assignment, not when the object is mutated in some other way: [1] pry(main)> mr = MergeRequest.new => #<MergeRequest:0x007fcf28395d88 ...> [2] pry(main)> mr.description = 'foo' => "foo" [3] pry(main)> mr.description << ' bar' => "foo bar" [4] pry(main)> mr.description => "foo bar" [5] pry(main)> mr.description_before_type_cast => "foo" [6] pry(main)> mr.description += ' bar' => "foo bar bar" [7] pry(main)> mr.description_before_type_cast => "foo bar bar"
Showing
Please register or sign in to comment