1. 11 5月, 2016 3 次提交
    • J
      Fix ActiveRecord::LogSubscriber edge case · c6503415
      Jon Moss 提交于
      If an attribute was of the binary type, and also was a Hash, it would
      previously not be logged, and instead raise an error saying that
      `bytesize` was not defined for the `attribute.value` (a `Hash`).
      
      Now, as is done on 4-2-stable, the attribute's database value is
      `bytesize`d, and then logged out to the terminal.
      
      Reproduction script:
      
      ```ruby
      require 'active_record'
      require 'minitest/autorun'
      require 'logger'
      
      ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
      ActiveRecord::Base.logger = Logger.new(STDOUT)
      
      ActiveRecord::Schema.define do
        create_table :posts, force: true do |t|
          t.binary :preferences
        end
      end
      
      class Post < ActiveRecord::Base
        serialize :preferences
      end
      
      class BugTest < Minitest::Test
        def test_24955
          Post.create!(preferences: {a: 1})
      
          assert_equal 1, Post.count
        end
      end
      ```
      c6503415
    • J
      Merge pull request #24956 from zachattack/patch-1 · 932655a4
      Jon Moss 提交于
      Minor syntax change
      932655a4
    • Z
      Minor syntax change · bb53774a
      Zach 提交于
      While working on this very example recently, I found that Rails will throw POST errors if you leave an empty block in front the `format.js` when using either `remote: true` or vanilla  JS/JQuery.
      bb53774a
  2. 10 5月, 2016 24 次提交
  3. 09 5月, 2016 4 次提交
  4. 08 5月, 2016 9 次提交