Skip to content
This repository
  • 10,000 commits
  • 3,127 files changed
  • 9 comments
  • 49 contributors
This comparison is big! We're only showing the most recent 250 commits
Jun 26, 2014
Rafael Mendonça França rafaelfranca Merge pull request #15924 from sgrif/sg-write-unknown-column
Move writing unknown column exception to null attribute
f437f11
Godfrey Chan chancancode :nodoc: our SecureRandom patches [ci skip]
These methods shouldn't be added to `SecureRandom`, as they are neither secure nor random. The more appropriate place for this seems to be `Digest`, so we should move them there. (Pull request welcomed!)

Marking this `:nodoc:` for now, so we don't accidentally ship it as public API.

See https://github.com/rails/rails/pull/15306/files#r13055862 for details.
5add8b8
Yves Senn senny fk: `add_foreign_key` and `remove_foreign_key` for PostgreSQL adapter. e2ef257
Yves Senn senny fk: add `foreign_keys` for PostgreSQL adapter. 09b3a28
Yves Senn senny fk: `foreign_keys`, `add_foreign_key` and `remove_foreign_key` for MySQL 74b2fe4
Yves Senn senny fk: generalize using `AlterTable` and `SchemaCreation`. 1c170fd
Yves Senn senny fk: `:primary_key` option for non-standard pk's. a48b675
Yves Senn senny fk: dump foreign keys to schema.rb
respect `table_name_prefix` and `table_name_suffix`.
69c711f
Yves Senn senny fk: support dependent option (:delete, :nullify and :restrict). 402f303
Yves Senn senny fk: make `add_foreign_key` reversible. 6073d7c
Yves Senn senny fk: infere column name from table names.
This allows to create and remove foreign keys without specifying a column.
d074b82
Yves Senn senny fk: rename `dependent` to `on_delete` 6955d86
Yves Senn senny fk: support for on_update acd0287
Yves Senn senny fk: raise when identifiers are longer than `allowed_index_name_length`. 9ae1a2c
Yves Senn senny fk: dump foreign keys at the bottom to make sure tables exist. 0938d53
Yves Senn senny fk: `add/remove_foreign_key` are noop for adapters that don't support fk 31e4c19
Yves Senn senny fk: raise for invalid :on_update / :on_delete values 8550ba3
Yves Senn senny fk: use random digest names
The name of the foreign key is not relevant from a users perspective.
Using random names resolves the urge to rename the foreign key when the
respective table or column is renamed.
8768305
Yves Senn senny fk: review corrections: indent, visibility, syntax, wording. 24e1aef
Yves Senn senny fk: add docs a5b3f37
Rafael Mendonça França rafaelfranca Merge pull request #15606 from senny/ar/foreign_key_support
Basic support for adding and removing foreign keys
ea93a15
Rafael Mendonça França rafaelfranca Add nodoc to internal class [ci skip] c153503
Rafael Mendonça França rafaelfranca Change method visibility 600aaf4
Rafael Mendonça França rafaelfranca Merge pull request #14247 from robin850/inflections-with-uncountables
Make the apply_inflections method case-sensitive
d04763f
Rafael Chacon rafael Add always_permitted_parameters as an option.
* This commit adds back the always_permitted_parameters
  configuration option to strong paramaters.
* The initial pull requests where this feature was added
  are the following:
  - #12682
  - rails/strong_parameters#174
c197a7d
Jun 27, 2014
Robin Dupret robin850 Tiny follow-up to 1a69112
Wrap list items to 80 chars and avoid relying on NOTE inside an item
since they are meant to be parsed in paragraphs, not lists.

[ci skip]
7a07b22
Yves Senn senny credit Matthew Higgins for the integration of foreign keys. [ci skip] 2053e1f
Viktar Basharymau DNNX Simplify complex code in databases.rake 8d541fc
Viktar Basharymau DNNX db:fixtures:{identify,load} tasks respect AR::Tasks::DatabaseTasks.root
Before this commit, if `ENV['FIXTURES_PATH']` was set, then `Rails.root`
was used, otherwise the app used `ActiveRecord::Tasks::DatabaseTasks.root`.

Now it is consistent.
13ff102
Viktar Basharymau DNNX Get rid of duplication in db:fixtures:{identify,load} 0526fad
Viktar Basharymau DNNX Replace a bit of cryptic code in fixtures:load rake task with plain s…
…tupid Ruby
41fb066
Viktar Basharymau DNNX Extract `fixture_files` variable in fixtures:load rake task 5a4df80
Viktar Basharymau DNNX db:fixtures:load refactoring: remove unnecessary loop
`ActiveRecord::FixtureSet.create_fixtures` can accept an array of
fixture_files.
d20b869
Viktar Basharymau DNNX Replace String index juggling with Pathname goodness in db:fixtures:load 482fdad
Viktar Basharymau DNNX Add explaining variables to db:migrate:status 5dbf37d
Viktar Basharymau DNNX Use Array#flat_map and Array#grep in db:migrate:status task
It allows the code to be more declarative and elegant.
c4918ee
Viktar Basharymau DNNX db:migrate:status refactoring: Rewrite hand-crafted SQL query with Ac…
…tiveRecord#pluck
e75bdcb
Robin Dupret robin850 Follow-up to #15215 [ci skip] 11ac0ca
Viktar Basharymau DNNX Add a test for db:migrate:status to check missing file scenario 0813607
Viktar Basharymau DNNX Extract AR::SchemaMigration.normalized_versions method 68b7e7a
Viktar Basharymau DNNX Use AR::SchemaMigration.table_exists? call instead of longish AR::Bas…
…e...etc,etc
3852f2d
Sean Griffin & Sean Doyle Stop using instance exec for type decorators
We are moving this behavior out to an object that we would like to keep
separated from `ActiveRecord::Base`, which means not passing the class
object to it. As such, we need to stop using `instance_exec`, and
instead close over the subclass on global type decorators that are
applied in `Base`.
ccc1d3d
Rafael Mendonça França rafaelfranca Merge pull request #15938 from sgrif/sg-stop-instance-execing
Stop using instance exec for type decorators
644719b
Rafael Mendonça França rafaelfranca Merge pull request #15940 from DNNX/databases-rake-refactoring
databases.rake refactoring
35a9f7a
Rafael Mendonça França rafaelfranca Merge pull request #8639 from bogdan/valid-with-bang
Add AR::Base#valid! method
a87573d
Rafael Mendonça França rafaelfranca Merge pull request #15788 from sgrif/sg-mutable-strings
Detect in-place modifications on Strings
eb6e3e3
Rafael Mendonça França rafaelfranca Merge pull request #12450 from iantropov/master
Fix bug, when ':dependent => :destroy' violates foreign key constraints

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/associations/builder/association.rb
	activerecord/lib/active_record/associations/builder/has_one.rb
b22edc6
Rafael Mendonça França rafaelfranca Talk about config.assts.version move too
Closes #15942
30b5608
Sean Griffin sgrif Note that `_will_change!` is no longer needed for AR instances
Leave the note for `ActiveModel`, since it can't yet detect mutations
(hopefully we can change this in time for 4.2). However, we now detect
mutations on all supported types in `ActiveRecord`, so we can note that
`_will_change!` is no longer needed there.
e04c4c0
Sean Griffin sgrif We are talking about the libraries, not the constants 36a3897
Rafael Mendonça França rafaelfranca MySQL doesn't works with foreign key e84799d
Abdelkader Boudih seuros rename sequence only if it exists b58ec66
Rafael Mendonça França rafaelfranca Improve tests to use add_foreign_key DSL 9d21ef9
Rafael Chacon rafael Improvements per code review.
* General style fixes.
* Add changes to configuration guide.
* Add missing tests.
58399e1
jamesprior jamesprior Update documentation for run_callbacks
In some cases run_callbacks will return nil.  I'm attempting to update the documentation for the method to clarify.
c97b18a
Rafael Mendonça França rafaelfranca Do not change the global state of the test suite 3f596f8
Rafael Mendonça França rafaelfranca Merge pull request #15946 from jamesprior/patch-1
Update documentation for run_callbacks
67d7dfd
Peter Wagenet wagenet Always instrument ActiveSupport::Cache
The current approach is broken because it uses a thread local value
which means on multi-threaded environments it has to be turned on
per thread. Secondly, ActiveSupport::Notifications does not
instrument items when there are not subscribers so this flag is
unnecessary.
acee114
Rafael Mendonça França rafaelfranca Merge pull request #15933 from rafael/master
Add always permitted parameters as a configurable option.

[Rafael Mendonça França + Gary S. Weaver]
ebdedae
Rafael Mendonça França rafaelfranca Merge pull request #15943 from wagenet/cache-instrumentation
Always instrument ActiveSupport::Cache
3c19402
Rafael Mendonça França rafaelfranca Merge pull request #15934 from seuros/rename
rename primary key sequence only if it exists
0aeb490
Philippe Creux pcreux Fix test with add_foreign_key DSL in 9d21ef9 0418633
Godfrey Chan chancancode Merge pull request #15949 from pcreux/fix-add-foreign-key-in-test
Fix test with `add_foreign_key` DSL
6a1af00
Philippe Creux pcreux MySQL doesn't work with foreign keys
This was previously fixed in e84799d but broken in 3f596f8. This commit
reintroduced the conditional that prevents the foreign keys from being
added to MySQL databases.
e31104c
Godfrey Chan chancancode Merge pull request #15951 from pcreux/fix-mysql-test-fk
MySQL doesn't work with foreign keys
e6ca8e2
Jun 28, 2014
Rory O’Kane roryokane Add missing period in Getting Started guide
Within section 5.10 Adding Some Validation
25a4995
Juanito Fatas JuanitoFatas Update the levenshtein distance method in guides. d740b58
Sean Griffin sgrif Merge pull request #15954 from roryokane/getting-started-guide-add-pe…
…riod

Add missing period in Getting Started guide
dcacaf2
Guillermo Iguaran guilleiguaran Merge pull request #15955 from JuanitoFatas/levenshtein-guide
Update the levenshtein distance method in guides.
cad584e
Abdelkader Boudih seuros [Postgresql tests] remove duplicate helper 35591d3
Vijay Dev vijaydev Merge branch 'master' of github.com:rails/docrails 1377058
Yves Senn senny Merge pull request #15957 from seuros/duplicate
[Postgresql tests] remove duplicate helper
b44174f
Max Kramer mckramer Rename options param of #time_ago_in_words to match API change
Rename `include_seconds_or_options` to `options` to match 6b9356a (which removed the deprecation introduced by #6077).  This has no functional impact because the parameter is passed directly through, but makes it clearer that the parameter no longer supports a boolean as input.
4e1dc11
Sean Griffin sgrif Always pass a column with a type object to quote
The only case where we got a column that was not `nil`, but did not
respond to `cast_type` was when type casting the default value during
schema creation. We can look up the cast type, and add that object to
the column definition. Will allow us to consistently rely on the type
objects for type casting in all directions.
b404613
Rory O’Kane roryokane Add punctuation and fix capitalization in Getting Started guide
Fix more small grammar mistakes in the [Getting Started guide](http://edgeguides.rubyonrails.org/getting_started.html#security), in sections 9 and 10.

Specifically, within sections 9.1 “Basic Authentication”, 9.2 “Other Security Considerations”, and 10 “What's Next?”.

“Rails Guides” is generally capitalized on the site, including on the linked page and in the title of the site, so I capitalized it.

“The” is not part of the name of the Ruby on Rails Security Guide – “The” is not in the title on that page.

And I added a missing period and a missing colon at the ends of two sentences.
13ee4e1
Sean Griffin sgrif Merge pull request #15964 from JuanitoFatas/doc/patch-01
[ci skip] Fix router option reference in 4.2 release notes.
539ff7d
Sean Griffin sgrif Merge pull request #15963 from roryokane/getting-started-guide-fix-gr…
…ammar

Add punctuation and fix capitalization in Getting Started guide
b4b6248
Jun 29, 2014
Juanito Fatas JuanitoFatas [ci skip] Fix router option reference in 4.2 release notes. 1c4f775
Rafael Mendonça França rafaelfranca Merge pull request #15962 from sgrif/sg-types-for-defaults
Always pass a column with a cast_type to quote
85cfc10
Rafael Mendonça França rafaelfranca Merge pull request #15961 from mckramer/patch-1
Rename options param of #time_ago_in_words to match API change
60e1aea
Robin Dupret robin850 Quick pass through Active Support and guides CHANGELOG
[ci skip]
d93ae4f
Robin Dupret robin850 Tiny documentation fixes [ci skip] 9ca0f8d
Sean Griffin sgrif Don't encourage usage of `columns_hash`
As discussed in plataformatec/simple_form#1094,
we should not encourage usage of `columns_hash`, and instead provide an
alternate method to determine whether or not an attribute exists.

The language `attribute` was chosen over `column` since these are in the
`AttributeMethods` module.
7a3d76b
Sean Griffin sgrif Use the type object for sending JSON to the database fb8ac4f
Sean Griffin sgrif Add `Hash#map_values` to ActiveSupport
Didn't get a chance to convert existing code, I'll skim through the code
base to make use of this later this afternoon.
b2cf8b2
Guillermo Iguaran guilleiguaran Merge pull request #15819 from sgrif/sg-hash-map-values
Add `Hash#map_values` to ActiveSupport to simplify a common pattern
f123da5
Sean Griffin sgrif Simplify creation of default attributes on AR instance
`AttributeSet#dup` has all the behavior we need.
9e368a5
Godfrey Chan chancancode Merge pull request #15979 from sgrif/sg-json-quoting
Use the type object for sending JSON to the database
a607fd2
Sean Griffin sgrif Use `Hash#transform_values` to clean up `AttributeSet` 972d9be
Godfrey Chan chancancode Merge pull request #15982 from sgrif/sg-attr-set-map-values
Use `Hash#transform_values` to clean up `AttributeSet`
d9827ca
Sean Griffin sgrif Use the type object when sending point columns to the DB 314d557
Godfrey Chan chancancode Merge pull request #15976 from sgrif/sg-attribute-exists
Don't encourage usage of `columns_hash`
374958b
Godfrey Chan chancancode Merge pull request #15983 from sgrif/sg-inline-point
Use the type object when sending point columns to the DB
7a52d6b
Sean Griffin sgrif Remove array workaround in PG quoting
We no longer need to do fancy legwork to make sure arrays use a type
object, now that schema methods use a real type object.
228aa4f
Sean Griffin sgrif Remove unused `array_member` from PG quoting for HStore columns
Hstore no longer needs additional quoting to be used in an array, the
array type handles it sufficiently.
167201b
Godfrey Chan chancancode Merge pull request #15978 from sgrif/sg-pg-array-member
Remove unused `array_member` from PG quoting for HStore columns
e4ad47f
Godfrey Chan chancancode Merge pull request #15977 from sgrif/sg-remove-array-hack
Remove array workaround in PG quoting
74cec95
Rafael Mendonça França rafaelfranca Merge pull request #15981 from sgrif/sg-simplify-defaults
Simplify creation of default attributes on AR instance
1f190b7
Jun 30, 2014
jamesprior jamesprior Update documentation on STI change handling
Documenting a potential source of confusion about how STI classes handle changes.
9ca98b5
Sean Griffin sgrif Merge pull request #15987 from jamesprior/patch-2
Update documentation on STI change handling
3b9d2b8
Sean Griffin sgrif Move STI docs off of the main Base document, leaving a note 088b4c3
Nick Pellant nickpellant Fix 10.3 invite_email.body assert_match example.
Currently there is no implicit conversion for Mail::Body to string
therefore .to_s must be applied. This is exampled in 10.2.2.
a3a73d1
Rafael Mendonça França rafaelfranca Merge pull request #15989 from nickpellant/master
Fix 10.3 invite_email.body assert_match documentation example.
58a5c84
Sean Griffin sgrif Don't add a second method for attribute existence
We already had one in the public API that people can use more easily for
the transition
b90c85d
Rafael Mendonça França rafaelfranca Merge pull request #15991 from sgrif/sg-has-attribute
Don't add a second method for attribute existence
66d6c87
Rafael Mendonça França rafaelfranca Merge pull request #14861 from igor04/dirty-rollback
Added rollback method to ActiveModel::Dirty
bada1d3
Rafael Mendonça França rafaelfranca Add CHANGELOG entry for #14861 and document private methods on the API b34f7c1
Rafael Mendonça França rafaelfranca Rename rollback_changes to undo_changes
To avoid overload with database rollback
dc67d3d
Todd Bealmear todd Add String support for min/max attributes on DatetimeField ac44345
Rafael Mendonça França rafaelfranca Merge pull request #15214 from todd/date_field_docs
Added String support for min and max properties for date field helpers
f39595a
Rafael Mendonça França rafaelfranca Use if/else
Since we are using both branches of the code is preferable to use
if/else over the early return.
2546610
Rafael Mendonça França rafaelfranca Add CHANGELOG entry for #15214
Closes #15214
41a7c44
Aaron Patterson tenderlove push host / port / protocol extraction up
Then we only need to extract host once.
da57d0b
Jul 01, 2014
Leonard Garvey lengarvey Add configuration to enable mail previews
Adds `config.action_mailer.preview_enabled`

This allows mail previewing to be enabled easily in non-development
environments such as staging. The default is set to true for development
so no changes should be required to existing Rails applications.

The mail preview path can still be configured using the existing
`config.action_mailer.preview_path` configuration option.

Adding this avoids devs from having to do stuff like:
https://gist.github.com/lengarvey/fa2c9bd6cdbeba96526a

Update actionmailer/CHANGELOG with new configuration.
Update configuring guide with new configuratation.
Add `config.action_mailer.preview_path` to configuring guide.
84ed7b8
Ciro Santilli cirosantilli Fix doc unwanted dl Admin:: [ci skip] fbb0447
Eileen M. Uchitelle eileencodes Merge pull request #15997 from cirosantilli/typo
Fix doc unwanted dl Admin:: [ci skip]
898bc73
Sean Griffin sgrif Silence warning emitted in tests
The instance method `model_name` was being defined multiple times,
causing a redefinition warning.
fa03fa7
Sean Griffin sgrif Use a type object for type casting behavior on SQLite3
Note: I'm not sure we actually need to be logging when this happens.
This code would be a fair bit cleaner if we didn't need to log it.
0ada76c
Juanito Fatas JuanitoFatas [ci skip] Add missing prologue section of upgrading ruby on rails guide. e9700d6
Rafael Mendonça França rafaelfranca Merge pull request #16004 from JuanitoFatas/doc/patch-1
[ci skip] Add missing prologue section of upgrading ruby on rails guide.
d15d1a0
Rafael Mendonça França rafaelfranca Merge pull request #15970 from lengarvey/add_configuration_option_for…
…_mail_preview

Add configuration to enable mail previews
4d3eb70
Rafael Mendonça França rafaelfranca Rename preview_enabled option to show_previews 72f58b0
Rafael Mendonça França rafaelfranca Merge pull request #16006 from ShunsukeAida/xml_http_request_comment_…
…change

[ci skip] Fixed the documentation of xml_http_request? (aka xhr?)
7bd6206
Nishant Modak nishantmodak flash doesn't pass objects #15522 [ci skip] 59ad995
Eileen M. Uchitelle eileencodes Add regression tests for keys on nested associations
This adds the regressions tests from issue #15893 to
master. It's checking that both strings and symbols are
accepted as keys for nested associations.
bc7030c
Rafael Mendonça França rafaelfranca Merge pull request #15999 from eileencodes/add-regression-tests-for-k…
…eys-on-nested-associations

Add regression tests for keys on nested associations
ad778bc
Xinjiang Lu xjlu Improve token_and_options regex and test
add a test case to test the regex for the helper method raw_params
b39a344
Aaron Patterson tenderlove do not hold on to a stale connection object. fixes #15998 9d599ab
Jul 02, 2014
Matthew Draper matthewd Merge pull request #16000 from sgrif/sg-silence-warning
Silence warning emitted in tests
5de61cc
ShunsukeAida makes it sound less misleading cac2451
Robin Dupret robin850 Tiny follow-up to #15987 and 088b4c3 [ci skip] 4cb4e87
Rafael Mendonça França rafaelfranca Revert "Merge pull request #15394 from morgoth/fix-automatic-maintain…
…ing-test-schema-for-sql-format"

This reverts commit 46139d3, reversing
changes made to 8f24787.

Conflicts:
	activerecord/CHANGELOG.md
5c87b5c
Sean Griffin sgrif Move pk initialization logic onto `AttributeSet`
Better encapsulates its internals from `ActiveRecord::Base`.
b79593f
Sean Griffin sgrif Don't error when `dup`ing a record with no PK b6e15f9
Rafael Mendonça França rafaelfranca Merge pull request #16007 from nishantmodak/flash_msg_as_string
flash doesn't pass objects #15522 [ci skip]
b1e4c59
Rafael Mendonça França rafaelfranca Merge pull request #16016 from sgrif/sg-dup
Don't error when `dup`ing a record with no PK
7442f5a
Rafael Mendonça França rafaelfranca Fix typo f838caf
mmitchellg5 [ci skip] Changes some wording to better foreshadow what is coming up…
… later.

This should prevent some anxiety readers may experience when the doc goes into something different than what it just explained. Also clarifies a statement about priority in engines and application environments

[ci skip] fixes double `the`

[ci skip] more clarifications

[ci skip] changes from tics to quotes
266e8db
Rafael Mendonça França rafaelfranca Fix SQL injection when querying against ranges and bitstrings
Fix CVE-2014-3483 and protect against CVE-2014-3482.
7df68a3
Sean Griffin sgrif Quote range strings when quoting PG ranges
The test case for CVE-2014-3483 doesn't actually send the generated SQL
to the database. The generated SQL is actually invalid for real inputs.
664feb2
Rafael Mendonça França rafaelfranca Merge pull request #16022 from sgrif/sg-range-quoting
Quote range strings when quoting PG ranges
c8f0176
Rafael Mendonça França rafaelfranca Merge pull request #16015 from sgrif/sg-ensure-initialized
Move pk initialization logic onto `AttributeSet`

Conflicts:
	activerecord/lib/active_record/attribute_set.rb
f625b68
Rafael Mendonça França rafaelfranca Merge pull request #16024 from aditya-kapoor/include-validations
automatically include ActiveModel::Validations when include ActiveModel::SecurePassword
a410427
John Paul Ashenfelter johnpaulashenfelter `DateTime#to_f` now preserves fractional seconds.
Previously this method always returns `.0` in the fractional part. This commit
changes it to preserve the fractional seconds instead.

Fixes #15994.
d75992b
Godfrey Chan chancancode Merge pull request #16001 from johnpaulashenfelter/jp_fix_datetime_to_f
`DateTime#to_f` now preserves fractional seconds.
6ee1796
Godfrey Chan chancancode Only automatically include validations when enabled
This is a follow up to #16024.
9eb15ed
John F. Douthat johndouthat Fix escape_once double-escaping hex-encoded entities
(This is a manual merge of #9102)
41de23e
Godfrey Chan chancancode The hex escape sequence can be of any length 268a29d
Godfrey Chan chancancode Add CHANGELOG for c803b90 f2fc314
Lucas Mazza lucasmazza Change the JSON renderer to enforce the 'JS' Content Type
The controller can set the response format as 'JSON' before the renderer code be
evaluated, so we must replace it when necessary.

Fixes #15081
b00b638
Guo Xiang Tan tgxworld Remove symbolized_path_parameters.
This pull request is a continuation of 925bd97 and 8d8ebe3.
cb5f2d3
Rafael Mendonça França rafaelfranca Merge pull request #16026 from lucasmazza/lm-respond-to-jsonp-fix
Change the JSON renderer to enforce the 'JS' Content Type
beab403
Cade Truitt cade Add `:all` argument to `count` in `reset_counters`
Prior to this fix, if an association had a scope with a `select`,
calls to `reset_counters` would generate invalid SQL and throw:

ActiveRecord::StatementInvalid: [$DB_ADAPTER]: wrong number of
arguments to function COUNT()

References #10710, #13648
c8e48f0
Cade Truitt cade Fix typo in comment 3c917dd
Jul 03, 2014
Aditya Kapoor aditya-kapoor automatically include ActiveModel::Validations when include ActiveMod…
…el::SecurePassword
7b1a42c
Vijay Dev vijaydev Merge pull request #16029 from cade/fix_typo_in_comment
Fix typo in comment
590091b
Vijay Dev vijaydev Merge pull request #15941 from variousred/docrails-changes
[ci skip] Changes some wording to better foreshadow what is coming up later
03c9c0e
Sean Griffin sgrif Use the type object for type casting HStore columns e2763b4
Sean Griffin sgrif Do not rely on the column type when quoting infinity 81b7187
Rafael Mendonça França rafaelfranca Merge pull request #16034 from sgrif/sg-hstore-type-object
Use the type object for type casting HStore columns
be543ef
Rafael Mendonça França rafaelfranca Merge pull request #16036 from sgrif/sg-datetime-infinity
Do not rely on the column type when quoting infinity
0691810
Rafael Mendonça França rafaelfranca Merge pull request #16038 from tbpgr/fix_guide_active_record_validations
Fix guide. sample code syntax error.[ci skip]
d4422c3
Sean Griffin sgrif Remove unneccessary special case for money in quoting efc436d
Abdelkader Boudih seuros Add arel to the controller template f367f2e
Godfrey Chan chancancode :fire: these are lambdas now [ci skip]
This has changed since around 2b1500d
cce376c
John Bachir jjb link directory to ActionMailer Previews documentation 0c5efb4
Michael Grosser grosser remove bundler magic 8572fcd
Jul 04, 2014
tbpgr tbpgr Fix guide. sample code syntax error.[ci skip] d262347
Akshay Vishnoi akshay-vishnoi [ci skip] /javascript/ -> JavaScript - cover whole app 3ac3760
Arun Agrawal arunagw Display notice in index.html pages in scaffolded generated views
As we are setting notice in destroy action we should display that

For more information see #14044
And rails/jbuilder#191

closes #14044
e197fd7
Rafael Mendonça França rafaelfranca Merge pull request #16048 from arunagw/aa-added-notice-index-page
Display notice in index.html pages in scaffolded generated views
a8e1538
Dmitry Polushkin dmitry add test coverage for the action mailer 99f8d4f
Rafael Mendonça França rafaelfranca Merge pull request #16037 from sgrif/sg-money-quoting
Remove unneccessary special case for money in quoting
295f2bd
Rafael Mendonça França rafaelfranca Merge pull request #16046 from grosser/grosser/cleangen
Do not load rails without loading bundler
871af91
Rafael Mendonça França rafaelfranca Merge pull request #14005 from dmitry/test_coverage_for_actionmailer
Add test coverage for the action mailer
23e35f1
Rafael Mendonça França rafaelfranca Merge pull request #16011 from xjlu/token_and_options
Improve token_and_options regex and test
2fd8dd7
Rafael Mendonça França rafaelfranca Merge pull request #16028 from cade/fix_counter_cache_count_with_asso…
…ciation_selects

Add `:all` argument to `count` in `reset_counters`

Conflicts:
	activerecord/CHANGELOG.md
6636df3
Rafael Mendonça França rafaelfranca Merge pull request #16013 from tgxworld/remove_symbolized_path_parame…
…ters

Remove symbolized_path_parameters.
540a0ba
Rafael Mendonça França rafaelfranca Fix typo d02794e
Sean Griffin sgrif Add a `required` option to singular associations
In addition to defining the association, a `required` association will
also have its presence validated.

Before:

```ruby
belongs_to :account
validates_presence_of :account
```

After:

```ruby
belongs_to :account, required: true
```

This helps to draw a distinction between types of validations, since
validations on associations are generally for data integrity purposes,
and aren't usually set through form inputs.
00f5551
David Heinemeier Hansson dhh Merge pull request #16056 from sgrif/sg-required-associations
Add a `required` option to singular associations
3ac8118
Sean Griffin sgrif CHANGELOG and release notes entry for #16056 0c4f3af
Sean Griffin sgrif Add release notes entry for #15819 [ci skip] 082d1e3
Jul 05, 2014
Matthew Draper matthewd After find-via-reload, the record is not new de03c29
Matthew Draper matthewd Merge pull request #16049 from matthewd/find-via-reload
After find-via-reload, the record is not new
9cf9944
Matthew Draper matthewd Merge pull request #16042 from akshay-vishnoi/doc_change
[ci skip] /javascript/ -> JavaScript - cover whole app
bcd1b9c
Matthew Draper matthewd Merge pull request #16040 from seuros/patch-1
Add arel to the controller template [ci skip]
42de620
Matthew Draper matthewd Merge pull request #16003 from sgrif/sg-refactor-sqlite3-strings
Use a type object for type casting behavior on SQLite3
c59c091
Matthew Draper matthewd Don't fail if unicode.org isn't talking to us 3f2ec19
Matthew Draper matthewd Revert "Use a type object for type casting behavior on SQLite3" 2ad1dd2
Matthew Draper matthewd Merge pull request #16054 from rails/revert-16003-sg-refactor-sqlite3…
…-strings

Revert "Use a type object for type casting behavior on SQLite3"
a6cc7b0
Sean Griffin sgrif Use the type object for quoting PG Ranges 02579b5
Sean Griffin sgrif `Time.today` -> `Date.today` in guides. [ci skip]
Removed mentions of non-existent methods, also added a mention for
`Date.current`, which is analagous to `Time.current`. Closes #16061.
8856ab0
Sean Griffin sgrif Remove *all* references to `Time.yesterday` [ci skip] 0994851
Sean Griffin sgrif Only reference time specific methods in the time section [ci skip] 64e3d1d
Aditya Kapoor aditya-kapoor [ci skip] add guide for ActiveModel::Naming 8c8e5be
Rafael Mendonça França rafaelfranca Merge pull request #16035 from sgrif/sg-range-types
Use the type object for quoting PG Ranges
5780b96
Godfrey Chan chancancode Re-enable foriegn key tests on MySQL
This reverts commit e84799d, e31104c and e6ca8e2
6787507
Godfrey Chan chancancode Fix mysql/mysql2 failing with FK constraint errors
One of the author fixture we have ("david") references an author address by ID.
Since we disable FK checks when inserting fixtures, this is all fine until we
try to update it, at which point MySQL would complain about the missing row
referenced by the `author_address_id`.

[Godfrey Chan, Matthew Draper]
c031016
Godfrey Chan chancancode Merge pull request #16059 from jenncoop/json-serialized-attr
Fixed issue with ActiveRecord serialize object as JSON

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/attribute_methods/serialization.rb
a030977
Godfrey Chan chancancode Revert "Merge pull request #16059 from jenncoop/json-serialized-attr"
This reverts commit a030977.

This needs more work before it would work correctly on master.
6f3c64e
Zachary Scott zzak Merge pull request #16068 from JuanitoFatas/4-2-changelogs
[ci skip] Concludes changelog links in the bottom.
6055202
Zachary Scott zzak Merge pull request #16044 from jjb/patch-1
[ci skip] link directly to ActionMailer Previews documentation
93e24de
Jul 06, 2014
Matthew Draper matthewd If our connection is explicitly non-strict, tell MySQL
We default to making the connection strict, but have historically relied
on the MySQL default when we want it to be non-strict. On some (recent?)
versions of MySQL, new connections default to being strict, so if we've
been told 'strict:false', we're obliged to pass that on.

This fixes a test failure that we've seen turn up on relatively-new
development machines, so we do already have a test covering it.
a4c2624
Matthew Draper matthewd Merge pull request #16065 from matthewd/mysql-explicit-non-strict
If our connection is explicitly non-strict, tell MySQL
acec038
Juanito Fatas JuanitoFatas [ci skip] Concludes changelog links in the bottom.
This way when we do next release notes, this would be easier to copy and change.
c275b2e
Dylan Thacker-Smith dylanahsmith active_record: Type cast booleans and durations for string columns. 42be84b
Matthew Draper matthewd Merge pull request #16069 from dylanahsmith/mysql-quote-bool
active_record: Type cast booleans and durations for string columns.
b974033
Seb Jacobs sebjacobs Generate shallow paths for all children of shallow resources.
Prior to this commit shallow resources would only generate paths for
non-direct children (with a nested depth greater than 1).

Take the following routes file.

    resources :blogs do
      resources :posts, shallow: true do
        resources :comments do
          resources :tags
        end
      end
    end

This would generate shallow paths for `tags` nested under `posts`,
e.g `/posts/:id/tags/`, however it would not generate shallow paths
for `comments` nested under `posts`, e.g `/posts/:id/comments/new`.

This commit changes the behaviour of the route mapper so that it
generate paths for direct children of shallow resources, for example
if you take the previous routes file, this will now generate
shallow paths for `comments` nested under `posts`, .e.g
`posts/:id/comments/new`.

This was the behaviour in Rails `4.0.4` however this was broken in
@jcoglan's fix for another routes related issue[1].

This also fixes an issue[2] reported by @smdern.

[1] d0e5963
[2] #15783
e972d34
Akshay Vishnoi akshay-vishnoi [ci skip] /sqlite/i --> SQLite ddad329
Robin Dupret robin850 Merge pull request #15958 from aditya-kapoor/active-model-naming-guide
[ci skip] add guide for ActiveModel::Naming
faf7e39
Zachary Scott zzak Merge pull request #16057 from akshay-vishnoi/doc_change
[ci skip] /sqlite/i --> SQLite
2cda0af
Zachary Scott zzak Change back occurrences of SQLite(3) to sqlite3 when referring to the
adapter, fixed from #16057 [ci skip]
2f71669
Sean Griffin sgrif Remove PG's definition of `type_cast`
All cases except for `nil` in an array have been removed. `nil` in an
array is handled by the Array type object.
57beeba
Sean Griffin sgrif Don't rely on the sql type to quote XML columns in PG f6968bd
Sean Griffin sgrif Remove the `text?` predicate from the type objects
This was only used for uniqueness validations. The first usage was in
conjunction with `limit`. Types which cast to string, but are not
considered text cannot have a limit. The second case was only with an
explicit `:case_sensitive => true` option given by the user.
3559230
Sean Griffin sgrif Merge pull request #16075 from nickpellant/master
Fix ActiveSupport::Callbacks #set_callback docs.
0e7744e
Jul 07, 2014
Nick Pellant nickpellant Fix ActiveSupport::Callbacks #set_callback docs.
A minor version breakage due to a rewrite of the callbacks code now
requires an explicit block to be passed to #set_callback. This amends
the documentation.
b64d887
Guo Xiang Tan tgxworld Avoid retrieving connection in ActiveRecord::QueryCache multiple times. a93c384
Nick Pellant nickpellant Add callbacks documentation for upgrading to 4.1.
It is now expected in 4.1 to use an explicit block rather than implicit
when setting callbacks through ActiveSupport::Callbacks. This commit
highlights this new expectation as part of the upgrading documentation.
489e531
Robin Dupret robin850 Update Rails versions [ci skip]
As discussed in #15304, we need to automate this process but for now,
having out-of-date versions is not ideal.

Since master targets 4.2.0, let's also update references to the last 4.1
version to 4.2.0.

Finally, let's remove mentions to versions when this is not needed. The
guides cover the features of the current version anyway.

[Juanito Fatas + Robin Dupret]
c2d96d1
Nick Pellant nickpellant [ci skip] Improve callback code example for 4.1 upgrade docs.
The previous code example for the new explicit block requirement when
setting callbacks was a little confusing. This commit makes the example
more obvious.
9c3cb75
Eileen M. Uchitelle eileencodes Merge pull request #16086 from nickpellant/master
Add callbacks documentation for upgrading to 4.1.
1869788
Rafael Mendonça França rafaelfranca Merge pull request #16074 from sgrif/sg-remove-text-predicate
Remove the `text?` predicate from the type objects
0920671
Rafael Mendonça França rafaelfranca Merge pull request #16078 from tgxworld/retreive_connection_once
Avoid retrieving connection in ActiveRecord::QueryCache multiple times.
bfcdc40
Aaron Patterson tenderlove always test against a routed rack app so there are always url_helpers 09eeb3f
Aaron Patterson tenderlove remove the mounted_helpers respond_to check
It always responds to mounted_helpers now
1e7f28c
Aaron Patterson tenderlove test i18n against a routed app e0c6b35
Jul 08, 2014
Guo Xiang Tan tgxworld Reduce number of subscriptions created. b925074
Rafael Mendonça França rafaelfranca Merge pull request #16072 from sgrif/sg-xml-quoting
Don't rely on the sql type to quote XML columns in PG
336be2b
Rafael Mendonça França rafaelfranca Merge pull request #16071 from sgrif/sg-pg-type-cast
Remove PG's definition of `type_cast`
0792d3e
Zuhao Wan zuhao Warm up cache to prevent assertion failure. 9ccf4d1
Rafael Mendonça França rafaelfranca Merge pull request #16093 from zuhao/refactor_activerecord_nested_thr…
…ough_associations_test

Warm up cache to prevent assertion failure.
84b9cc0
Rafael Mendonça França rafaelfranca Merge pull request #16094 from zuhao/refactor_activerecord_belongs_to…
…_associations_test

Include fixtures to prevent foreign key violation.
6f8cc2e
Eileen M. Uchitelle eileencodes [ci skip] Add changelog for PR #14899
The changelog entry for #14899 was missing.
5a8aa8f
Rafael Mendonça França rafaelfranca Merge pull request #16095 from eileencodes/update-changelog-for-pr-14899
Add changelog for PR #14899
3116dac
Aaron Patterson tenderlove Merge pull request #13999 from jamox/update_rack
This updates rails to use edge rack
97d62a3
Zachary Scott zzak Merge pull request #16097 from nishantmodak/correct_md
correct markdown usage [ci skip]
7a3192e
Jul 09, 2014
Zuhao Wan zuhao Include fixtures to prevent foreign key violation. a843d54
Nishant Modak nishantmodak correct markdown usage [ci skip] da5ac71
Guo Xiang Tan tgxworld Fix weird comment. [CI SKIP] eeed9d5
Juanito Fatas JuanitoFatas [ci skip] Fix 4.2 release notes rendered display. 904aede
Zachary Scott zzak Merge pull request #16100 from tgxworld/fix_comment
Use proper possessive punctuation [ci skip]
ccc21d0
Zachary Scott zzak Merge pull request #16102 from JuanitoFatas/format-fixes
[ci skip] Fix 4.2 release notes rendered display.
a6affcc
Juanito Fatas JuanitoFatas [ci skip] Fix 4.2 release notes list items. [Matthew Draper & Juanito…
… Fatas]
9ffeb0f
Matthew Draper matthewd Merge pull request #16103 from JuanitoFatas/doc/patch-001
[ci skip] Fix 4.2 release notes list items. [Matthew Draper & Juanito Fatas]
4c34ad3
Eugene Gilburg egilburg [ci skip] Document millisecond precision change in ActiveSupport::Tim…
…eWithZone#as_json
d703fe5
Carlos Antonio da Silva carlosantoniodasilva Include missing module in tag_helper
Since 6857415 we are using #safe_join to
join the content when an Array is given, so we must include the dependent
module here to make sure it's available when this module is used alone.

This was making Simple Form tests to fail with current master due to the
missing dependency.
05fde24
Santiago Pastorino spastorino Merge pull request #16091 from tgxworld/reduce_creation_of_subscribers
Reduce number of subscriptions created.
cb37745
Zachary Scott zzak Merge pull request #16113 from egilburg/rails_4_1_upgrade_guide_json_…
…time_with_zone_precision

[ci skip] Document millisecond precision change in ActiveSupport::TimeWithZone#as_json
f149e71