Skip to content


Subversion checkout URL

You can clone with
Download ZIP
branch: master
Commits on Jul 1, 2015
  1. @robin850

    Merge pull request #20631 from repinel/improve-url-for-docs

    robin850 authored
    [ci skip] Improve the url_for documentation
  2. @repinel

    [ci skip] Improve the url_for documentation

    repinel authored
    Clarify the `url_for` usage in mailers.
    Re-add the documentation about `url_for` and Route's path parameters,
    first introduced by 5c4f185.
    This was reported on #15097 and until it is decided to deprecate it
    or not, I believe the documentation should exist.
  3. @robin850

    Separate the constraint and other options [ci skip]

    robin850 authored
    Only one constraint option can be used at a time (except for the minimum
    and maximum ones that can eventually be combined). However, other
    options can be used with them (e.g. the validation failure message).
    So let's make the distinction between these two different options
    [Yves Senn, Matthew Draper & Robin Dupret]
  4. @kaspth

    Merge pull request #20747 from pwnall/fix_minitest_rails

    kaspth authored
    Avoid crashing when minitest-rails is loaded.
  5. @pwnall

    Avoid crashing when minitest-rails is loaded.

    pwnall authored
    The improvments to the test runner's integration with minitest in commit
    b6fc8e2 add methods to the Minitest
    module that refer to the Rails module. Unfortunately, when the
    minitest-rails gem is loaded, the reference is incorrectly resolved to
    the Minitest::Rails module.
Commits on Jun 30, 2015
  1. @sgrif

    Correct through associations using scopes

    sgrif authored
    The changes introduced to through associations in c80487e were quite
    interesting. Changing `relation.merge!(scope)` to `relation =
    relation.merge(scope)` should in theory never cause any changes in
    behavior. The subtle breakage led to a surprising conclusion.
    The old code wasn't doing anything! Since `merge!` calls
    `instance_exec` when given a proc, and most scopes will look something
    like `has_many :foos, -> { where(foo: :bar) }`, if we're not capturing
    the return value, it's a no-op. However, removing the `merge` causes
    `unscope` to break.
    While we're merging in the rest of the chain elsewhere, we were never
    merging in `unscope` values, causing a breakage on associations where a
    default scope was being unscoped in an association scope (yuk!). This is
    subtly related to #20722, since it appears we were previously relying on
    this mutability.
    Fixes #20721.
    Fixes #20727.
  2. @senny
  3. @senny

    `dump_schema_after_migration` applies migration tasks other than db:m…

    senny authored
    Closes #20743.
    The task `db:_dump` now only dumps the schema if
    `ActiveRecord::Base.dump_schema_after_migration` is true. This has
    - `db:migrate:up`
    - `db:migrate:down`
    - `db:forward`
    - `db:rollback`
  4. @senny

    tests, railties tests should use `bin/` executables when possible.

    senny authored
    We recommend using the `bin/` executables in our docs and guides.
    Let's make sure that our tests execute the same code path.
  5. @rafaelfranca

    Merge pull request #20741 from radar/integration_tool_doc

    rafaelfranca authored
    Improve integration_tool documentation
  6. @radar

    integration_tool defaults to :test_unit

    radar authored
    As per railties/lib/rails/test_unit/railtie.rb, where it sets it explicitly.
    This can be confirmed by starting a new Rails console session in a new app and running this code:
    I also beefed up the documentation slightly to be more explicit about what this configuration setting does.
  7. @rafaelfranca
Commits on Jun 29, 2015
  1. @rafaelfranca

    Merge pull request #20739 from jordondornbos/patch-1

    rafaelfranca authored
    fix pluralization in doc [ci skip]
  2. @jordondornbos
  3. @sgrif

    Merge pull request #20735 from vngrs/minor_addition_to_getting_started

    sgrif authored
    Minor addition to getting started guide for foreign_key description
  4. @meinac

    Minor addition to getting started guide for foreign_key description o…

    meinac authored
    …f references migration [ci skip]
  5. @srikanthps

    To fix #20644

    srikanthps authored
    Added a note on development kit for Windows Users.  This is required as Windows users can get frustrated when their first rails project creation would fail as some native gem won't get built.
  6. @senny

    docs, nodoc `NullPreloader` and `AlreadyLoaded`.

    senny authored
    These classes are part of Active Record Preloader, which is not part of
    the public API.
  7. @senny

    Merge pull request #20724 from y-yagi/fix_scaffold_in_full_engine

    senny authored
    fix NoMethodError that occurs when generating scaffold inside full mode engine
  8. @senny

    Merge pull request #20669 from akolomiychuk/image-path

    senny authored
    Passing nil to image_tag
  9. @akolomiychuk
  10. @kaspth

    Merge pull request #20538 from repinel/fix-render-caching-issue

    kaspth authored
    Fix cache issue when different partials use the same collection
  11. @repinel

    Fix cache issue when different partials use the same collection

    repinel authored
    Adds the `virtual_path` option to `cache_fragment_name` so it can
    be provided when needed.
    That allows `cache_collection_render` to get the appropriate cache
    key with the digest generated based on the template and prevent
    collision with other templates that cache the same collection.
Commits on Jun 28, 2015
  1. @claudiob

    Merge pull request #20726 from yui-knk/fix/doc_controller

    claudiob authored
    [ci skip] Fix action_controller_overview
  2. @yui-knk
  3. @fxn
  4. @y-yagi
  5. @sgrif

    Revert the behavior of association names and `where` to be closer to 4.2

    sgrif authored
    With this change, we will always assume the association name is the same
    as the table it's referencing. This is subtly different than treating
    the hash key passed to `where` as the table name, as it still allows the
    class referenced by the association to provide additional type
    After exploring several possible solutions to the ambiguity problem, I
    do not think there is a short term answer that will maintain backwards
    This change will make it so the following code does not work:
        class User
          has_many :approved_posts, -> { where(approved: true) }, class_name: "Post"
        User.where(approved_posts: { id: 1 })
    But prevents potential ambiguity and collision as demonstrated in [this
    Unfortunately, truely solving this requires significantly
    re-architecting this code, so that what is currently represented as an
    `Arel::Attribute` is instead another data structure that also references
    the association it is representing, so we can identify the proper table
    name for aliasing when we construct the final tree.
    While I'd still like to accomplish that in the long run, I don't think
    I'll be able to get there in time for Rails 5 (since I'm not full time
    OSS any more, and this is several weeks worth of work). I'm hoping to
    achieve this for Rails 5.1.
    Fixes #20308
Commits on Jun 27, 2015
  1. @eileencodes

    Improve error messages in cookies_test

    eileencodes authored
    Using `assert_predicate` and `assert_match` instead of just `assert` is
    preferrable because better error messages are output.
    In the case of `assert response.cookies.empty?` the error message was
    `Failed assertion, no message given.` but now with `assert_predicate` it
    will be `Expected {"user_name"=>"david"} to be empty?.`
    For `assert_match(/user_name=david/,
    response.headers["Set-Cookie"])` as well, the message returned was
    unhelpful - `Failed assertion, no message given.` but now will tell what
    was expected and what was returned with `Expected /user_name=david/ to
    match "user_name=nope; path=/".`
  2. @kaspth

    Merge pull request #20276 from davetron5000/revert-head-on-no-template

    kaspth authored
    Allow default_render to take a block to customize behavior when there's no template
  3. @rafaelfranca

    Merge pull request #20720 from rohandaxini/patch-2

    rafaelfranca authored
    Maintaining consistency in wording [ci skip]
  4. @rohandaxini

    Maintaining consistency in wordings [ci skip]

    rohandaxini authored
    "reproduce" word is better suited then "replicate" as its also used at other places in this same document having same context. It will then be consistent across document.
  5. @rafaelfranca

    Merge pull request #20712 from nhodges/dev/nh/20345

    rafaelfranca authored
    Remove `config` options from `default_options` in `railties`
  6. @rafaelfranca

    Merge pull request #20556 from radanskoric/improve-validation-helpers

    rafaelfranca authored
    Improve Validation Helpers' documentation comments and tests
  7. @radanskoric
Something went wrong with that request. Please try again.