Commit Graph

51451 Commits

Author SHA1 Message Date
Yves Senn
41e5e8982b better add_reference documentation. [ci skip]
This patch
  - reduces the duplication among the `reference`-family methods.
  - better explains all the optians available for `add_reference`.
  - redirects to user from `references` to `add_reference`.

Originated by #20184.
2015-05-18 11:19:36 +02:00
Yves Senn
37223afc76 Merge pull request #20182 from repinel/remove-assigns-from-api-doc1
[ci skip] remove `assigns` from the integration test example in API docs
2015-05-18 09:30:44 +02:00
Roque Pinel
bc1e80235b [ci skip] remove assigns from the integration test example in API docs
Based on #19976 and #18305.
2015-05-17 21:20:02 -04:00
Roque Pinel
b36f159adf Remove use of mocha in the railties path tests 2015-05-18 00:47:30 +00:00
Santiago Pastorino
1622298428 Merge pull request #20178 from vngrs/fix_wrong_default_value_of_javascript_engine
config.generators javascript_engine default value is :js not nil
2015-05-17 16:30:46 -03:00
Santiago Pastorino
d0abd56b1a Merge pull request #20179 from gouravtiwari/patch-5
formatting changes for mail options
2015-05-17 16:30:17 -03:00
Santiago Pastorino
8fba848757 Merge pull request #20180 from vngrs/add_missing_documentation_about_generators_resource_route
add missing documentation about generators resource_route [ci skip]
2015-05-17 16:29:25 -03:00
Mehmet Emin İNAÇ
8edbb2792b add missing documentation about generators resource_route [ci skip] 2015-05-17 21:10:40 +03:00
Gourav Tiwari
4547d87853 formatting changes [ci skip] 2015-05-17 10:41:27 -07:00
Mehmet Emin İNAÇ
6973368719 config.generators javascript_engine default value is :js not nil [ci skip] 2015-05-17 20:36:27 +03:00
Abdelkader Boudih
bdc1e9c28c Merge pull request #20176 from repinel/remove_test_unit_from_docs
[ci skip] remove unnecessary mention to Test::Unit from docs
2015-05-17 10:12:24 +01:00
Roque Pinel
bea8f7c057 [ci skip] remove unnecessary mention to Test::Unit from docs
Fix the guide to state that Rails uses Minitest as the default test
framework.

Remove unnecessary mention to Test::Unit from the API docs
('constantize' and 'safe_constantize').
2015-05-16 21:44:22 -04:00
Eugene Kenny
19bc570832 Add schema cache to new connection pool after fork
Active Record detects when the process has forked and automatically
creates a new connection pool to avoid sharing file descriptors.

If the existing connection pool had a schema cache associated with it,
the new pool should copy it to avoid unnecessarily querying the database
for its schema.

The code to detect that the process has forked is in ConnectionHandler,
but the existing test for it was in the ConnectionManagement test file.
I moved it to the right place while I was writing the new test for this
change.
2015-05-17 00:57:52 +01:00
Kasper Timm Hansen
50999974e8 Merge pull request #20173 from imtayadeway/tw/active-record-validations-docs
[ci skip] Improve grammar/syntax in AR validations docs.
2015-05-16 19:08:01 +02:00
Tim Wade
335137148a
[ci skip] Improve grammar/syntax in AR validations docs. 2015-05-16 09:06:34 -07:00
Arun Agrawal
796072b82e Merge pull request #20172 from prathamesh-sonpatki/changelog-pass
Pass over CHANGELOGS [ci skip]
2015-05-16 08:22:18 +02:00
Prathamesh Sonpatki
daba090dec Pass over CHANGELOGS [ci skip] 2015-05-16 11:00:17 +05:30
Matthew Draper
97c482ff8e Merge pull request #14938 from thedarkone/pool-lock-fix
Reducing AR::ConPool's critical (synchronized) section
2015-05-16 02:12:36 +09:30
Santiago Pastorino
a4dd94c61f Merge pull request #20159 from vngrs/remove_unnecessary_set_requires
Remove redundant require 'set' lines
2015-05-14 22:43:47 -03:00
Santiago Pastorino
1f06179db2 Merge pull request #20160 from ankit8898/security-guide
Dead blog/site links [ci skip]
2015-05-14 22:42:30 -03:00
Ankit Gupta
cc30f5f92a Dead blog/site links [ci skip] 2015-05-14 19:46:38 -04:00
Mehmet Emin İNAÇ
bd6c03332e Remove redundant require 'set' lines 2015-05-15 01:54:01 +03:00
Benjamin Klotz
d5847f4cc0 Clarify view tests [ci skip]
Mention that view tests are made in controller tests.
2015-05-14 18:05:21 +02:00
Carlos Antonio da Silva
22ae4493a3 Merge pull request #20155 from y-yagi/remove_warning_from_integer_ext_test
remove warning from integer ext test
2015-05-14 12:08:35 -03:00
yuuji.yaginuma
90f3c28820 remove warning from integer ext test
this removes the following warning:

```
test/core_ext/integer_ext_test.rb:34: warning: ambiguous first argument; put parentheses or a space even after `-' operator
test/core_ext/integer_ext_test.rb:38: warning: ambiguous first argument; put parentheses or a space even after `-' operator
```
2015-05-14 23:56:10 +09:00
Matthew Draper
864a41bc04 Merge pull request #20153 from nygrenh/remove-local_assigns-clutter
Do not put partial name to local_assigns when rendering without an object
2015-05-14 22:14:13 +09:30
Yves Senn
7f60bedd7a Merge pull request #20113 from claudiob/remove-rails31-refs
[ci skip] Remove comments about Rails 3.1
2015-05-14 10:03:34 +02:00
Henrik Nygren
bef9484cf8 Do not put partial name to local_assigns when rendering without an object
When one rendered a partial template without specifying an object
or a collection (e.g. <%= render partial: 'partial_name' %>), Rails
would make an object called :partial_name available in local_assigns.
I don't think this was the intended behavior, since no local variable
called 'partial_name' gets defined in the view.
2015-05-14 10:46:44 +03:00
Zachary Scott
987a45307f Merge pull request #20151 from imtayadeway/tw/active-record-migrations-docs
[ci skip] Improve phrasing in AR migrations docs.
2015-05-13 21:17:14 -07:00
Tim Wade
4cebcaeb2f
[ci skip] Improve phrasing in AR migrations docs.
* insert 'and' into a poorly formed sentence.
* avoid using 'reverse' twice in the same sentence (which would indicate
  the opposite of what is meant)
2015-05-13 21:05:48 -07:00
thedarkone
603fe20c0b AR::ConPool - remove synchronization around connection cache.
Renamed `@reserved_connections` -> `@thread_cached_conns`. New name
clearly conveys the purpose of the cache, which is to speed-up
`#connection` method.

The new `@thread_cached_conns` now also uses `Thread` objects as keys
(instead of previously `Thread.current.object_id`).

Since there is no longer any synchronization around
`@thread_cached_conns`, `disconnect!` and `clear_reloadable_connections!`
methods now pre-emptively obtain ownership (via `checkout`) of all
existing connections, before modifying internal data structures.

A private method `release` has been renamed `thread_conn_uncache` to
clear-up its purpose.

Fixed some brittle `thread.status == "sleep"` tests (threads can go
into sleep even without locks).
2015-05-14 03:14:53 +02:00
Claudio B.
bb9e8ca32f Merge pull request #20146 from karanarora/Doc-fixes
Rails documentation standard is american english.  [ci skip]
2015-05-13 17:55:09 -07:00
thedarkone
e92f5a99d6 AR::ConPool - establish connections outside of critical section. 2015-05-14 02:29:59 +02:00
thedarkone
a3923e667c AR::ConPool - reduce post checkout critical section.
Move post checkout connection verification out of mutex.synchronize.
2015-05-14 02:25:57 +02:00
Rafael Mendonça França
2c7c11d545 Merge pull request #20150 from karanarora/Typo-fix
remove redundant parenthesis
2015-05-13 20:57:14 -03:00
karanarora
1e34ed7d82 remove redundant parenthesis 2015-05-14 04:13:33 +05:30
Rafael Mendonça França
c1104a91f6 Merge pull request #20149 from karanarora/Typo-fix
remove redundant parenthesis.
2015-05-13 18:29:11 -03:00
karanarora
e6f0a5372e remove redundant parenthesis. 2015-05-14 02:52:49 +05:30
karanarora
54152303c6 Rails documentation standard is american english. [ci skip] 2015-05-14 01:33:43 +05:30
Mehmet Emin İNAÇ
ed83f90d61 Move Integer#positive? and Integer#negative? query methods to Numeric class
By this way Integer, Rational, Float, Fixnum, Bignum classes have the same behaviour
2015-05-13 21:03:51 +03:00
Rafael Mendonça França
94025927d7 Merge pull request #20142 from zoltankiss/comment_fix
Minor comment fix
2015-05-13 14:26:22 -03:00
Zoltan Kiss
81e644f26d Minor comment fix. [ci skip] 2015-05-13 12:22:53 -05:00
David Heinemeier Hansson
e54277a45d Add Integer#positive? and Integer#negative? query methods in the vein of Fixnum#zero? 2015-05-13 19:15:42 +02:00
Carlos Antonio da Silva
07ad2a945b Remove not used options argument from ActiveSupport::JSON.decode
In Rails 4.0, json decoding relied on MultiJson. This changed from 4.1
forward since it reached its end of life, and this extra argument was
kept for compatibility. We are safe to remove it now.
2015-05-13 10:59:01 -03:00
Sean Griffin
ec779ad501 Merge pull request #20121 from matthewrudy/remove-sanitize-hash
Remove call to sanitize_sql_hash_for_conditions
2015-05-13 06:21:36 -06:00
Yves Senn
f7881d3e2b invalid sti error message contains the full class name.
This can resolve confusing situation when a top level constant exists
but a namespaced version is identified.

Related to #19531.
2015-05-13 11:35:34 +02:00
Yves Senn
15354b6fd0 Merge branch 'sti-subclass-from-attributes' of https://github.com/agrobbin/rails into agrobbin-sti-subclass-from-attributes
Conflicts:
	activerecord/CHANGELOG.md
2015-05-13 11:08:10 +02:00
Yves Senn
6eaa5b17a0 Merge pull request #20136 from mcfiredrill/nodoc-postgresql-add-column
:nodoc: postgresql add_column
2015-05-13 09:02:48 +02:00
Tony Miller
52493037c3 :nodoc: postgresql add_column 2015-05-13 15:27:04 +09:00
Rafael Mendonça França
b0a19903ed Merge pull request #20126 from drcapulet/master
Add full set of MySQL CLI options to support SSL authentication when using db:structure dump and load
2015-05-13 00:06:36 -03:00