Skip to content
Commits on May 5, 2016
  1. @arthurnn

    Merge pull request #24866 from rafaelfranca/actionview-helpers

    arthurnn committed May 5, 2016
    Implement helpers proxy in controller instance level
  2. @rafaelfranca

    Merge pull request #24799 from prathamesh-sonpatki/18439-followup

    rafaelfranca committed May 5, 2016
    Active Model: Improve CHANGELOG and documentation for `validates_acceptance_of` [ci skip]
  3. @rafaelfranca

    Merge pull request #24589 from vipulnsward/am-fragment-cache

    rafaelfranca committed May 5, 2016
    Expand on Action Mailer Fragment caching tests
  4. @prathamesh-sonpatki

    Active Model: Improve CHANGELOG and documentation for `validates_acce…

    prathamesh-sonpatki committed Apr 30, 2016
    …ptance_of` [ci skip]
    
    - Improve CHANGELOG entry for #18439.
    - The documentation is updated as per changes in PR #18439 to the
      `accept` option.
    - The explanation about the virtual attribute is moved at the end so
      that the arity of `accept` option is explained first.
    - Added a note that `message` can also be passed to `validates_acceptance_of`.
  5. @rafaelfranca
  6. @rafaelfranca

    Implement helpers proxy in controller instance level

    rafaelfranca committed May 5, 2016
    It is a common pattern in the Rails community that when people want to
    :xa
    use any kind of helper that is defined inside app/helpers they includes
    the helper module inside the controller like:
    
        module UserHelper
          def my_user_helper
            # ...
          end
        end
    
        class UsersController < ApplicationController
          include UserHelper
    
          def index
            render inline: my_user_helper
          end
        end
    
    This has problem because the helper can't access anything that is
    defined in the view level context class.
    
    Also all public methods of the helper become available in the controller
    what can lead to undesirable methods being routed and behaving as
    actions.
    
    Also if you helper depends on other helpers or even Action View helpers
    you need to include each one of these dependencies in your controller
    otherwise your helper is not going to work.
    
    We already have a helpers proxy at controller class level but that proxy
    doesn't have access to the instance variables defined in the
    controller.
    
    With this new instance level helper proxy users can reuse helpers in the
    controller without having to include the modules and with access to
    instance variables defined in the controller.
    
        class UsersController < ApplicationController
          def index
            render inline: helpers.my_user_helper
          end
        end
  7. @rafaelfranca

    Merge pull request #24869 from vipulnsward/change-example

    rafaelfranca committed May 5, 2016
    Change to use a more realistic example [ci skip]
  8. @rafaelfranca

    Merge pull request #24868 from vipulnsward/delegate_encode_with

    rafaelfranca committed May 5, 2016
    delegate encode_with instead of to_yaml, which is deprecated
  9. @vipulnsward

    Change to use a more realistic example and not giving the impression …

    vipulnsward committed May 5, 2016
    …that destroy_all is preferred way to destroy related records.
    
    This example just wants to demonstrate callback behaviour.
    
    [ci skip]
  10. @vipulnsward
  11. @rafaelfranca

    Merge pull request #24860 from maclover7/jm-rm-space

    rafaelfranca committed May 5, 2016
    Remove extra space [ci skip]
  12. @rafaelfranca

    Move protected instance variable to the right place

    rafaelfranca committed May 5, 2016
    There were a lot of protected instance variables in
    AbsctractController::Rendering that were related to Action Controller
    and Action View.
    
    Moving to ActionController::Base's protected instance list we make it
    closer to where they are really defined.
  13. @kaspth

    [ci skip] Don't promote SQL interpolation.

    kaspth committed May 5, 2016
    After fb898e9, the `before_destroy` had some code that used
    SQL interpolation left over. Don't think we should promote
    that even if the values aren't directly from user input.
  14. @maclover7

    Remove extra space [ci skip]

    maclover7 committed May 5, 2016
  15. @vipulnsward

    Merge pull request #24859 from y-yagi/do_not_pass_conditon_to_destroy…

    vipulnsward committed May 5, 2016
    …_all
    
    do not pass conditions to `#destroy_all` [ci skip]
  16. @y-yagi

    do not pass conditions to `#destroy_all` [ci skip]

    y-yagi committed May 5, 2016
    Passing conditions to `#destroy_all` was deprecated in c82c5f8.
  17. @pixeltrix

    Merge pull request #24780 from rails/run-as-test-in-both-to-time-modes

    pixeltrix committed May 5, 2016
    Run Active Support tests in both `to_time` modes
  18. @pixeltrix

    Run Active Support tests when preserving timezones

    pixeltrix committed with pixeltrix Apr 28, 2016
    Add to the matrix of Travis tests an entry that runs the Active Support
    tests when `ActiveSupport.to_time_preserves_timezone = true`.
  19. @pixeltrix

    Fix tests when preserving timezones

    pixeltrix committed with pixeltrix Apr 28, 2016
    These two tests are explicitly testing that to_time is returning times
    with the sytem timezone's UTC offset, therefore they will fail when
    running them with `ActiveSupport.to_time_preserves_timezone = true`.
  20. @pixeltrix

    Fix to_yaml test when run individually

    pixeltrix committed with pixeltrix Apr 28, 2016
    The to_yaml method is undefined when running the test as:
    
      $ ruby -I lib:test test/core_ext/string_ext_test.rb
    
    Doesn't fail when running rake test:isolated presumably because
    something else has required 'yaml' already.
Commits on May 4, 2016
  1. @kaspth

    Merge pull request #24820 from maclover7/fix-15843

    kaspth committed May 4, 2016
    Ensure compatibility between ActionDispatch::Request::Session and Rack
  2. @maclover7

    Ensure compatibility between ActionDispatch::Request::Session and Rack

    maclover7 committed May 2, 2016
    Adding the `each` method is required for ensuring compatibility between
    Rails, and other Rack frameworks (like Sinatra, etc.), that are mounted
    within Rails, and wish to use its session tooling. Prior to this, there
    was an inconsistency between ActionDispatch::Request::Session and
    Rack::Session::Cookie, due to the absence of the `each` method. This
    should hopefully fix that error. :)
    
    For a full integration test with Sinatra and a standalone Rack
    application, you can check out the gist for that here: https://gist.github.com/maclover7/08cd95b0bfe259465314311941326470.
    
    Solves #15843.
  3. @kaspth

    Merge pull request #24851 from maclover7/jm-bump-ruby-versions

    kaspth committed May 4, 2016
    Bump Ruby versions
  4. @vipulnsward

    Merge pull request #24852 from jrafanie/fix_typos

    vipulnsward committed May 4, 2016
    Fix some typos in comments [ci skip]
  5. @jrafanie

    Fix some typos in comments.

    jrafanie committed May 4, 2016
    [ci skip]
  6. @maclover7

    Bump Ruby versions

    maclover7 committed May 4, 2016
    2.2.4 --> 2.2.5
    2.3.0 --> 2.3.1
  7. @fxn

    renames ActionCable::Railtie to ActionCable::Engine

    fxn committed May 4, 2016
    This is an engine living in action_cable/engine.rb, convention is to
    call these things *::Engine.
    
    Looking at thi git history looks like the current *::Railtie was just
    an accident.
  8. @rafaelfranca

    Merge pull request #24845 from tomkadwill/action_controller_typos

    rafaelfranca committed May 4, 2016
    Fix actionpack typos [ci skip]
  9. @tomkadwill
Commits on May 3, 2016
  1. @rafaelfranca

    Merge pull request #24839 from vipulnsward/fix-bundler-ci

    rafaelfranca committed May 3, 2016
    Depend on bundler 1.11.2 on travis until bundle update discrepancy is solved on 1.12.x
  2. @rafaelfranca
  3. @vipulnsward

    Followup of #24835

    vipulnsward committed May 3, 2016
    Fix failing tests
  4. @vipulnsward
  5. @rafaelfranca

    Merge pull request #24835 from christianblais/activemodel/rangeerror

    rafaelfranca committed May 3, 2016
    Change RangeError to a more specific ActiveModel::RangeError
  6. @christianblais

    Change RangeError to a more specific ActiveModel::RangeError

    christianblais committed May 3, 2016
    The should make it easier for apps to rescue ActiveModel specific
    errors without the need to wrap all method calls with a generic
    rescue RangeError.
Something went wrong with that request. Please try again.