Commit Graph

59955 Commits

Author SHA1 Message Date
bogdanvlviv
5faa9a235c Add missing + around a some literals.
Mainly around `nil`

[ci skip]
2016-10-27 00:27:47 +03:00
Rafael Mendonça França
0b4679f192
Fix indentation 2016-10-25 03:16:51 -02:00
Rafael Mendonça França
1e7f6488f7
Generate HTML not plain text 2016-10-25 03:06:57 -02:00
Guillermo Iguaran
5f6f911e1f Merge pull request #26869 from prathamesh-sonpatki/fix-brittle-mysql-tests
Fix brittle tests which were relying on the error message text from mysql2 gem
2016-10-24 23:42:21 -05:00
Rafael França
e9e31af188 Merge pull request #26885 from lastgabs/fix-active-job-test
Uses queue adapter_method instead of ActiveJob::Base.queue_adapter
2016-10-25 01:07:45 -02:00
Gabi Stefanini
393f25bdba Uses queue adapter_method instead of ActiveJob::Base.queue_adapter
Change ActiveJob::Base.queue_adapter to use queue_adapter method to make test code consistent.
2016-10-24 22:25:48 -04:00
Rafael Mendonça França
d34a2747cb
Fix plain option in the rails_guides generator 2016-10-25 00:08:39 -02:00
Rafael França
3cc30db12c Merge pull request #26868 from prathamesh-sonpatki/use-hash-compact-from-ruby-24
Use Hash#compact and Hash#compact! from Ruby 2.4
2016-10-24 23:56:09 -02:00
Rafael França
aad14c9299 Merge pull request #26883 from y-yagi/remove_assets_config_if_skip_sprockets_is_true
remove assets config from `new_framework_defaults` if `--skip-sprockets` is true
2016-10-24 23:46:06 -02:00
Akira Matsuda
be623bf55f Missing require extract_options 2016-10-25 09:35:21 +09:00
yuuji.yaginuma
5b54a90410 remove assets config from new_framework_defaults if --skip-sprockets is true
If `sprockets` is not loaded, `Rails.application.config.assets` is not defined.
2016-10-25 07:58:05 +09:00
Rafael Mendonça França
d9bd2f5b8b
Copy-edits on #26880
* Put a blank line after :call-seq: otherwise it will think the whole test
is the call seq.
* Improve some text.
* Use some rdoc formatting.
* Restores the documentation of table_name_prefix.

[ci skip]
2016-10-24 18:04:54 -02:00
Rafael Mendonça França
7ae388fc89
Merge pull request #26880 from TempestMia/model_schema_doc_strings
Fix model schema doc strings
2016-10-24 17:49:03 -02:00
Mia Zbikowski
d60af5739c Fix model schema doc strings 2016-10-24 15:36:33 -04:00
Guillermo Iguaran
05447fe29c Merge pull request #26878 from Erol/fix-guide-typo
Fix typo in Upgrading Ruby on Rails Guide [ci skip]
2016-10-24 09:32:22 -05:00
Erol Fornoles
094638e544
Fix typo in Upgrading Ruby on Rails Guide [ci skip] 2016-10-24 22:28:40 +08:00
प्रथमेश Sonpatki
7f8bb09113 Merge pull request #26876 from y-yagi/update_description_of_etag
update description of Etag [ci skip]
2016-10-24 17:25:40 +05:30
yuuji.yaginuma
0f87413f41 update description of Etag [ci skip]
The document is written with "only generate weak", but it can also be used to
strong etag.
Also, add missing entory for #24387
2016-10-24 20:17:31 +09:00
Carlos Antonio da Silva
a0d0648efb Merge release note entry for Date/Time/DateTime extensions
The first release note entry mentioned #on_weekday?, but that was only
added by the second PR mentioned there. To simplify reading the notes
just merge the two, since they are related methods. [ci skip]
2016-10-23 16:51:51 -02:00
Jon Moss
14ba443132 Merge pull request #26871 from maclover7/jm-fix-26867
Small grammar fix for #26867
2016-10-23 12:23:37 -04:00
Jon Moss
65b1c991b1 Small grammar fix for #26867
[ci skip]
2016-10-23 12:21:35 -04:00
प्रथमेश Sonpatki
a3ce625c76 HSTS subdomains is now true, so let's fix documentation [ci skip] (#26870)
- Followup of fda5afeb
2016-10-23 21:27:59 +05:30
Prathamesh Sonpatki
c5a4d007b8
Fix brittle tests which were relying on the error message text from mysql2 gem
- These tests were fixed earlier on master in f13ec72664.
- They started failing in first place due to change in f14023fcfe.
- They will fail again when the message is changed in mysql2 so let's
  not rely on the error message.
2016-10-23 21:17:31 +05:30
Prathamesh Sonpatki
69a3fa1efc
Use Hash#compact and Hash#compact! from Ruby 2.4
- Ruby 2.4 has added Hash#compact and Hash#compact! so we can use it
  now.
- Reference: https://bugs.ruby-lang.org/issues/11818 and https://bugs.ruby-lang.org/issues/12863.
2016-10-23 20:54:39 +05:30
Vipul A M
0fdeb07636 Merge pull request #26867 from bogdanvlviv/opt_loc_docs
Add info about updating locking column value
2016-10-23 20:12:37 +05:30
bogdanvlviv
2bb74c9a82 Add info about updating locking column value
[ci skip]
Follow #26050
2016-10-23 17:37:43 +03:00
Sean Griffin
331d080a66 Revert "Made ActiveRecord consistently use ActiveRecord::Type (not"
This reverts commit 671eb742eec77b5c8281ac2a2e3976ef32a6e424.

This is not a change we would like moving forward.
2016-10-23 09:19:54 +03:00
Guillermo Iguaran
52852733d2 Update mysql2 version in Gemfile.lock 2016-10-22 20:09:02 -05:00
Guillermo Iguaran
f13ec72664 Update mysql adapter error message when disconnected 2016-10-22 20:07:06 -05:00
Rafael França
e9801ecfd9 Merge pull request #26863 from claudiob/revert-26826
Revert #26826 and add documentation
2016-10-22 20:08:26 -03:00
claudiob
fbda46758b Revert #26826 and add documentation
This reverts commit a01cf703 as explained in the comment to #26826:

Realized that this PR caused the following warning in Travis CI:

```
/home/travis/build/rails/rails/activesupport/lib/active_support/dependencies.rb:293: warning: loading in progress, circular require considered harmful - /home/travis/build/rails/rails/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb
```

Indeed, `active_support/core_ext/hash/indifferent_access.rb` **needs** to require `active_support/hash_with_indifferent_access.rb` in order to access the class `ActiveSupport::HashWithIndifferentAccess`.

The other way around, though, is not _strictly_ required, unless someone tries (like I did in the [gist above](https://gist.github.com/claudiob/43cc7fe77ff95951538af2825a71e5ec)) to use `ActiveSupport::HashWithIndifferentAccess` by only requiring `active_support/hash_with_indifferent_access.rb` without first requiring `active_support/core_ext/hash/indifferent_access.rb`.

I think the solution to this is to revert this PR and instead change the documentation to explicitly state that **developers should not require 'active_support/hash_with_indifferent_access'** if all they want is to use `ActiveSupport::HashWithIndifferentAccess` – instead they should require `active_support/core_ext/hash/indifferent_access.rb`.
2016-10-21 22:55:51 -07:00
Rafael França
8447f8d01c Merge pull request #26790 from iainbeeston/type-tests-in-their-own-files
Refactored ActiveModel::Type tests into their own files
2016-10-22 01:26:51 -03:00
Rafael Mendonça França
680e56deeb
Merge pull request #26810 from maclover7/jm-fix-26802
Convert ActionController::Parameters to a hash in button_to
2016-10-22 01:11:58 -03:00
Rafael França
8013ff682f Merge pull request #26416 from prathamesh-sonpatki/fix-select-example
Fix regression caused due to removal of select method from CollectionAssociation
2016-10-22 00:59:48 -03:00
Prathamesh Sonpatki
56bfaf7f03
Fix regression caused due to removal of select method from CollectionAssociation
- CollectionAssociation#select was removed in
  https://github.com/rails/rails/pull/25989 in favor of
  QueryMethods#select but it caused a regression when passing arguments
  to select and a block.
- This used to work earlier in Rails 4.2 and Rails 5. See gist
  https://gist.github.com/prathamesh-sonpatki/a7df922273473a77dfbc742a4be4b618.
- This commit restores the behavior of Rails 4.2 and Rails 5.0.0 to
  allow passing arguments and block at the same time but also deprecates
  it.
- Because, these arguments do not have any effect on the output of
  select when select is used with a block.
- Updated documentation to remove the example passing arguments and
  block at the same time to `CollectionProxy#select`.
2016-10-22 09:04:47 +05:30
Rafael França
7bbd3e68ed Merge pull request #26843 from denisovlev/strptime_timestamps
Fix `ActiveSupport::TimeZone#strptime` cannot parse timestamps (%Q, %s)
2016-10-22 00:12:47 -03:00
Claudio B
397025db76 Merge pull request #26826 from claudiob/add-require
Add missing require in active_support/hash_with_indifferent_access.rb
2016-10-21 18:08:34 -07:00
Guillermo Iguaran
f6df3d9a7a Merge pull request #26862 from headius/lazy_load_blade_for_tests
Lazy-load blade for actioncable tests; no blade on JRuby.
2016-10-21 17:41:55 -05:00
Charles Oliver Nutter
51de32b2ec Lazy-load blade for actioncable tests; no blade on JRuby. 2016-10-21 17:19:44 -05:00
Kasper Timm Hansen
5dce39e829 Merge pull request #26860 from headius/soft_ordering_in_yaml_dump
Soften this test since YAML.dump may produce keys in other orders.
2016-10-22 00:02:01 +02:00
Aaron Patterson
b6f935bbf9
Use on_load to trigger commandline processing code
We need to use on_load so that plugins will get the same functionality
2016-10-21 14:44:17 -07:00
Charles Oliver Nutter
fe09e7bd71 Soften this test since YAML.dump may produce keys in other orders. 2016-10-21 16:27:06 -05:00
Aaron Patterson
797f1dd63c
Prevent the test framework from being loaded in production mode
The test framework should not be autoloaded in production mode.  Before
this commit, the testing railtie would extend AS::TestCase.  This caused
AS::TestCase to be preloaded regardless of the environment in which we
were running.

This commit just moves the code that adds line filtering support in to
the test command where we actually execute the test runner.  That allows
us to maintain the line runner feature but only load the minimal amount
of code we need.
2016-10-21 13:10:26 -07:00
Aaron Patterson
54a5b99a00 Merge pull request #26859 from headius/mask_use_of_rubyvm_on_jruby
Skip test that depends on RubyVM when it is not available (JRuby).
2016-10-21 13:10:00 -07:00
Charles Oliver Nutter
9531e69f99 Skip test that depends on RubyVM when it is not available (JRuby). 2016-10-21 14:36:51 -05:00
Rafael Mendonça França
e16a5fb508
Revert "Undefine assings in IntegrationTest"
This reverts commit 5dde413e1d14c42eb87071db20d075a7b962cb01.

Reason: The gem defines it so we don't need to remove
2016-10-21 16:14:39 -03:00
Rafael França
2b584f165b Merge pull request #26819 from lastgabs/add-examples-active-job-test-helper
Add examples of queue_adapter and perform_enqueued jobs to API Docs.
2016-10-21 13:56:39 -03:00
Aaron Patterson
0aed0bbb29 Merge pull request #26050 from bogdanvlviv/optimistic_locking
Fixed: Optimistic locking does not work correctly
2016-10-21 09:08:38 -07:00
bogdanvlviv
a60a20bb7f Added ability update locking_column value 2016-10-21 19:06:02 +03:00
bogdanvlviv
22a822e581 Fixed: Optimistic locking does not work well with null in the database 2016-10-21 19:06:02 +03:00