Commit Graph

7816 Commits

Author SHA1 Message Date
Aaron Patterson
1b075220ef Merge pull request #5810 from kennyj/fix_5797
Fix #5797. Error calling dup method on AR model with serialized field
2012-05-30 11:26:59 -07:00
Aaron Patterson
7c1b61e50e Merge pull request #6386 from kennyj/fix_logs_name_consistency
Fix logs name consistency.
2012-05-30 11:06:49 -07:00
Vijay Dev
ec74763c39 Merge branch 'master' of github.com:lifo/docrails 2012-05-30 22:53:52 +05:30
Vijay Dev
032f502f12 copy edit the batches docs [ci skip] 2012-05-30 22:40:51 +05:30
kennyj
d09b2fd09d Fix #5797. Error calling dup method on AR model with serialized field 2012-05-30 23:24:23 +09:00
kennyj
c0ba0f01d0 Fix #5847 and #4045 on master. 2012-05-30 00:27:43 +09:00
kennyj
cc7dd66c68 Use runner hook to load ActiveRecord::Base. 2012-05-30 00:27:38 +09:00
kennyj
5cc9c7e369 SchemaMigration should be loaded lazily. 2012-05-29 22:32:15 +09:00
Francesco Rodriguez
b89553cf41 Add tests to delete by fixnum or string id with has many through associations 2012-05-28 22:31:41 -05:00
Carlos Antonio da Silva
18af5dab07 Fix failing build related to change in CollectionAssociation#delete
Merge commit 6f1d9d00ffd9d411b2bd488da4eb92b7e2fd972e
2012-05-29 00:18:43 -03:00
Carlos Antonio da Silva
f9cb645dfc Yield only one argument instead of splatting.
Add Changelog entry. Closes #4003
2012-05-28 23:16:34 -03:00
chrisfinne
9cc2bf69ce Allow blocks for count with ActiveRecord::Relation. Document and test that sum allows blocks 2012-05-28 23:16:07 -03:00
Francesco Rodriguez
39f0698405 Add support for CollectionAssociation#delete by Fixnum or String
I found the next issue between CollectionAssociation `delete`
and `destroy`.

    class Person < ActiveRecord::Base
      has_many :pets
    end

    person.pets.destroy(1)
    # => OK, returns the destroyed object

    person.pets.destroy("2")
    # => OK, returns the destroyed object

    person.pets.delete(1)
    # => ActiveRecord::AssociationTypeMismatch

    person.pets.delete("2")
    # => ActiveRecord::AssociationTypeMismatch

Adding support for deleting with a fixnum or string like
`destroy` method.
2012-05-28 19:57:43 -05:00
Francesco Rodriguez
501d98b812 change example on CollectionProxy#delete to accept multiple values 2012-05-28 10:41:42 -05:00
Alvaro Pereyra
2bef137d99 Adds to Batch processing documentation [ci skip] 2012-05-28 03:24:37 -05:00
Francesco Rodriguez
a3d18d2ec0 fix typo and remove 'examples' noise [ci skip] 2012-05-28 02:55:11 -05:00
Alvaro Pereyra
19de3d8d7f Updates examples for FinderMethods [ci skip] 2012-05-28 02:52:11 -05:00
Alvaro Pereyra
72973a3070 Merge branch 'master' of github.com:lifo/docrails 2012-05-28 02:29:46 -05:00
Alvaro Pereyra
011863673a Adds examples to FinderMethods#first [ci skip] 2012-05-28 02:29:01 -05:00
Alvaro Pereyra
da4252f4a1 Updates validations examples to be more attuned on the new Rails 3.0 conventions 2012-05-28 01:45:33 -05:00
Xenda
fabd2ce24f Merge pull request #102 from xenda/master
Small fix to update the README using more up to date conventions.
2012-05-27 23:42:52 -07:00
Mark Rushakoff
d138921cec "a sql" -> "an SQL" per API documentation guidelines 2012-05-27 08:25:00 -07:00
Francesco Rodriguez
4df16f3f3d remove unnecessary ruby 1.8 reference from active_record/core [ci skip] 2012-05-26 22:51:26 -05:00
Francesco Rodriguez
55c05276c7 add CollectionProxy#uniq documentation 2012-05-26 22:43:24 -05:00
Vijay Dev
575e77ba16 Merge branch 'master' of github.com:lifo/docrails 2012-05-26 17:49:59 +05:30
Francesco Rodriguez
7a323e2ed1 add :nodoc: to CollectionProxy#initialize 2012-05-25 23:09:47 -05:00
Francesco Rodriguez
bb55f52ee8 add CollectionProxy#== documentation 2012-05-25 23:01:38 -05:00
Francesco Rodriguez
f81798d064 add CollectionProxy#count documentation 2012-05-25 22:45:22 -05:00
Francesco Rodriguez
390d86ae89 add CollectionProxy#to_ary documentation 2012-05-25 22:18:56 -05:00
Francesco Rodriguez
29463aa15d add CollectionProxy#delete documentation 2012-05-25 22:08:59 -05:00
Aaron Patterson
1ca31331ba Merge pull request #4132 from Juanmcuello/clone_structure
Reset postgreSQL search path in db:test:clone_structure.
2012-05-25 17:03:21 -07:00
Aaron Patterson
0777773389 Merge pull request #5872 from evtuhovich/prepared_statement_fix
Remove prepared statement from system query in postgresql adapter
2012-05-25 10:38:13 -07:00
Rafael Mendonça França
1c3469b828 Merge pull request #5244 from fotos/myqsl2_wait_timeout
Maximum wait_timeout on Windows is 2147483
2012-05-25 12:00:00 -03:00
Carlos Antonio da Silva
6775ad8c61 Merge pull request #5925 from Juanmcuello/pg_structure_dump
Quote arguments in db:structure:dump for PostgreSQL.
2012-05-24 19:13:54 -03:00
Rafael Mendonça França
82b05fbcf4 Whitespaces ✂️ 2012-05-23 15:32:05 -03:00
Rafael Mendonça França
925f6bd546 PGconn doesn't accepts :checkout_timeout option.
This option was added on cb6f839359bd894feb0a1105b79af72b336aa41e
renaming the :wait_timeout option.

Fix build http://travis-ci.org/#!/rails/rails/jobs/1413405
2012-05-23 15:30:07 -03:00
Vijay Dev
91305adef8 Merge branch 'master' of github.com:lifo/docrails 2012-05-23 23:26:39 +05:30
Vijay Dev
1c94868033 copy edits in collection proxy docs [ci skip] 2012-05-23 23:12:35 +05:30
José Valim
92fd2120cd Merge pull request #6462 from grosser/feature/licenses
Add license field to gemspecs, by Matt Griffin
2012-05-23 10:24:50 -07:00
Vijay Dev
1ad0b378cc Revert "Remove blank trailing comments"
This reverts commit fa6d921e11363e9b8c4bc10f7aed0b9faffdc33a.

Reason: Not a fan of such massive changes. We usually close such changes
if made to Rails master as a pull request. Following the same principle
here and reverting.

[ci skip]
2012-05-23 22:43:08 +05:30
Matt Griffin
6c7b250ac0 Add license field to gemspecs, by Matt Griffin 2012-05-23 09:22:25 -07:00
Jonathan Rochkind
cb6f839359 ConnectionPool wait_timeout no longer used for different types of timeouts. #6441
An AR ConnectionSpec `wait_timeout` is pre-patch used for three
different things:

* mysql2 uses it for MySQL's own wait_timeout (how long MySQL
  should allow an idle connection before closing it), and
  defaults to 2592000 seconds.
* ConnectionPool uses it for "number of seconds to block and
  wait for a connection before giving up and raising a timeout error",
  default 5 seconds.
* ConnectionPool uses it for the Reaper, for deciding if a 'dead'
  connection can be reaped. Default 5 seconds.

Previously, if you want to change these from defaults, you need
to change them all together. This is problematic _especially_
for the mysql2/ConnectionPool conflict, you will generally _not_
want them to be the same, as evidenced by their wildly different
defaults. This has caused real problems for people #6441 #2894

But as long as we're changing this, forcing renaming the
ConnectionPool key to be more specific, it made sense
to seperate the two ConnectionPool uses too -- these two
types of ConnectionPool timeouts ought to be able to be
changed independently, you won't neccesarily want them
to be the same, even though the defaults are (currently)
the same.
2012-05-23 12:08:11 -04:00
Angelo capilleri
5646d65d01 changed xml type datetime to dateTime, fixes #6328
XmlMini define the xml 'datatime', but according to
http://www.w3.org/TR/xmlschema-2/#dateTime could be better
change this to 'dateTime' with upper case letter 'T.
So 'DateTime' and 'Time' are redefined from 'datetime' to 'dateTime'

add the changing to the changelog
2012-05-23 14:45:56 +02:00
Rafael Mendonça França
7c69e2db36 Revert "Merge pull request #6416 from pmahoney/threadsafe-connection-pool"
This reverts commit d2901f0fc4270a765717ad572d559dc49a56b3a8, reversing
changes made to 525839fdd8cc34d6d524f204528d5b6f36fe410c.

Conflicts:
	activerecord/test/cases/connection_pool_test.rb

Reason: This change broke the build (http://travis-ci.org/#!/rails/rails/builds/1391490)
and we don't have any solution until now. I asked the author to try to
fix it and open a new pull request.
2012-05-22 15:01:36 -03:00
Francesco Rodriguez
eb2c0a4f71 add CollectionProxy#length documentation 2012-05-22 12:34:12 -05:00
Francesco Rodriguez
f539d98cc8 add CollectionProxy#size documentation 2012-05-22 12:17:00 -05:00
Francesco Rodriguez
3e847afbdd add :call-seq: to +first+ and +last+ CollectionProxy methods 2012-05-22 11:55:30 -05:00
Francesco Rodriguez
7e5beca38f add CollectionProxy#create! documentation 2012-05-22 11:52:14 -05:00
Francesco Rodriguez
9c38cfc44a add CollectionProxy#create documentation 2012-05-22 11:39:13 -05:00
Francesco Rodriguez
e0859e569c add more examples to CollectionProxy#find 2012-05-22 11:27:04 -05:00