Commit Graph

13761 Commits

Author SHA1 Message Date
Waynn Lue
f25997a9d9 "maybe" => "may be" 2015-05-21 20:11:41 -07:00
Manish shrivastava
6252d0aece updated Inline format at activerecord rdoc
For Inline formats, changed ` (single backticks)   to <tt> tag at active record rdoc as single backticks (`) don't work with rdoc. for inline format.
2015-05-20 19:15:33 +05:30
Santiago Pastorino
0f9ab4f348 Merge pull request #20219 from karanarora/Typo-fix
typo fix [ci skip]
2015-05-20 07:48:26 -03:00
karanarora
ec8b7a543e typo fix [ci skip] 2015-05-20 15:21:00 +05:30
Arun Agrawal
e00d63e2c6 Merge pull request #20217 from amitsuroliya/fix_netaddr_link
Fix NetAddr link [ci skip]
2015-05-20 10:34:05 +02:00
amitkumarsuroliya
ac20dd73ac Fix NetAddr link [ci skip] 2015-05-20 14:01:00 +05:30
Ronak Jangir
76fbfe9e6c Updated postgresql documentation link to use latest version [ci skip] 2015-05-20 14:00:31 +05:30
Aaron Patterson
0e12300c5e parent_reflection should store only a reflection object
we should ask the reflection for its name rather than storing the
reflection name in two places (an array and a reflection object)
2015-05-19 16:11:53 -04:00
Ryuta Kamizono
0cd355b8a8 Remove unused already require 2015-05-19 12:53:09 -07:00
Ryuta Kamizono
94736d7487 Remove require 'arel/visitors/bind_visitor'
This line introduced by the commit fd398475 for using
`Arel::Visitors::BindVisitor`. Currently it is not used.
2015-05-19 12:14:41 -07:00
Rafael Mendonça França
4b560bf96b Merge pull request #20212 from kamipo/avoid_heredoc
Avoid the heredoc in one line queries and simple queries
2015-05-19 16:06:46 -03:00
Ryuta Kamizono
653eb853b8 Avoid the heredoc in one line queries and simple queries
Related with #20028.
2015-05-19 12:01:41 -07:00
Ryuta Kamizono
f9e27bc582 Eliminate the duplication code of StatementPool 2015-05-19 11:17:19 -07:00
Rafael Mendonça França
303dca482e Merge pull request #20175 from eugeneius/copy_schema_cache_after_fork
Add schema cache to new connection pool after fork
2015-05-18 20:10:43 -03:00
Rafael Mendonça França
9c4487517c Merge pull request #20187 from yui-knk/refactor/type_int
Refactoring `ActiveRecord::Type::Integer` limit
2015-05-18 17:02:55 -03:00
Rafael Mendonça França
3442ba4849 Merge pull request #20192 from kamipo/divide_to_column_options_handling_methods
Divide methods for handling column options separately
2015-05-18 16:07:34 -03:00
Rafael Mendonça França
fc628f7ad8 Merge pull request #20190 from kamipo/fix_serial_with_quoted_sequence_name
Fix `serial?` with quoted sequence name
2015-05-18 15:57:28 -03:00
Ryuta Kamizono
320788097d Divide methods for handling column options separately 2015-05-18 11:02:00 -07:00
Eileen M. Uchitelle
0cae22d2ec Merge pull request #20082 from sh6khan/nested-attributes-docs
docs for updating nested attributes while creating parent record
2015-05-18 13:37:25 -04:00
Ryuta Kamizono
684caf5503 Fix serial? with quoted sequence name 2015-05-18 10:32:52 -07:00
sh6khan
319baed48e docs for updating nested attributes while creating parent record [ci
skip]
2015-05-18 11:24:12 -04:00
yui-knk
8a89a23896 Refactoring ActiveRecord::Type::Integer limit 2015-05-18 21:29:22 +09:00
Matthew Draper
fcae2014ec sqlite3_mem has an existing connection
We must account for receiving one less call to #new_connection, but the
test otherwise remains valid.
2015-05-18 21:30:42 +09:30
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
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
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
Mehmet Emin İNAÇ
bd6c03332e Remove redundant require 'set' lines 2015-05-15 01:54:01 +03:00
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
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
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
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
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
Alex Coomans
01f7d14494 Add full set of MySQL CLI options to support SSL authentication when using db:structure dump and load 2015-05-12 17:06:49 -07:00
Rafael Mendonça França
f91cbb068f Merge pull request #20131 from vngrs/missing_doc_about_assign_attribute
Add more detailed comment about _assign_attribute method [ci skip]
2015-05-12 20:28:00 -03:00
Mehmet Emin İNAÇ
803294034c Add more detailed comment about _assign_attribute method [ci skip]
fix minor problems
2015-05-13 02:22:31 +03:00
Mehmet Emin İNAÇ
d88f6e79cc Refactor abstract_mysql_adapter type_to_sql method 2015-05-13 01:35:24 +03:00
claudiob
0080a886b2 [ci skip] Don’t encourage sudo gem install
I think we are better off leaving `sudo` outside of the documented
way of installing gems (`activerecord`, `actionpack`, …).

We don’t want newbies to think that `sudo` is required or, even worse, than
they actually have to type `[sudo] gem install`.

In most scenarios, `sudo` is not needed to install gems, and people who do
need it, probably already know about it.

What do you think? 😁
2015-05-12 14:51:19 -07:00
Matthew Rudy Jacobs
ddbf097cae remove documentation for sanitize_sql_for_conditions with a Hash 2015-05-12 19:33:06 +08:00
Matthew Rudy Jacobs
4bd089f1d9 Remove call to sanitize_sql_hash_for_conditions
This method has already been removed.
2015-05-12 18:01:37 +08:00
claudiob
271a5521e2 [ci skip] Remove comments about Rails 3.1
Stems from https://github.com/rails/rails/pull/20105#issuecomment-100900939
where @senny said:

> From my point of view, all the docs (guides, API) are version bound.
> They should describe that version and continue to be available when newer versions are released.
> The cross referencing can be done by the interested user.
2015-05-11 16:06:09 -07:00
claudiob
625404762a [ci skip] Fix comment, since Rails 3.1 is out 2015-05-11 06:38:27 -07:00
Alex Robbin
cbd66b430b allow setting of a demodulized class name when using STI
If your STI class looks like this:

```ruby
class Company < ActiveRecord::Base
  self.store_full_sti_class = false

  class GoodCo < Company
  end

  class BadCo < Company
  end
end
```

The expectation (which is valid) is that the `type` in the database is saved as
`GoodCo` or `BadCo`. However, another expectation should be that setting `type`
to `GoodCo` would correctly instantiate the object as a `Company::GoodCo`. That
second expectation is what this should fix.
2015-05-11 09:02:48 -04:00
claudiob
fe41c01cc9 [ci skip] Stop explaining finders for Rails 3
Now that master points at Rails 5, we might not need to explain how
things used to work in Rails 3. Or we might… up to you 😁
2015-05-10 16:22:17 -07:00