1. 18 12月, 2019 2 次提交
    • R
    • E
      Make `belongs_to_required_by_default` a class attribute: · f2873d59
      Edouard CHIN 提交于
      - I'm hoping to get this change accepted even though this flag was
        introduced years ago in 6576f735
      
        My use case is the following:
      
        We were never enforcing belongs to association and we have a lot
        of models that implicitely declare an association as optional.
        We are now changing all our models to make associations required
        by default.
        Since we have a lot of models (more than 1000), I'd like to
        progressively enable them to use the `belongs_to_required_by_default`
        flag.
      
        The problem is that this flag is a mattr_accessor and doesn't to be
        set per model. We basically need to modify all our models (which
        could take years) before being able to modify the global flag.
      
        I'd like to change this flag to a class_attribute to solve the
        issue.
      f2873d59
  2. 17 12月, 2019 1 次提交
    • P
      Use prism.js for code highlighting in guides [ci skip] · ceb54819
      Petrik 提交于
      Replace SyntaxHighlighter with prism.js. SyntaxHighlighter does not seem
      to be maintained. Prism.js seems a nice alternative with support for
      Ruby, javascript, erb and yaml. Prism.js uses the MIT License.
      https://github.com/PrismJS/prism
      
      For bash a customized definition of the bash+shell-session themes is
      used with the following comamnds  added commands:
      brew, bundle, cat, git, gem, rackup, rake, rails, ruby, rubocop and
        yarn
      ceb54819
  3. 14 12月, 2019 1 次提交
    • P
      Add missing first title to AR Query Interface guide [ci skip] · bcf54caf
      Petrik 提交于
      The Active Record Query Interface missed the first title (most other
      guides do have it, including the other AR guides).
      
      The explanation about database compatibility seems more in place above
      the guide's code example usage.
      bcf54caf
  4. 13 12月, 2019 4 次提交
  5. 11 12月, 2019 1 次提交
  6. 10 12月, 2019 1 次提交
  7. 08 12月, 2019 2 次提交
  8. 07 12月, 2019 1 次提交
  9. 06 12月, 2019 2 次提交
  10. 05 12月, 2019 2 次提交
  11. 04 12月, 2019 2 次提交
  12. 03 12月, 2019 3 次提交
  13. 02 12月, 2019 1 次提交
  14. 01 12月, 2019 1 次提交
  15. 30 11月, 2019 1 次提交
  16. 24 11月, 2019 3 次提交
  17. 22 11月, 2019 2 次提交
  18. 21 11月, 2019 3 次提交
    • E
      Modify respond_to behaviour always setting the request's content type: · 42c51576
      Edouard CHIN 提交于
      - `respond_to any` doesn't allow to specify a content type and
        the content type in the response will be based on the request
        format.
      
        ```ruby
          def my_action
            respond_to do |format|
              format.html { render(html: 'hello') }
              format.any { render(json: { foo: 'bar'}) }
            end
          end
      
          get('my_action.csv')
          # Before this patch, content type was `text/csv'
          # Ather this patch, content type is correctly set to whateve we did in the `format.any` block
        ```
      
        If the client specify the type of data he wants but the server
        doesn't know how to handle it and return plain text (or whatever)
        I don't think it make sense to falsey claim that we are returning
        a `text/csv` a response where in fact we are returning something else.
      
        Fix #37345
      42c51576
    • S
      bbcf0be6
    • J
      Add guide for inline around_action · 012b1e32
      John Crepezzi 提交于
      This commit adds a test to ensure the behavior of inline `around_action`
      calls, as well as a change to the guides to call out this alternate use of
      `around_action`.
      
      Closes #37616
      012b1e32
  19. 20 11月, 2019 1 次提交
  20. 18 11月, 2019 1 次提交
  21. 15 11月, 2019 1 次提交
    • T
      Update a tag for missing <dl> in guides · 53eafca8
      Takayuki Nakata 提交于
      The errors below heppens in executing `bundle exec rake
      guides:validate`.
      
      ```
      $ bundle exec rake guides:generate:html
      (snip)
      $ bundle exec rake guides:validate
      (snip)
        ./output/active_record_querying.html has 57 validation error(s):
      
          ERROR; line 55: Element “dt” not allowed as child of element
          “div” in this context. (Suppressing further errors from this
          subtree.)
      (snip)
      ```
      53eafca8
  22. 13 11月, 2019 2 次提交
  23. 11 11月, 2019 2 次提交