Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: rails/rails
...
head fork: rails/rails
This comparison is big! We’re only showing the most recent 250 commits
Commits on Aug 18, 2015
@ravindrakumawat ravindrakumawat Add Docs for ActiveRecord #check_pending [ci skip] 8bd064e
@prakashlaxkar prakashlaxkar Correct error message in Standard American english and add a test cas…
…e for the same.
8207267
@ronakjangir47 ronakjangir47 Added docs for TimeWithZone [ci skip] ef9caad
@senny senny Merge pull request #21284 from prakashlaxkar/argument_error_tests
Correct error message in Standard American english and add a test cas…
57498e6
@senny senny Merge pull request #21283 from ravindrakumawat/add_docs_for_pending_m…
…igration

Add Docs for ActiveRecord #check_pending [ci skip]
2a2473f
@kamipo kamipo Add a native JSON data type support in MySQL
As of MySQL 5.7.8, MySQL supports a native JSON data type.

Example:

    create_table :json_data_type do |t|
      t.json :settings
    end
89d5d1c
@sjain1107 sjain1107 Added docs for TableDefinition #coloumns & #remove_column [ci skip] c351a82
@davidcornu davidcornu Use the PORT environment variable for rails server 306c14c
@CoralineAda CoralineAda Adds a code of conduct
An easy way to begin addressing the problem of inclusivity is to be overt in our
openness, welcoming all people to contribute, and pledging in return to
value them as human beings and to foster an atmosphere of kindness,
cooperation, and understanding.

A code of conduct is  one way to express these values. It lets us pledge
our respect and appreciation for contributors and participants to the
project.
80da14b
@rafaelfranca rafaelfranca Merge pull request #21110 from kamipo/mysql_json_support
Add a native JSON data type support in MySQL
a316860
@tenderlove tenderlove drop string allocations for each resource
Eagerly calculate and cache the name of Symbol objects in the path AST.
This drops about 26 string allocations per resource:

```ruby
require 'action_pack'
require 'action_dispatch'
require 'benchmark/ips'

route_set = ActionDispatch::Routing::RouteSet.new
routes = ActionDispatch::Routing::Mapper.new route_set

ObjectSpace::AllocationTracer.setup(%i{path line type})
result = ObjectSpace::AllocationTracer.trace do
  500.times do
    routes.resources :foo
  end
end

sorted = ObjectSpace::AllocationTracer.allocated_count_table.sort_by(&:last)
sorted.each do |k,v|
  next if v == 0
  p k => v
end

__END__

Before:

{:T_SYMBOL=>11}
{:T_REGEXP=>17}
{:T_STRUCT=>6500}
{:T_MATCH=>12004}
{:T_OBJECT=>99009}
{:T_DATA=>116084}
{:T_HASH=>122015}
{:T_STRING=>172647}
{:T_IMEMO=>371132}
{:T_ARRAY=>433056}

After:

{:T_SYMBOL=>11}
{:T_REGEXP=>17}
{:T_STRUCT=>6500}
{:T_MATCH=>12004}
{:T_OBJECT=>99009}
{:T_DATA=>100088}
{:T_HASH=>122015}
{:T_STRING=>159637}
{:T_IMEMO=>363134}
{:T_ARRAY=>433056}
```
01d8895
@tenderlove tenderlove symbols will always be constructed with strings. :bomb: 4d9475b
@tenderlove tenderlove drop array allocations when building paths
```ruby
require 'action_pack'
require 'action_dispatch'
require 'benchmark/ips'

route_set = ActionDispatch::Routing::RouteSet.new
routes = ActionDispatch::Routing::Mapper.new route_set

ObjectSpace::AllocationTracer.setup(%i{path line type})
result = ObjectSpace::AllocationTracer.trace do
  500.times do
    routes.resources :foo
  end
end

sorted = ObjectSpace::AllocationTracer.allocated_count_table.sort_by(&:last)
sorted.each do |k,v|
  next if v == 0
  p k => v
end

__END__

Before:

{:T_SYMBOL=>11}
{:T_REGEXP=>17}
{:T_STRUCT=>6500}
{:T_MATCH=>12004}
{:T_OBJECT=>99009}
{:T_DATA=>100088}
{:T_HASH=>122015}
{:T_STRING=>159637}
{:T_IMEMO=>363134}
{:T_ARRAY=>433056}

After:

{:T_SYMBOL=>11}
{:T_REGEXP=>17}
{:T_STRUCT=>6500}
{:T_MATCH=>12004}
{:T_OBJECT=>91009}
{:T_DATA=>100088}
{:T_HASH=>114013}
{:T_STRING=>159637}
{:T_ARRAY=>321056}
{:T_IMEMO=>351133}
```
d993cb3
@tenderlove tenderlove don't touch internals
We shouldn't be messing with the NamedRouteCollection internals.  Just
ask the object if the named route is in there.
62383dd
@tenderlove tenderlove make the routes reader private
nobody should be touching the routes hash without going through the
NamedRouteCollection object.
7187339
@maclover7 maclover7 Add code of conduct to README.md and to contributing guide [ci skip] 8e35ab8
Commits on Aug 19, 2015
@senny senny Merge pull request #21282 from sjain1107/added_docs
Added docs for TableDefinition #coloumns & #remove_column [ci skip]
0a17e8c
@dhh dhh Merge pull request #21292 from CoralineAda/coc
Adds a code of conduct
dd86b3b
@guilleiguaran guilleiguaran Merge pull request #21294 from maclover7/codeofconduct
Add code of conduct info to README.md and to contributing guide
f454ad3
@Andreis13 Andreis13 Migrate to Sprockets 4. d0e0fba
@jonahb jonahb Correct cache store superclass in comment d617347
@rafaelfranca rafaelfranca Merge pull request #21132 from Andreis13/sprockets-4
Migrate to Sprockets 4.
3ee7c57
Commits on Aug 20, 2015
@ronakjangir47 ronakjangir47 Cleaned up generators tests using internal assertion helper 63a70ad
@kaspth kaspth Merge pull request #21279 from ronakjangir47/test_cleanup
Cleaned up generators tests using internal assertion helper
c83b117
@ronakjangir47 ronakjangir47 Removed mocha from ActionMailer c48257b
@senny senny Merge pull request #21300 from jonahb/cache
Correct cache store superclass in comment [ci skip]
013dd75
@senny senny uniqueness validation raises error for persisted record without pk.
Closes #21304.

While we can validate uniqueness for record without primary key on
creation, there is no way to exclude the current record when
updating. (The update itself will need a primary key to work correctly).
50e4aff
@y-yagi y-yagi fix path of annotations.rake [ci skip] 4d90bd0
@senny senny Merge pull request #21310 from y-yagi/fix_file_path
fix path of annotations.rake [ci skip]
07d6e1d
@byroot byroot File renaming should be the last operation of an atomic write 5d3b3cb
@matthewd matthewd Merge pull request #16245 from byroot/more-atomic-write
File renaming should be the last operation of an atomic write
eb73110
@piton4eg piton4eg Small fixes [ci skip] 81cec09
@kaspth kaspth Merge pull request #21306 from ronakjangir47/remove_mocha_actionmailer
Removed mocha from ActionMailer
86e0136
@reshleman reshleman Fix Punctuation in `AutosaveAssociation` RDoc
[ci skip]
23dbe10
@tenderlove tenderlove point at rack master 51211a9
@tenderlove tenderlove smooth move aaron.... :bomb: d226ba5
@tenderlove tenderlove argh!!! 7354ef1
@tenderlove tenderlove set route precedence at allocation time
This way we can make the Route object a read-only data structure.
867810c
Commits on Aug 21, 2015
@senny senny Merge pull request #21313 from reshleman/re-punctuation
Fix Punctuation in `AutosaveAssociation` RDoc [ci skip]
90bb737
@bquorning bquorning Rack changed their status codes to IETF RFC 7231 4bcab1c
@bquorning bquorning 4.2 release notes about `render` status options 3ec3ac6
@piton4eg piton4eg Add bold to lists' titles [ci skip] 0b18876
@senny senny Merge pull request #21312 from piton4eg/patch-7
Small fixes [ci skip]
acb2b07
@senny senny better docs for `disable_ddl_transaction!`. Closes #21044. 3088460
@pixeltrix pixeltrix Merge pull request #21106 from amitsuroliya/fix_routing_test
Remove duplicity in tests
95cb2e3
@tenderlove tenderlove move header allocation to a helper method
I'm going to change the constructor, so it's easier to do it in one
place.
c6cfcc6
@tenderlove tenderlove pass a request object to the headers object 34fa665
@eileencodes eileencodes Remove unnecessary caching
`ActiveSupport::Dependencies.constantize(const_name)` calls
`Reference.new` which is defined as
`ActiveSupport::Dependencies.constantize(const_name)` meaning this call
is already cached and we're doing caching that isn't necessary.
ec9c6d5
@chancancode chancancode Move the CoC text to the Rails website 90bcb6d
@Gaurav2728 Gaurav2728 discard xml Serialization documentation that is no longer available […
…ci skip]
71ed339
@sgrif sgrif JSON is still an adapter specific type.
Several changes were made in #21110 which I am strongly opposed to.
(this is what I get for going on vacation. :trollface:) No type should
be introduced into the generic `ActiveRecord::Type` namespace, and
*certainly* should not be registered into the registry unconstrained
unless it is supported by *all* adapters (which basically means that it
was specified in the ANSI SQL standard).

I do not think `# :nodoc:` ing the type is sufficient, as it still makes
the code of Rails itself very unclear as to what the role of that class
is. While I would argue that this shouldn't even be a super class, and
that MySql and PG's JSON types are only superficially duplicated (they
might look the same but will change for different reasons in the
future).

However, I don't feel strongly enough about it as a point of contention
(and the biggest cost of harming the blameability has already occured),
so I simply moved the superclass into a namespace where its role is
absolutely clear.

After this change, `attribute :foo, :json` will once again work with
MySQL and PG, but not with Sqlite3 or any third party adapters.

Unresolved questions
--------------------

The types that and adapter publishes (at least those are unique to that
adapter, and not adding additional behavior like `MysqlString` should
probably be part of the adapter's public API. Should we standardize the
namespace for these, and document them?
ffc4710
@tenderlove tenderlove dup the request and mutate its headers object.
duping the request will dup it's underlying env hash.
1fbf5ad
@tenderlove tenderlove use `set_header` rather than []=
This allows us to avoid calling `env_name` twice.
ba2173a
@tenderlove tenderlove use accessors on the request object for manipulating env
this reduces the API footprint for the env hash so that we can be more
flexible when changing API in the future
fbf6b98
@tenderlove tenderlove dup the env hash on Header#env
This prevents external mutations from impacting the internals of the
request or the Header object.
c0c7268
@tenderlove tenderlove use methods on the request object to implement `fetch`
Now the Headers internals don't depend on the env hash.
bce4ff7
Commits on Aug 22, 2015
@tenderlove tenderlove use public API to fetch the parameter filter
now the parameter filter doesn't need to know about the env hash in
these two methds.
992bf07
@tenderlove tenderlove stop directly accessing `@env` in mime_negotiation
we want to go through methods to access `env` because in the future that
ivar may not be available, or may be calculated lazily
7bd34c1
@tenderlove tenderlove set cached values in the env hash ec760e6
@amatsuda amatsuda Test against the newest stable ruby 2.2.3 15f3cc8
@jonatack jonatack [skip ci] Debugging Rails Guide fixes
- Fixes:

"we want go deep" -> "we won't go deep"

"to next next line" -> "to the next line"

- Minor improvements in clarity and grammar.

Cheers :)
94a0c1c
@kaspth kaspth Merge pull request #21328 from jonatack/fix-debugging-rails-guide
[skip ci] Debugging Rails Guide fixes
0885a5c
@eileencodes eileencodes Refactor to remove controller class from route to request
This refactoring moves the controller class name that was on the route
set to the request. The purpose of this refactoring is for changes we
need to move controller tests to integration tests, mainly being able to
access the controller on the request instead of having to go through
the router.

[Eileen M. Uchitelle & Aaron Patterson]
4276b21
@eileencodes eileencodes Fix Railties test failure for asset routes
Since none of the action pack tests failed without this conditional it
didn't seem necessary. This fixes the build because it correctly returns
a 404 instead of a 500 for the asset routes test.

Test that was failing was in the `assets_test.rb` file and was the test
named `test_assets_routes_are_not_drawn_when_compilation_is_disabled`.
f15a260
@spastorino spastorino Merge pull request #20757 from bquorning/http-status-codes-changed-in…
…-rack

Rack changed their status codes to IETF RFC 7231
4115a12
@tenderlove tenderlove use get / set header to avoid depending on the `env` ivar 383f18b
@tenderlove tenderlove convert `@env` use to get / set header
We need to abstract the internals of the request object away from this
instance variable so that the values for `@env` can be calculated in a
different way.
3e0b932
@tenderlove tenderlove use `body_stream` instead of getting the env value ourselves
we have a method that knows how to get rack.input, so lets use that.
64f6dc6
@tenderlove tenderlove metaprogram the HTTP_X_REQUEST_ID method
we're already doing this with a bunch of other header data.
39837b1
@tenderlove tenderlove move ORIGINAL_SCRIPT_NAME to the metaprogrammed methods 3ca8f91
@tenderlove tenderlove move more `@env` access to method calls
We're going to implement storing env values differently in the future,
so let's disconnect these methods from the instance variables
4f244f7
Commits on Aug 23, 2015
@yui-knk yui-knk [ci skip] Add style guide about comma fedfc3b
@tenderlove tenderlove use a request object in the session middleware
This commit allows us to use one request object rather than allocating
multiple request objects to deal with the session.
5fe1416
@ronakjangir47 ronakjangir47 Added docs for CollectionProxy#take [ci skip] f9f156b
@schneems schneems Merge pull request #21334 from yui-knk/doc/about_comma_style
[ci skip] Add style guide about comma
55320fa
@yui-knk yui-knk Remove not used a block argument (`&block`) 3048f2f
@yui-knk yui-knk Use `ActiveRecord::Migration#connection` instead of `@connection`
`ActiveRecord::Migration` has `connetion` method so replace to use
`connection` method to get `@connection` as much as possible
1591c34
@senny senny Merge pull request #21335 from yui-knk/refactor/remove_not_used_block…
…_arg

Remove not used a block argument (`&block`)
06f071c
@y-yagi y-yagi fix syntax error in strip_links example [ci skip]
can not use double quotes in double quoted string without escape
6e46ba3
@seuros seuros Merge pull request #21338 from y-yagi/fix_strip_links_example
fix syntax error in strip_links example [ci skip]
3cbaeb1
@ronakjangir47 ronakjangir47 Another place to use a request object in NullSessionHash
May be missed in 5fe1416 commit
Also fixes the broken build
688bcc8
@yui-knk yui-knk Remove test helper method to inside test method
Remove `MigrationTest#connection` and write `ActiveRecord::Base.connection`
directly to test, because `MigrationTest#connection` is only used in
`test_migration_instance_has_connection`.
0996975
@deepj deepj Remove unused block arguments dbfab58
@yui-knk yui-knk Add `assert_nothing_raised` to make clear test case perpose b43c098
@shunsukeaida shunsukeaida Remove a link to the site that seems to be gone. [ci skip]
Followup to #20637.
10c7338
@eileencodes eileencodes Merge pull request #21332 from ronakjangir47/take_docs
Added docs for CollectionProxy#take
c106ba9
@arunagw arunagw Merge pull request #21343 from shunsukeaida/remove_broken_link
Remove a link to the site that seems to be gone. [ci skip]
093e6ae
@senny senny Merge pull request #21340 from ronakjangir47/request_object
Another place to use a request object in NullSessionHash
0ae0b3a
@aditya-kapoor aditya-kapoor Trim out unneeded controllers from AP test suite b393c6a
@senny senny Merge pull request #21341 from yui-knk/fix/ar_test_remove_innermethod
Remove test helper method to inside test method
861146f
@tenderlove tenderlove remove usage of `@env`
try to remove dependencies on `@env` so we can have more flexible
internals
f038ed2
@tenderlove tenderlove convert more `@env` access to get / set header a682b44
@tenderlove tenderlove remove more env access 7de86d2
@tenderlove tenderlove remove more env access 97c65aa
Commits on Aug 24, 2015
@tenderlove tenderlove remove more `env` access f16a33b
@tenderlove tenderlove remove env access from debug_exceptions
Creates fewer request objects and helps to abstract away from internals
feb248c
@tenderlove tenderlove use `Request#path_info` instead of direct ENV access
we already have a request, so we should use the methods on the request
to access the path info information
71d0b61
@tenderlove tenderlove use methods on the request object instead of accessing env 9503e65
@ronakjangir47 ronakjangir47 Removed Mocha from ActionView part 1 0a5b08a
@piton4eg piton4eg Fix docs for debugging [ci skip]:
* fix command list for thread
* add omitted end of code
* fix description for `continue` and `finish` command
0fb2600
@yui-knk yui-knk [ci skip] Fix the grammar
This is discussed on #21334
58e02ac
@vijaydev vijaydev Merge pull request #21348 from yui-knk/fix/about_comma_style_2
[ci skip] Fix the grammar
06818cb
@vijaydev vijaydev add commas removed earlier [ci skip] 5bcb454
@vijaydev vijaydev Revert "[ci skip] Fix to `a, b or c` format"
This reverts commit 9876a16.

Reason: Oxford commas are preferred. This is now documented in
the documentation guidelines.
bc36ffe
@vijaydev vijaydev Merge branch 'master' of github.com:rails/rails
Conflicts:
	guides/source/security.md
4f252cd
@kaspth kaspth Merge pull request #21347 from ronakjangir47/remove_mocha_actionview
Removed Mocha from ActionView part 1
ef8d09d
@akihiro17 akihiro17 Remove unused variables 7adef79
@agis- agis- Only nullify persisted has_one target associations
Since after 87d1aba `dependent: :destroy` callbacks on has_one
assocations run *after* destroy, it is possible that a nullification is
attempted on an already destroyed target:

    class Car < ActiveRecord::Base
      has_one :engine, dependent: :nullify
    end

    class Engine < ActiveRecord::Base
      belongs_to :car, dependent: :destroy
    end

    > car = Car.create!
    > engine = Engine.create!(car: car)
    > engine.destroy! # => ActiveRecord::ActiveRecordError: cannot update a
    >   destroyed record

In the above case, `engine.destroy!` deletes `engine` and *then* triggers the
deletion of `car`, which in turn triggers a nullification of `engine.car_id`.
However, `engine` is already destroyed at that point.

Fixes #21223.
19b168e
@senny senny guides, move incomplete example to corresponding option. #21349
[ci skip]

This example is dependent on the `:end_at` option and has been removed
from `4-2-stable` (d167b81)
5abff7c
@senny senny Merge pull request #21320 from piton4eg/patch-8
Small fixes [ci skip]
a256a57
@rodzyn rodzyn Get rid of mocha tests - part 1 3a161e6
@kaspth kaspth Merge pull request #21321 from rodzyn/removing_mocha
Get rid of mocha tests in actionpack - part 1
b982580
@senny senny Merge pull request #21091 from y-yagi/add_activejob_section_to_instru…
…mentation_guide

add Active Job section to instrumentation guide [ci skip]
5500e28
@yui-knk yui-knk [ci skip] Fix migration file's timestamp
In rails generally migration file's timestamp is "YYYYMMDDHHMMSS".
454e0c1
@sgrif sgrif Merge pull request #21350 from agis-/issue-21223
Only nullify persisted has_one target associations
2170950
@sgrif sgrif Fix failing tests caused by #21350 4f39d89
@sgrif sgrif Further fix failing tests caused by #21350 35161a7
@rafaelfranca rafaelfranca Merge pull request #21267 from davidcornu/rails-server-port-env-var
Use the PORT environment variable for rails server
1c1ad2b
@rafaelfranca rafaelfranca Merge pull request #21342 from yui-knk/test/add_assert_method
Add `assert_nothing_raised` to make clear test case perpose
c5abac2
@rafaelfranca rafaelfranca Merge pull request #21355 from akihiro17/remove-variables
Remove unused variables
9e5ba3c
@carlosantoniodasilva carlosantoniodasilva Merge pull request #21339 from deepj/unused-block-arguments
Remove unused block arguments
35decf4
@robin850 robin850 Merge pull request #21354 from yui-knk/fix/migration_file_timestamp
[ci skip] Fix migration file's timestamp
be19bf3
@apotonick apotonick remove LookupContext#with_layout_format by passing formats for layout…
…s explicitely.
8d7ce0f
@apotonick apotonick remove useless case in #resolve_layout. c0daa02
@rafaelfranca rafaelfranca Allow release when CHANGELOG is changed b58808e
@rafaelfranca rafaelfranca Pass formats to lookup_context
Before we were changing the state of the lookup_context for the duration
of the with_layout_format block, but since we already know the formats
we can just pass it explicitly.

Related with 8d7ce0f
face604
@rafaelfranca rafaelfranca Pass the correct formats 518ae9f
@tenderlove tenderlove use a custom request class to determine the controller class
controller class resolution has been moved to the request object, so we
should override that method instead of relying on the RouteSet to
generate the controller class.
337684f
@Gaurav2728 Gaurav2728 temp files are no more require
`:nail_care:`
a50872d
@rafaelfranca rafaelfranca Merge pull request #21359 from Gaurav2728/gaurav-remove_unused_requir…
…e_file

temp files are no more require
bd94e6d
@tenderlove tenderlove subclass and delegate rather than mutating existing objects
If we subclass and augment the superclass, then we don't need to have
setters for particular things on the superclass.
2237ee0
@tenderlove tenderlove remove setter for the dispatcher class
we don't need it anymore.  We always use the same dispatcher in tests.
31cc4d6
@tenderlove tenderlove remove useless ivar b0e7db9
@tenderlove tenderlove use `make_set` helper method to generate route sets
We should keep the route set generation logic in one place
74020eb
@tenderlove tenderlove directly ask the request for the controller class
Now that we don't have subclasses depending on this method (they augment
the request class instead of the dispatch class) we can remove this
method and directly ask the request object for the controller class
59e3b64
@tenderlove tenderlove pull up dispatcher allocation
the dispatcher class isn't configurable anymore, so pull up allocation
to the method that needs it.
9b20b1c
@tenderlove tenderlove remove dead code :bomb: 7a62cc7
@tenderlove tenderlove rm useless method
superclass already has this method, so remove this one
ec9c237
@tenderlove tenderlove stop using `@env` in the GET / POST methods
I want to implement this with something besides `@env` in the future, so
lets stop directly referencing it.
c4c5918
@olleicua olleicua minor documentation improvement [ci skip] 12208d4
@tenderlove tenderlove override `controller_class` on the request
Just like the other places.  We need to refactor this because the code
is almost identical to that in the action pack tests
c25cf09
@rafaelfranca rafaelfranca Merge pull request #21361 from olleicua/master
minor documentation improvement [ci skip]
f5f4d13
@tenderlove tenderlove fewer calls to `env`
We don't want to directly access the env hash
a1ff558
@tenderlove tenderlove remove more direct access to `env` cccc759
@tenderlove tenderlove remove another `@env` access d4e1f58
Commits on Aug 25, 2015
@tenderlove tenderlove remove more direct `env` mutations c82248e
@tenderlove tenderlove use `caller_locations` instead of `caller`
We have `caller_locations`, so we don't need to parse the strings in the
callstack.
211f55d
@amitsuroliya amitsuroliya Remove unused block arguments 65c4076
@rafaelfranca rafaelfranca Merge pull request #21363 from amitsuroliya/remove_unused_variable
Remove unused block arguments
aaacc67
@justanshulsharma justanshulsharma Remove unused block arguments 7b1c783
@rafaelfranca rafaelfranca Merge pull request #21365 from justanshulsharma/remove_unused_variable
Remove unused block arguments
72f2dd4
@rafaelfranca rafaelfranca Merge pull request #21094 from aditya-kapoor/add-missing-ap-tests
add missing test for action regexp for routing
f3e68ec
@rodzyn rodzyn Get rid of mocha tests - part 2 00234f5
@agrimm agrimm [ci skip] Fix #21364 error in documentation about ActiveRecord::Enum 4c4aaa4
@senny senny Merge pull request #21369 from agrimm/documentation_fix_21364
[ci skip] Fix #21364 error in documentation about ActiveRecord::Enum
211c31d
@robin850 robin850 Merge pull request #21074 from vrybas/rdoc-fix-typo-belongs-to-invers…
…e-of-class-name

RDoc: fix wrong model name `:inverse_of` with `:belongs_to` [ci skip]
a70e6f1
@NehaGautam NehaGautam remove unused require ‘set’ c23e06c
@yui-knk yui-knk Make `change_column_default` to work
This is fix of #20018 which removes `change_column_default` from
array, so `CommandRecorder#method_missing` catches
`change_column_default` and @delegate's method is called.

This PR

* fix this bug
* define `ReversibleAndIrreversibleMethods` const making clear
  which this array means to prevent these miss
c90008a
@robin850 robin850 A quick pass over the testing guide
* Fixtures are loaded for all the tests by default (not only model and
  controller tests).
* Fix a few typos and improve the markup at some levels.
* Wrap changes to 80 chars

[ci skip]
f150dec
@robin850 robin850 Fix a tiny typo [ci skip] f59de08
@rafaelfranca rafaelfranca Merge pull request #21371 from NehaGautam/neha-remove_set
remove unused require ‘set’
57105d9
@spastorino spastorino Merge pull request #21372 from yui-knk/fix/revert_change_column_default
Make `change_column_default` to work
61ebc20
@rafaelfranca rafaelfranca Merge pull request #21345 from aditya-kapoor/trim-ap
Trim out least needed controllers from AP test suite
e84cc9a
@rodzyn rodzyn Make `assert_index` private
This `protected` keyword looks like some leftover, since
we are not using explicit receiver, this should go under `private`
a1772bb
@rafaelfranca rafaelfranca Merge pull request #21374 from rodzyn/protected_not_needed
Make `assert_index` private
9eb7ee2
@rodzyn rodzyn Remove unused requires
They are already required in `actionpack/lib/action_dispatch.rb` (L25-L26)
38baf94
@ronakjangir47 ronakjangir47 Removed mocha from Active Record Part 1 796c83f
@amitsuroliya amitsuroliya Remove more unused block arguments 8f0073b
@rafaelfranca rafaelfranca Merge pull request #21366 from amitsuroliya/remove_unused_variable
Remove more unused block arguments
578618d
@rafaelfranca rafaelfranca Merge pull request #21375 from rodzyn/unused_requires
Remove unused requires
2dd2d0c
@rafaelfranca rafaelfranca Merge pull request #21324 from Gaurav2728/gaurav-xml_serialization_do…
…c_fix

discard xml Serialization documentation that is no longer available […
e662925
@jdantonio jdantonio Initial implementation of ActiveJob AsyncAdapter. 25a4155
@rafaelfranca rafaelfranca Merge pull request #21281 from ronakjangir47/added_docs
Added docs for TimeWithZone [ci skip]
4788d7f
@kaspth kaspth Merge pull request #21257 from jdantonio/async-job
Initial implementation of ActiveJob AsyncAdapter.
c5a88e5
@kaspth kaspth Merge pull request #21368 from rodzyn/remove_mocha
Get rid of mocha tests in actionpack - part 2
7ee60d4
@kaspth kaspth Merge pull request #21377 from ronakjangir47/remove_mocha_active_record
Removed mocha from Active Record Part 1
fa54f58
@tenderlove tenderlove always return a controller class from the `controller_class` method
now the caller can just treat it like a regular controller even though
it will return a 404
702965c
@tenderlove tenderlove always dispatch to controllers the same way
controllers should always go through the `action` class method so that
their middleware is respected.
a26033b
@tenderlove tenderlove adding a direct dispatch method to controller classes
This saves a lambda and request allocation on each request.
67b2841
@tenderlove tenderlove move response allocation to the class level
we don't need an instance to figure out what type of response to
allocate.  Later we'll pull this up the stack and pass the response
object down
d1b9a13
Commits on Aug 26, 2015
@tenderlove tenderlove rack SPEC doesn't allow `first` on the body
collect the body and make assert against the collected body
7401c4a
@tenderlove tenderlove Fix another rack SPEC violation 27902c7
@tenderlove tenderlove :snip: whitespace 85a78d9
@tenderlove tenderlove provide a request and response to all controllers
Controllers should always have a request and response when responding.
Since we make this The Rule(tm), then controllers don't need to be
somewhere in limbo between "asking a response object for a rack
response" or "I, myself contain a rack response".  This duality leads to
conditionals spread through the codebase that we can delete:

  * https://github.com/rails/rails/blob/85a78d9358aa728298cd020cdc842b55c16f9549/actionpack/lib/action_controller/metal.rb#L221-L223
51c7ac1
@ronakjangir47 ronakjangir47 Fixed to_datetime docs [ci skip] 1be7fca
@senny senny Merge pull request #21380 from ronakjangir47/fix_docs
Fixed to_datetime docs [ci skip]
479217c
@jeremyf jeremyf Updating TestSession to access with indifference
The following Rails code failed (with a `KeyError` exception) under
test:

```ruby
class ApplicationController < ActionController::Base
  def user_strategy
    # At this point:
    # ```ruby
    # session == {
    #   "user_strategy"=>"email",
    #   "user_identifying_value"=>"hello@world.com"
    # }
    # ```
    if session.key?(:user_strategy)
      session.fetch(:user_strategy)
    end
  end
end
```

When I checked the session's keys (`session.keys`), I got an array of
strings. If I accessed `session[:user_strategy]` I got the expected
`'email'` value. However if I used `session.fetch(:user_strategy)` I
got a `KeyError` exception.

This appears to be a Rails 4.2.4 regression (as the code works under
Rails 4.2.3).

Closes #21383
0258ef3
@akihiro17 akihiro17 Fix the unused variable warning
This fixes the following warning.

```ruby
warning: assigned but unused variable - index_definition
```
6d480a8
@senny senny Merge pull request #21382 from akihiro17/fix-test
Fix the unused variable warning
e47e8e9
@ronakjangir47 ronakjangir47 Removed duplicate requiring minitest/mock as it is already required i…
…n method_call_assertions
8d7bf97
@ronakjangir47 ronakjangir47 Removed duplicate require ‘models/computer’ 592ba58
@rafaelfranca rafaelfranca Merge pull request #21336 from yui-knk/refactor/to_use_getter
Use `ActiveRecord::Migration#connection` instead of `@connection`
b2a2594
@rafaelfranca rafaelfranca Merge pull request #21386 from ronakjangir47/remove_dups
Removed duplicate requires
09173b5
@tenderlove tenderlove remove useless conditional
controller instances always have a response object, so we don't need to
test to see if there is one, just always call to_a on the response.
44454bd
@tenderlove tenderlove remove useless conditional
We always have a response object in controller instances, so we can
remove this conditional
109fb8e
@tenderlove tenderlove ask the response for the status
The controller instance always has an instance of a response object.  We
should store the status code on the response object so that it's only
store in one place.
02f5a28
@tenderlove tenderlove use the content_type method on the request object
since the controller always has a request on it, we can just ask the
request for the content type.
27daea8
@tenderlove tenderlove remove ivars from the "protected" list
these ivars don't exist anymore, so we can remove them from the list
a50d55a
@tenderlove tenderlove remove useless conditional
we always have a response object, so there is no reason to test it
ab0703e
@tenderlove tenderlove remove useless status set
Now that `Controller#status=` just delegates to the response object,
we don't need to set the response on the controller and the response.
We can just set it in one place.
11ccdc8
@tenderlove tenderlove `headers` should delegate to the response object 54becd1
@kaspth kaspth Merge pull request #21387 from ronakjangir47/remove_dup_minitest
Removed duplicate require 'minitest/mock'
a20c523
@tenderlove tenderlove include ActionView::Rendering in the minimal controller
without this module, the content type is not set correctly
3cc35be
@tenderlove tenderlove remove useless method
the subclass sets the body on the response object, so we don't need the
superclass doing it too
6570ab7
@tenderlove tenderlove remove RackDelegation module
Since all controller instances are required to have a request and
response object, RackDelegation is no longer needed (we always have to
delegate to the response)
d474387
@Gaurav2728 Gaurav2728 no more require minitest mock aa1f53f
@tenderlove tenderlove stop passing the options hash to `_process_format`
We don't need to pass the full hash just to pull one value out.  It's
better to just pass the value that the method needs to know about so
that we can abstract it away from "options"
fa09bf4
@tenderlove tenderlove Pull `plain` content type handling up to `render`
`render` is the only possible source for the `plain` option.  Pulling
the conditional up to the `render` method removes far away conditionals
2ceb16e
@tenderlove tenderlove only call self.content_type= when there is a response
Apparently the AbstractController (whatever "abstract" means) is
expected to work without a request and response.
3b8395a
@tenderlove tenderlove remove useless code
If AV::Rendering is mixed in, then `rendered_format` will be calculated
based on the current `lookup_context`, but calling `_process_format`
will set the `rendered_format` back on to the same lookup context where
we got the information in the first place!

Instead of getting information from an object, then setting the same
information back on to that object, lets just do nothing instead!
446b685
@y-yagi y-yagi remove require of files under support that do not use
I do not know why files under the support has been require.
However, under the support even rails application does not use.
In addition, since the default under the support file nor is generated, it requires I think not necessary
46eb6a0
@tenderlove tenderlove Remove useless conditional
If the response method is defined, then calling `response` will return a
response.
e6425f6
@tenderlove tenderlove remove redefined method
Rack::Response::Helpers implements this method, so we can safely remove
it
c967c5e
Commits on Aug 27, 2015
@rodzyn rodzyn Code cleanup
Cleanup for `ActionDispatch::Http::Parameters` - no need for required libraries
and remove not used private method.

Apparently this method was used in `ActionDispatch::Http::Request` - fixed
by calling `Request::Utils` explicitly (as was done in other parts of the codebase)
fa216dc
@senny senny Merge pull request #21389 from Gaurav2728/gaurav-unused_require_file
no more require minitest mock here
b8f00b0
@senny senny Merge pull request #21392 from y-yagi/rm_require_support_files
remove require of files under support that do not use
8748a3e
@senny senny Merge pull request #21384 from jeremyf/updating-ActionController-Test…
…Session-to-behave-as-a-hash-with-indifferent

Updating TestSession to access with indifference
6236cc4
@senny senny minor copy edit. [ci skip]
Follow up to #21384.
a62a164
@tenderlove tenderlove use the non-hash dependent Rack utils API
eventually we will refactor this to not know about header hashes
97d088e
@tenderlove tenderlove implement the API required by the abstract Rack request. 14af136
@tenderlove tenderlove remove useless conditional
cookies are always stored as a string in the header hash, so it will not
need to be joined.
f597dc5
@tenderlove tenderlove use the abstract API in modules
Modules should be using the API that the abstract modules use so that we
can move these modules between implementations
4e88f4f
@tenderlove tenderlove remove `@etag` ivar
we're storing the value in the headers hash, so lets just store the
value in one place.
53265e8
@tenderlove tenderlove remove dependency on `@cache_control` ivar
eventually we'll remove this instance variable, but this is the first
step
d05d7e2
@piton4eg piton4eg Fix Configuring Active Record [ci skip] 0c85705
@tenderlove tenderlove this always sets :public to false, so just do that cae2b5b
@tenderlove tenderlove Revert "this always sets :public to false, so just do that"
This reverts commit cae2b5b.

I am an idiot.
bf203e4
Commits on Aug 28, 2015
@y-yagi y-yagi remove link to outdated article in plugins guide [ci skip]
linked article is a description of the plugins in Rails 2.1.
c98fd25
@sgrif sgrif Merge pull request #21410 from y-yagi/fix_link_in_plugin_guide
remove link to outdated article in plugins guide [ci skip]
f642208
@byroot byroot 10X speed improvements for AS::Dependencies.loadable_constants_for_path
When the autoload_paths start to grows, this methods is quite a hotspot

>> ActiveSupport::Dependencies.autoload_paths.size
=> 49

>> Benchmark.ips { |x| x.report('baseline') { ActiveSupport::Dependencies.loadable_constants_for_path(File.expand_path('app/models/shop')) }}
Calculating -------------------------------------
            baseline    90.000  i/100ms
-------------------------------------------------
            baseline      1.073k (±20.2%) i/s -      4.950k

After the patch

Calculating -------------------------------------
             patched   883.000  i/100ms
-------------------------------------------------
             patched     11.050k (±19.7%) i/s -     50.331k
2e0cd0f
@claudiob claudiob Merge pull request #21409 from piton4eg/patch-9
Fix Configuring Active Record  [ci skip]
65684d7
@rafaelfranca rafaelfranca Merge pull request #21411 from byroot/perf-improvement-in-dependencie…
…s-loadable-constants

10X speed improvements for AS::Dependencies.loadable_constants_for_path
1abbd3e
@rafaelfranca rafaelfranca Disable warnings in railties tests 2a6071a
@guilleiguaran guilleiguaran Merge pull request #21396 from rodzyn/code-cleanup
Code cleanup
3cc7b0a
@vipulnsward vipulnsward - Extracted `DELIMITED_REGEX` to `delimited_regex` method and made us…
…e of user passed `options[:delimited_regex]` if available. Changed `DELIMITED_REGEX` to `DEFAULT)DELIMITED_REGEX` to signify what it means.

- Added tests for number to delimited and number to currency in both actionview and activesupport.

Changes

Changes
7f23c5d
@rafaelfranca rafaelfranca Merge pull request #17502 from vipulnsward/configurable-delimited-regex
Support for custom regular expression for number_to_delimeted
93a4dfa
@rousisk rousisk fix reference to undefined variable in email testing guide [ci skip] 7ddf72d
@senny senny Merge pull request #21417 from rousisk/docfix
fix reference to undefined variable in email testing guide [ci skip]
9e2b13c
@senny senny PostgreSQL, add `:if_exists` to `#drop_schema`. dd118dc
@senny senny pg docs, `connection.tables` does not use the `name` argument.
[ci skip]

Currently the `#tables` method does not make use of the `name`
argument and always returns all the tables in the schema search
path. However the docs suggest different behavior.

While we should porbably adjust the implementation to provide this
behavior, let's make the docs right for now (also for `4-2-stable`) and
then implement the behavior on `master`.
3c6bb89
@gaurish gaurish [Feature] params.require requires array of params
This PR adds ability to accept arrays which allows you to require multiple values in one method. so instead of this:

```ruby
params.require(:person).require(:first_name)
params.require(:person).require(:last_name)
```

Here it will be one line for each params, so say if I require 10params, it will be 10lines of repeated code which is not dry. So I have added new method which does this in one line:

```ruby
params.require(:person).require([:first_name, :last_name])
```

Comments welcome
877e42e
@kaspth kaspth Merge pull request #19565 from gaurish/multiple_require_params
[Feature] params.require accepts array of parameters that should be present or raise error
ca24ab8
@shivanibhanwal shivanibhanwal [ci skip] Better description for starting up with new Rails project
These changes rephrases the description with better explanation of step by step process.
ac1c888
@robin850 robin850 Tiny documentation improvements [ci skip] 7a27de2
@senny senny pg, `create_schema`, `drop_schema` and `rename_table` quote schema name.
Closes #21418.

Previously schema names were not quoted. This leads to issues when a
schema names contains a ".". Methods in `schema_statements.rb` should
quote user input.
35df925
@fxn fxn revises 877e42e
* A string in the example lacked quotes.

* The tests asserted stuff about :last_name, whereas
  test params do not have that key.

* But, the first one passed, why? After hitting my head against
  the wall and doing some obscure rituals realized the new
  #require had an important typo, wanted to iterate over the
  array argument (key), but it ran over its own hash keys
  (method #keys).

* Modified the test to prevent the same typo to happen again.

* The second test assigned to an unused variable safe_params
  that has been therefore removed.

* Grammar of the second test description.

* Since I was on it, reworded both test descriptions.
cbe7899
@akihiro17 akihiro17 Set the content-type to `text/html` if the options[:html] is true
In this commit, we set the content-type to `text/html` in AbstractController if the `options[:html]` is true so that we don't include ActionView::Rendering into ActionController::Metal to set it properly.

I removed the if `options[:plain]` statement because `AbstractController#rendered_format` returns `Mime::TEXT` by default.
2de60a9
@rafaelfranca rafaelfranca Merge pull request #21420 from akihiro17/rendering
Set the content-type to `text/html` if the options[:html] is true
d12daa4
@y-yagi y-yagi make `ENV` a required argument ab8338f
Commits on Aug 29, 2015
@carlosantoniodasilva carlosantoniodasilva Merge pull request #21423 from y-yagi/rails_test_opts
make `ENV` a required argument
6c3fd05