1. 27 12月, 2018 9 次提交
  2. 26 12月, 2018 3 次提交
  3. 25 12月, 2018 2 次提交
  4. 24 12月, 2018 3 次提交
  5. 23 12月, 2018 2 次提交
  6. 22 12月, 2018 4 次提交
    • E
      Merge pull request #34774 from rails/fix-app-boot-for-ruby-2-4 · 2bb71a5e
      Eileen M. Uchitelle 提交于
      Fix app boot for Ruby 2.4
      2bb71a5e
    • E
      Fix app boot for Ruby 2.4 · 555c1a3a
      Eileen Uchitelle 提交于
      I have a test app that was on Ruby 2.4. When I pulled Rails master the
      app no longer would boot because of this change and I saw the following
      error:
      
      ```
      SyntaxError:
      /Users/eileencodes/open_source/real_rails/railties/lib/rails/all.rb:18:
      syntax error, unexpected keyword_rescue, expecting keyword_end
      rescue LoadError
            ^
      ```
      
      Ruby 2.4 doesn't support removing redundant begins so the real issue is
      that this app is on Ruby 2.4 and not on Ruby 2.5. But it's super
      confusing for a user to understand the reason the app is failing to boot
      is because we need Ruby 2.5.
      
      I added this redundant begin back because we need to give a clearer
      error message.
      555c1a3a
    • E
      Merge pull request #34753 from eileencodes/raise-less-confusing-error-if-handler-doesnt-exist · b00e46bd
      Eileen M. Uchitelle 提交于
      Raise helpful error when role doesn't exist
      b00e46bd
    • E
      Raise helpful error when role doesn't exist · 22a12658
      Eileen Uchitelle 提交于
      If you try to call `connected_to` with a role that doesn't have an
      established connection you used to get an error that said:
      
      ```
      >> ActiveRecord::Base.connected_to(role: :i_dont_exist) { Home.first }
      
      ActiveRecord::ConnectionNotEstablished Exception: No connection pool
      with 'primary' found.
      ```
      
      This is confusing because the connection could be established but we
      spelled the role wrong.
      
      I've changed this to raise if the `role` used in `connected_to` doesn't
      have an associated handler. Users who encounter this should either check
      that the role is spelled correctly (writin -> writing), establish a
      connection to that role in the model with connects_to, or use the
      `database` keyword for the `role`.
      
      I think this will provide a less confusing error message for those
      starting out with multiple databases.
      22a12658
  7. 21 12月, 2018 17 次提交