Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Commits on Mar 31, 2015
  1. @arthurnn

    Merge pull request #19596 from yui-knk/fix/comment_alias_attribute

    arthurnn authored
    [ci skip] Replace `query methods` with `a predicate`
  2. @yui-knk
  3. @senny

    Merge pull request #19595 from claudiob/fix-docs-set-callback

    senny authored
    Fix doc: set_callback also accepts an array of if:
  4. @claudiob

    Fix doc: set_callback also accepts an array of if:

    claudiob authored
    When Active Record calls `set_callback` inside `after_commit`,
    [these lines of code](https://github.com/rails/rails/blob/master/activerecord/lib/active_record/transactions.rb#L276)
    pass an **array** of methods as the `:if` condition:
    
    ```ruby
    options[:if] = Array(options[:if])
    options[:if] << "transaction_include_any_action?(#{fire_on})"
    ```
    
    That made me realize that anyone could pass an **array** of `:if` and `:unless`
    conditions to `set_callback`, since Active Support transforms these conditions
    into an array anyways in [these lines of code](https://github.com/rails/rails/blob/master/activesupport/lib/active_support/callbacks.rb#L365):
    
    ```ruby
    @if      = Array(options[:if])
    @unless  = Array(options[:unless])
    ```
    
    Long story short, this commit updates the documentation of the `set_callback`
    method to explain that arrays are also accepted.
    
    It also replaces +false+ and +true+ with false and true, since any _falsey_ or
    _truthy_ value will work.
    
    [ci skip]
  5. @senny

    Merge pull request #19523 from kuldeepaggarwal/fix-table-name-conflict

    senny authored
    rename `widgets` table to `new_widgets`
  6. @kuldeepaggarwal

    use Model.reset_column_information to clear table cache connection w…

    kuldeepaggarwal authored
    …ide.
    
        `widgets` table is being created in `primary_keys_test.rb` for PostgreSQLAdapter, MysqlAdapter, Mysql2Adapter
        and it makes test to fail earlier.
    
        Before:
          `bundle exec rake mysql2:test`
    
        ```
        Finished in 127.287669s, 35.5258 runs/s, 97.8885 assertions/s.
    
          1) Error:
        PersistenceTest::SaveTest#test_save_touch_false:
        ActiveModel::UnknownAttributeError: unknown attribute 'name' for #<Class:0x0000000a7d6ef0>.
            /home/kd/projects/kd-rails/activerecord/lib/active_record/attribute_assignment.rb:36:in `rescue in _assign_attribute'
            /home/kd/projects/kd-rails/activerecord/lib/active_record/attribute_assignment.rb:34:in `_assign_attribute'
            /home/kd/projects/kd-rails/activemodel/lib/active_model/attribute_assignment.rb:40:in `block in _assign_attributes'
            /home/kd/projects/kd-rails/activemodel/lib/active_model/attribute_assignment.rb:39:in `each'
            /home/kd/projects/kd-rails/activemodel/lib/active_model/attribute_assignment.rb:39:in `_assign_attributes'
            /home/kd/projects/kd-rails/activerecord/lib/active_record/attribute_assignment.rb:26:in `_assign_attributes'
            /home/kd/projects/kd-rails/activemodel/lib/active_model/attribute_assignment.rb:33:in `assign_attributes'
            /home/kd/projects/kd-rails/activerecord/lib/active_record/core.rb:293:in `initialize'
            /home/kd/projects/kd-rails/activerecord/lib/active_record/inheritance.rb:61:in `new'
            /home/kd/projects/kd-rails/activerecord/lib/active_record/inheritance.rb:61:in `new'
            /home/kd/projects/kd-rails/activerecord/lib/active_record/persistence.rb:50:in `create!'
            /home/kd/projects/kd-rails/activerecord/test/cases/persistence_test.rb:913:in `test_save_touch_false'
    
        4522 runs, 12460 assertions, 0 failures, 1 errors, 4 skips
        ```
    
        After:
          `bundle exec rake mysql2:test`
    
        ```
           Finished in 135.785086s, 33.3026 runs/s, 91.7774 assertions/s.
    
           4522 runs, 12462 assertions, 0 failures, 0 errors, 4 skips
        ```
  7. @guilleiguaran

    Merge pull request #19594 from radar/require-module-delegation

    guilleiguaran authored
    Require Module#delegate core ext in ActiveModel::Naming
  8. @radar
Commits on Mar 30, 2015
  1. @rafaelfranca

    Merge pull request #19592 from adimitri/activerecord-find-ambiguity

    rafaelfranca authored
    Combine complementary AR #find doc lines
  2. @adimitri
  3. @rafaelfranca
  4. @rafaelfranca

    Merge pull request #19021 from morgoth/activemodel-errors-refactoring

    rafaelfranca authored
    Simplify and alias ActiveModel::Errors methods where possible
  5. @rafaelfranca

    Revert "Remove Array#inquiry"

    rafaelfranca authored
    This reverts commit 9420de5.
    
    Reason: Turns out we want to keep this method.
  6. @matthewd

    Merge pull request #19034 from jvanbaarsen/explicit-job-base-class

    matthewd authored
    Add explicit base class for ActiveJob jobs
  7. @rafaelfranca

    Merge pull request #19587 from rails/rm-sprockets-3

    rafaelfranca authored
    Test using sprockets 3
  8. @rafaelfranca

    Test using sprockets 3

    rafaelfranca authored
Commits on Mar 29, 2015
  1. @rafaelfranca

    Merge pull request #19581 from kirs/bin-deprecation-version

    rafaelfranca authored
    Replace `in Rails 4` with `in Rails %version%` in deprecation message
  2. @rafaelfranca

    Merge pull request #19585 from sgrif/sg-deprecate-tokenizer

    rafaelfranca authored
    Deprecate the `:tokenizer` option to `validates_length_of`
  3. @sgrif

    Deprecate the `:tokenizer` option to `validates_length_of`

    sgrif authored
    As demonstrated by #19570, this option is severely limited, and
    satisfies an extremely specific use case. Realistically, there's not
    much reason for this option to exist. Its functionality can be trivially
    replicated with a normal Ruby method. Let's deprecate this option, in
    favor of the simpler solution.
  4. @kirs
  5. @sgrif
  6. @sgrif

    Reduce memory usage when loading types in PG

    sgrif authored
    We were never clearing the `PG::Result` object used to query the types
    when the connection is first established. This would lead to a
    potentially large amount of memory being retained for the life of the
    connection.
    
    Investigating this issue also revealed several low hanging fruit on the
    performance of these methods, and the number of allocations has been
    reduced by ~90%.
    
    Fixes #19578
  7. @zzak

    Merge pull request #19483 from yui-knk/fix/getting_started

    zzak authored
    [ci skip] Fix an object of `reference`
  8. @zzak

    Merge pull request #19575 from y-yagi/fix_batches_test

    zzak authored
    use correct method in batches test
  9. @y-yagi
Commits on Mar 28, 2015
  1. @fxn

    Merge pull request #19544 from shuhei/fix-parameters-const-missing

    fxn authored
    Return super in ActionController::Parameters.const_missing
  2. @shuhei

    Return super in ActionController::Parameters.const_missing

    shuhei authored shuhei committed
    The current implementation of ActionController::Parameters.const_missing
    returns `ActionController::Parameters.always_permitted_parameters` even
    if its `super` returns a constant without raising error. This prevents its
    subclass in a autoloading module/class from taking advantage of
    autoloading constants.
    
        class SomeParameters < ActionController::Parameters
          def do_something
            DefinedSomewhere.do_something
          end
        end
    
    In the code above, `DefinedSomewhere` is to be autoloaded with
    `Module.const_missing` but `ActionController::Parameters.const_missing`
    returns `always_permitted_parameters` instead of the autoloaded
    constant.
    
    This pull request fixes the issue respecting `const_missing`'s `super`.
Commits on Mar 27, 2015
  1. @rafaelfranca

    Remove circular require

    rafaelfranca authored
  2. @rafaelfranca

    Merge pull request #19562 from mechanicles/remove-old-link

    rafaelfranca authored
    Remove old and not working link. [ci skip]
  3. @mechanicles
  4. @rafaelfranca

    Define a setup method instead of using setup as block

    rafaelfranca authored
    setup as block run before setup actlually runs so it will fail for our
    case
  5. @rafaelfranca

    Remove Array#inquiry

    rafaelfranca authored
    We are promoting too much a feature that will not be widler used.
    So for now lets keep just the ArrayInquirer constructor.
  6. @rafaelfranca

    Merge pull request #18939 from georgeclaghorn/variant-inquiry

    rafaelfranca authored
    Provide friendlier access to request variants
  7. @zzak

    Merge pull request #19554 from prathamesh-sonpatki/improve-changelog

    zzak authored
     Improve CHANGELOG for fix for respecting pluralize_table_names [ci skip...
  8. @prathamesh-sonpatki
Something went wrong with that request. Please try again.