Commit Graph

50478 Commits

Author SHA1 Message Date
Rafael Mendonça França
5cfa6a8ab9 Merge pull request #19500 from ccutrer/dry_sti_subclass_finding
DRY up STI subclass logic
2015-03-24 13:42:00 -03:00
Cody Cutrer
7be08818a9 DRY up STI subclass logic
the newer method used for discriminating new records did not
use the older and more robust method used for instantiating
existing records, but did have a better post-check to ensure
the sublass was in the hierarchy. so move the descendants check
to find_sti_class, and then simply call find_sti_class from
subclass_from_attributes
2015-03-24 09:22:46 -06:00
Carlos Antonio da Silva
bfd5bf8313 Merge pull request #19452 from pinglamb/fix-referencing-wrong-alias-when-joining-tables-of-has-many-through-association
Fix referencing wrong aliases while joining tables of has many through association
2015-03-24 08:00:59 -03:00
Yves Senn
6a02efcfe5 Merge pull request #19493 from larskanis/add_infinity_test
PostgreSQL, Add test case for "Infinity" string assignment to float columns
2015-03-24 10:13:43 +01:00
Yves Senn
41e6302cce Merge pull request #19488 from yui-knk/fix/comment2
[ci skip] Remove unacceptable method name
2015-03-24 08:56:01 +01:00
Yves Senn
ef2bff0284 Merge pull request #19491 from tgxworld/fix_incorrect_description
Fix incorrect description for `assert_nothing_raised`. [ci skip]
2015-03-24 08:52:38 +01:00
Guo Xiang Tan
ea5e3192d5 Fix incorrect description for assert_nothing_raised. 2015-03-24 15:32:13 +08:00
yui-knk
dbc7acd8ef [ci skip] Remove unacceptable method name 2015-03-24 13:23:12 +09:00
Rafael Mendonça França
639159cebe Merge pull request #19485 from tgxworld/small_doc_fix
Small doc fix. [CI SKIP]
2015-03-24 00:15:30 -03:00
Guo Xiang Tan
874616a905 Small doc fix. [CI SKIP] 2015-03-24 11:11:35 +08:00
Arthur Nogueira Neves
2f14153a53 Merge pull request #19481 from davidcornu/activesupport/normalize-to-sentence
Make sure Array#to_sentence always returns a String
2015-03-23 20:07:42 -04:00
Rafael Mendonça França
503d9e1288 Merge pull request #19482 from mperham/master
Pass wrapped class name to Sidekiq for logging purposes
2015-03-23 20:04:08 -03:00
Mike Perham
8d2b1406bc Pass wrapped class name to Sidekiq for logging purposes
Sidekiq logs the name of the job class being performed.  Because
ActiveJob wraps the class, this means every job logs as an AJ::JobWrapper
instead of the actual class name.

Will help fix mperham/sidekiq#2248
2015-03-23 15:16:07 -07:00
David Cornu
a64f3e4195 Make sure Array#to_sentence always returns a String 2015-03-23 15:47:37 -04:00
Rafael Mendonça França
4a0f314d8a Merge pull request #19475 from tgxworld/no_one_has_to_suck_anymore
Remove alias for `i_suck_and_my_tests_are_order_dependent`.
2015-03-23 13:35:12 -03:00
Guo Xiang Tan
5a973b314b Remove alias for i_suck_and_my_tests_are_order_dependent. 2015-03-24 00:27:53 +08:00
Andrew White
550c1f0950 Fix failing tests for #19474 2015-03-23 13:15:59 +00:00
Ryan Tomayko
0b81b3094a Fix ActionDispatch::PublicExceptions returning string rack status
The status returned in the rack [status, headers, body] array was
a string, which can cause problems with middleware that assumes the
status will be a Fixnum. This likely never surfaced because other
middleware to_i the status returned from downstream apps before
passing it on.
2015-03-23 13:15:59 +00:00
Yves Senn
f768cb07e6 Merge pull request #19473 from nerdinand/duration-to_i-documentation
Add documentation for Duration#to_i for clarification
2015-03-23 13:39:28 +01:00
nerdinand
38c833cadd Add documentation for Duration#to_i for clarification 2015-03-23 13:29:44 +01:00
Yves Senn
ec9c8a33b2 Merge pull request #19471 from nerdinand/remove-activesupport-integer-example-doc
Remove reference to Numeric#from_now, as it is no longer supported [ci skip]
2015-03-23 11:10:11 +01:00
nerdinand
bbdd20cfeb Remove reference to Numeric#from_now, as it is no longer supported 2015-03-23 11:08:02 +01:00
Rafael Mendonça França
ca5a35da37 Merge pull request #19449 from Gaurav2728/gaurav-unavailable_link
remove old unavailable link with relevant fix patch 1
2015-03-23 03:08:41 -03:00
Rafael Mendonça França
ab9a893842 Merge pull request #19469 from Gaurav2728/gaurav-mysql_missing_links
update mysql link that has been replaced
2015-03-23 03:08:23 -03:00
Gaurav Sharma
3f0de070a8 update mysql link that has been replaced 2015-03-23 11:32:56 +05:30
Gaurav Sharma
29efc6ee05 remove old unavailable link with relevant fix 2015-03-23 11:18:14 +05:30
Matthew Draper
5d6500535c Provide a more truthful #inspect
This is obviously all very internal, but sometimes you have to look at
it... and when you do, it'll save a lot of confusion if it doesn't lie
about its identity.
2015-03-23 15:29:23 +10:30
Matthew Draper
8b96c0b7a3 Make sure to persist a newly-nil serialized value
The subtype will (quite reasonably) ignore the possibility that it has
`changed_in_place?` by becoming nil.

Fixes #19467
2015-03-23 15:27:03 +10:30
Carlos Antonio da Silva
0347280035 Simplify setting button form options
No need to merge hashes when simply setting options does the job.
2015-03-22 20:27:01 -03:00
Carlos Antonio da Silva
a3f030686b Fix arguments order on assertion
The expected value comes first. Related to #19465.
2015-03-22 20:25:27 -03:00
Rafael Mendonça França
70844212fd Merge pull request #19465 from radanskoric/fix-errors-delete
Fix ActiveModel::Errors#delete return value to stay backward compatible
2015-03-22 19:27:30 -03:00
Radan Skoric
26b35a4096 Fix ActiveModel::Errors#delete return value to stay backward compatible
Rails 5.0 changes to ActiveModel::Errors include addition of `details`
that also accidentally changed the return value of `delete`. Since
there was no test for that behavior it went unnoticed. This commit
adds a test and fixes the regression.

Small improvements to comments have also been made. Since `get` is
getting deprecated it is better to use `[]` in other methods' code
examples. Also, in the module usage example, `def Person.method`
was replaced with a more commonly used `def self.method` code style.
2015-03-22 23:18:22 +01:00
Carlos Antonio da Silva
b7b70c8deb Merge pull request #19455 from jonatack/patch-1
[ci skip] Consistent spacing inside hash brackets in Action View guide.
2015-03-22 19:14:09 -03:00
Carlos Antonio da Silva
8a45e18f11 Move #19447 changelog to the top and reword it a bit [ci skip] 2015-03-22 19:11:06 -03:00
Rafael Mendonça França
4ba9c55fcd Merge pull request #19434 from kirs/deprecate-alias-method-chain
Deprecate alias_method_chain in favour of Module#prepend
2015-03-22 18:29:11 -03:00
Kir Shatrov
a982a42d76 Deprecate alias_method_chain in favour of Module#prepend
…as discussed #19413
2015-03-22 23:11:19 +02:00
Lars Kanis
8faff684ca PostgreSQL, Add test case for "Infinity" string assignment to float columns.
This is implemented in Type::Float, but not tested, so far.
2015-03-22 21:26:50 +01:00
Rafael Mendonça França
6a8d3e6ba0 Merge pull request #19461 from mechanicles/change-a-to-an
Change 'a' to 'an' for 'HABTM' word [ci skip]
2015-03-22 16:20:43 -03:00
Santosh Wadghule
47a07560a1 Change 'a' to 'an' for 'HABTM' word [ci skip] 2015-03-23 00:46:09 +05:30
Arthur Nogueira Neves
d85c52d203 Merge pull request #19460 from yui-knk/feature/add_link
[ci skip] Add link for "parameter_names section"
2015-03-22 12:10:27 -04:00
yui-knk
133317593e [ci skip] Add link for "parameter_names section" 2015-03-23 00:43:04 +09:00
Jon Atack
46ea75e105 [ci skip] Consistent spacing inside hash brackets 2015-03-22 16:45:36 +05:30
Abdelkader Boudih
055ef4b623 Merge pull request #19454 from yui-knk/fix/guide_migrations
[ci skip] Change `the null` to `a not null constraint`
2015-03-22 10:28:23 +00:00
yui-knk
4f578ec36a [ci skip] Change the null to a not null constraint 2015-03-22 19:18:00 +09:00
pinglamb
ba057a5ebb Fix referencing wrong aliases while joining tables of has many through
association

While joining table of has_many :through association, ActiveRecord will
use the actual table name instead of through-join alias. It results with
a wrong SQL and exception is raised. This only happens when calculation
methods like #count is called.

This issue is affecting Rails 4.1.x and 4.2.x as well.
2015-03-22 16:25:23 +08:00
Arun Agrawal
fdf5561965 Merge pull request #19451 from prathamesh-sonpatki/fix-typo-railties-changelog
Fix typo in belongs_to_required_by_default config's CHANGELOG entry [ci...
2015-03-22 07:30:10 +01:00
Prathamesh Sonpatki
d16fa517e1 Fix typo in belongs_to_required_by_default config's CHANGELOG entry [ci skip] 2015-03-22 11:48:18 +05:30
Matthew Draper
0aefa97689 Merge pull request #19442 from joevandyk/patch-1
Fix documentation for find_or_create_by
2015-03-22 13:33:54 +10:30
Sean Griffin
2271f7db17 Merge pull request #19447 from wallerjake/postgresql_big_int_array_schema_rb
Check subtype limit before using the default limit
2015-03-21 18:47:08 -06:00
wallerjake
9bc4eb7ee1 Delegate limit to subtype
As described here https://github.com/rails/rails/issues/19420. When
using the Postgres BigInt[] field type the big int value was not being
translated into schema.rb. This caused the field to become just a
regular integer field when building off of schema.rb. This fix will
address this by delegating the limit from the subtype to the Array type.

https://github.com/rails/rails/issues/19420
2015-03-21 19:32:41 -05:00