Commit Graph

47105 Commits

Author SHA1 Message Date
Matthew Draper
3f39ac4ee8 Merge pull request #16998 from yuki24/fix-false-assertion
Fix false assertions in AR::TestCase::AttributeMethodsTest
2014-09-22 05:44:27 +09:30
Yuki Nishijima
0756375fb4 Fix assertions in AR::TestCase::AttributeMethodsTest
This test has always been green because it uses "assert" and the first
argument is an truthy class/object.
2014-09-21 11:34:37 -07:00
Godfrey Chan
3e27a03fe4 Merge pull request #16984 from chancancode/fix_16578
Document that the default for `rails server -b` has changed
2014-09-22 01:08:19 +09:00
Godfrey Chan
5919cce0de Document that the default for rails server -b has changed
Fixes #16578
2014-09-22 01:04:42 +09:00
Yves Senn
fac25eb7b0 Merge pull request #16979 from square/standardize-call-style
Standardize on `Rails.application` [ci skip]
2014-09-21 11:45:54 +02:00
Zachary Scott
cdbb206186 Merge pull request #16994 from yuki24/fix-typo-in-ar-attribute-method-test
[ci skip] Fix typo in activerecord/test/cases/attribute_methods_test.rb:737
2014-09-21 12:51:57 +09:00
Yuki Nishijima
38d6697aff Fix typo [ci skip] 2014-09-20 20:45:35 -07:00
Zachary Scott
5f8c1b197d Merge pull request #16988 from y-yagi/chg_default_log_level
[ci skip] modify the description of production log level default
2014-09-21 12:43:31 +09:00
yuuji.yaginuma
4f5d60f4f2 [ci skip] modify the description of production log level default 2014-09-21 07:41:32 +09:00
Yves Senn
b537f14f3d Merge pull request #16987 from jonatack/patch-8
ActiveRecord CHANGELOG improvements [skip ci]
2014-09-20 18:46:44 +02:00
Jon Atack
1415fdd5a3 ActiveRecord CHANGELOG improvements [skip ci] 2014-09-20 15:21:23 +02:00
Godfrey Chan
1a2e3a0431 No need to call to_sym here
The hash is now string-keyed, and [_]reflect_on_association calls `to_s` on the
argument anyway.
2014-09-20 18:05:01 +09:00
Godfrey Chan
90f9968912 Fix find_by with associations not working with adequate record
For now, we will just skip the cache when a non-column key is used in the hash.
If the future, we can probably move some of the logic in PredicateBuilder.expand
up the chain to make caching possible for association queries.

Closes #16903
Fixes #16884
2014-09-20 17:53:49 +09:00
Godfrey Chan
793e4aa9b6 Quick fix to address the borken build caused by #15791
This is pretty lame though, so feel free to send a PR with a better fix! ;)

cc @zev @tenderlove
2014-09-20 16:55:49 +09:00
Aaron Patterson
808070b065 Merge pull request #15791 from zev/add_model_to_recordnotfound_message
Update RecordNotFound exception cases to include a message with the
2014-09-19 23:15:44 -07:00
Rafael Mendonça França
d68c6426f8 Merge pull request #16981 from gsamokovarov/concern-docs-comment-reword
[ci skip] Reword a comment in concern's documentation
2014-09-19 18:38:08 -03:00
Genadi Samokovarov
f37ad33108 [ci skip] Reword a comment in concern's documentation
Nothing biggie. Skimmed through `ActiveSupport::Concern` docs these days
and this one comment seemed a bit off.
2014-09-19 23:30:59 +02:00
Tamir Duberstein
994d3ebe9b Standardize on Rails.application [ci skip]
This seems to be the style settled on in most of the templates.
2014-09-19 10:42:58 -07:00
Rafael Mendonça França
620f4a4fc9 Merge pull request #16973 from prathamesh-sonpatki/fixtures-features
Updated comment about features of fixtures
2014-09-19 11:10:49 -03:00
Abdelkader Boudih
88c72373ba Merge pull request #16975 from lethalbrains/master
[ci skip] ActionRecord CHANGELOG docs fixes
2014-09-19 13:54:53 +01:00
Matthew Draper
8b39dfd60f Merge pull request #16964 from Agis-/issue-16956
Make delegation work with the reserved words passed to `:to`
2014-09-19 21:26:32 +09:30
lethalbrains
48ee6b8708 [ci skip] ActionRecord CHANGELOG docs fixes 2014-09-19 17:17:50 +05:30
Prathamesh Sonpatki
c8450d82dc Updated comment about features of fixtures
- Added a note about some features which are not dependent on
   auto-generated ID's.
 - [ci skip]
2014-09-19 17:49:42 +09:00
Agis-
1a787ebb7e Delegation works with reserved words passed to :to
Fixes #16956.
2014-09-19 11:41:41 +03:00
Rafael Mendonça França
c2dfc31691 Merge pull request #16936 from untidy-hair/plugin_test_db_migrate_path
Specify dummy app's db migrate path in plugin's test_helper.rb

Conflicts:
	railties/CHANGELOG.md
2014-09-18 18:39:44 -03:00
Xavier Noria
112077c255 inject Rack::Lock if config.eager_load is false
If code is not eager loaded constants are loaded on demand. Constant
autoloading is not thread-safe, so if eager loading is not enabled
multi-threading should not be allowed.

This showed up in certain Capybara scenarios: Most Capybara drivers
other than Rack::Test need a web server. In particular, drivers for
JavaScript support. Capybara launches WEBrick in its own thread for
those but that per se is fine, because the spec thread and the server
thread are coordinated.

Problem comes if the page being served in the spec makes Ajax calls.
Those may hit WEBrick in parallel, and since WEBrick is multi-threaded
and allow_concurrency? returns true in the test environment before
this patch, threads are spawned to serve those parallel requests. On
the other hand, since eager_load is false by default in the test
environment, constants are not preloaded.

So the suite is autoloading constants in a multi-threaded set. That's
a receipt for paracetamol. The symptom is random obscure errors whose
messages point somehow to constant autoloading.

As a consequence of this fix for allow_concurrency? WEBrick in
Capybara scenarios no longer runs in multi-threaded mode.

Fixes #15089.
2014-09-18 23:04:08 +02:00
Rafael Mendonça França
25f5af7f3f Merge pull request #16954 from geoffharcourt/inject-over-sum
Use #inject over #sum to build PG create DB statement
2014-09-18 15:29:26 -03:00
Geoff Harcourt
707958b52e Use #inject over #sum to build PG create DB statement
While investigating #16951 I found that another library's monkey-patching of
`Enumerable` was causing the test migrations helper to break when trying to
build the `CREATE DATABASE` statement. The prior approach used `#sum` to build
the string from the options hash.

As the code that combines the options to build the database statement is not
user-facing, using `#inject` here instead will remove the only place where the
database creation/migration code is dependent on ActiveSupport's monkey-patching
of `Enumerable`.
2014-09-17 18:58:59 -04:00
Abdelkader Boudih
44033d8f42 Merge pull request #16953 from akshay-vishnoi/docs-rails-4point2
[ci skip] ActionView and ActionMailerCHANGELOG docs fixes
2014-09-17 23:14:43 +01:00
Akshay Vishnoi
8841f45129 [ci skip] ActionView and ActionMailer CHANGELOG docs fixes 2014-09-18 03:40:51 +05:30
Rafael Mendonça França
ddf0c0a197 Merge pull request #16952 from akshay-vishnoi/docs-rails-4point2
[ci skip] ActiveModel CHANGELOG docs fixes
2014-09-17 18:34:17 -03:00
Akshay Vishnoi
57a893b54a [ci skip] ActiveModel CHANGELOG docs fixes 2014-09-18 02:57:13 +05:30
Abdelkader Boudih
46d168e957 Merge pull request #16950 from akshay-vishnoi/docs-rails-4point2
Grammar correction in ActiveSupport CHANGELOG [ci skip]
2014-09-17 21:59:46 +01:00
Akshay Vishnoi
f92ac245bd Grammar correction in ActiveSupport CHANGELOG [ci skip] 2014-09-18 02:27:18 +05:30
Rafael Mendonça França
026289e28e Merge pull request #16948 from akshay-vishnoi/docs-rails-4point2
[ci skip] ActiveSupport CHANGELOG fixes
2014-09-17 17:28:50 -03:00
Akshay Vishnoi
7a8fb281d8 [ci skip] ActiveSupport CHANGELOG fixes
1. spacing issues
2. spelling correction
3. grammar correction
4. Add missing docs
2014-09-18 01:55:29 +05:30
Abdelkader Boudih
402ac43bb5 Merge pull request #16930 from todd/upgrade_guide
Added Responders docs, made Web Console docs more consistent. [ci skip]
2014-09-17 21:03:51 +01:00
Rafael Mendonça França
1bf1386a2b Merge pull request #16944 from akshay-vishnoi/docs-rails-4point2
[ci skip] AJ docs fixes
2014-09-17 16:58:57 -03:00
Akshay Vishnoi
9fddcdd99e [ci skip] AJ docs fixes
1. Indentation
2. Spaces issues
3. Spelling correction
4. Grammar correction
5. Add #:nodoc: to all internal classes
2014-09-18 01:16:53 +05:30
Rafael Mendonça França
168c0c171e Use has_attribute? 2014-09-17 16:26:49 -03:00
Rafael Mendonça França
afa4780572 Merge pull request #16875 from alan/dont_autosave_has_one_through_record
Don't autosave unchanged has_one through records

Conflicts:
	activerecord/CHANGELOG.md
2014-09-17 16:26:35 -03:00
Rafael Mendonça França
3fd016b2dc Merge pull request #16943 from sgrif/sg-fix-tz-converter-serialization
Allow YAML serialization when using TZ aware attributes
2014-09-17 16:20:03 -03:00
Rafael Mendonça França
acda46d081 Merge pull request #11794 from yoazt/duration-eql
Added method `#eql?` to `ActiveSupport::Duration`, in addition to `#==`.

Conflicts:
	activesupport/CHANGELOG.md
	activesupport/lib/active_support/duration.rb
	activesupport/test/core_ext/duration_test.rb
2014-09-17 16:15:25 -03:00
Rafael Mendonça França
84087966e8 Merge pull request #16929 from kongregate/fix-activerecord-deprecated_finders-find-symbol
ActiveRecord deprecated finders are broken in 4.2
2014-09-17 16:02:55 -03:00
Sean Griffin
fab487228c Allow YAML serialization when using TZ aware attributes 2014-09-17 12:37:00 -06:00
Rafael Mendonça França
8c6c1dd82e OMG mysql! 2014-09-17 15:21:47 -03:00
Rafael Mendonça França
3d4046fff4 ruby-head should be green
Ruby 2.2 is near to be released so we should support it properly
2014-09-17 15:00:49 -03:00
Yves Senn
38b5e191f6 do not dump foreign keys for ignored tables. 2014-09-17 11:43:42 +02:00
Yves Senn
6d8221323f unify wording in Active Record CHANGELOG. [ci skip] 2014-09-17 11:25:30 +02:00
Yves Senn
c1ab07cd91 pg, correctly dump foreign keys targeting tables in a different schema.
Closes #16907.

[Matthew Draper & Yves Senn]
2014-09-17 11:13:10 +02:00