Commit Graph

6857 Commits

Author SHA1 Message Date
Aaron Patterson
4bcd437f76 updating RAILS_VERSION 2012-02-22 12:03:13 -08:00
Aaron Patterson
35626feb61 bumping up arel 2012-02-21 16:13:56 -08:00
Aaron Patterson
83e42d52e3 prepared statements can be disabled 2012-02-21 16:09:01 -08:00
Aaron Patterson
a566ee5308 tag bind params with a bind param object 2012-02-21 15:46:18 -08:00
Aaron Patterson
c73f8833d5 more ruby 2.0 respond_to? changes 2012-02-21 11:37:12 -08:00
Aaron Patterson
d70ed102c8 Merge pull request #5096 from lawso017/master
Restoring ability to derive id/sequence from tables with nonstandard sequences for primary keys
2012-02-21 09:17:59 -08:00
kennyj
39d4617033 Fix some warnings on 3-2-stable 2012-02-21 12:43:41 +09:00
Arun Agrawal
742b6159d5 fix test with ruby 187-p358 2012-02-18 15:47:24 +05:30
José Valim
5f9a5a51de Merge pull request #5038 from carlosantoniodasilva/fix-db-migrate-redo
Always reenable _dump task in AR databases rake. Closes #5030
2012-02-14 12:10:56 +01:00
Rafael Mendonça França
7c167dd2de Use real table and columns for index test 2012-02-08 11:53:32 -02:00
José Valim
d3d807a173 Push proper test changes for previous commit conflicts. 2012-02-08 14:06:44 +01:00
Paul Sadauskas
0a75336c89 Handle nil in add_index :length option in MySQL
Our schema.rb is being generated with an `add_index` line similar to this:

    add_index "foo", ["foo", "bar"], :name => "xxx", :length => {"foo"=>8, "bar=>nil}

This is the same as it was on Rails 3.1.3, however, now when that
schema.rb is evaluated, its generating bad SQL in MySQL:

    Mysql::Error: You have an error in your SQL syntax; check the manual
    that corresponds to your MySQL server version for the right syntax
    to use near '))' at line 1: CREATE UNIQUE INDEX
    `xxx` ON `foo` (`foo`(8), `bar`())

This commit adds a check for nil on the length attribute to prevent the
empty parens from being output.

Conflicts:

	activerecord/test/cases/migration/index_test.rb

Signed-off-by: José Valim <jose.valim@gmail.com>
2012-02-08 13:34:04 +01:00
Jon Leighton
77b4edce15 Fix attribute_before_type_cast for serialized attributes. Fixes #4837.
Conflicts:

	activerecord/lib/active_record/core.rb
2012-02-07 23:41:21 +00:00
Xavier Noria
dafc3c7a06 no need to check for this constant 2012-02-07 21:20:54 +01:00
Markus Fenske
8c7378aae8 Fixed the documenation for 'to_xml' 2012-02-07 17:32:15 +01:00
Xavier Noria
ee6e3c128b let automatic EXPLAIN ignore CACHE notifications 2012-02-03 16:12:18 -08:00
densya203
daa266536e Fix Issue #4819
'uninitialized constant ActiveRecord::Deprecation in Rails3.2.1'

Just a typo of 'ActiveSupport::...'
2012-02-04 00:51:08 +09:00
Aaron Patterson
4ca633e466 Merge pull request #4809 from cfeist/feist-sqlite-binary-corruption
Fix for SQLite binary data corrupter (to master branch)
2012-02-02 09:16:06 -08:00
Jon Leighton
42dab646eb Merge pull request #4543 from jdelStrother/find_or_init
Don't instantiate two objects in collection proxy / find_or_instantiate_by
2012-02-01 23:19:25 +00:00
Rafael Mendonça França
f532cd1040 Fix broken tests added by 85c724d59 2012-01-31 23:39:29 -02:00
Jon Leighton
e1de54079b Improve deprecation message 2012-01-31 20:26:16 +00:00
Jon Leighton
85c724d59e Merge pull request #4783 from gregolsen/ids_reader_fix
ids_reader method fixed, test added to has_many association (for PostgreSQL)
2012-01-31 13:51:09 +00:00
Jon Leighton
b2955edcea Allow writing unknown attributes, but with a deprecation warning. Closes #4583. 2012-01-31 08:50:36 +00:00
Jon Leighton
0bfc504d9c Add workaround and deprecation if the inherited hook is not executed. Closes #4757. 2012-01-31 08:41:51 +00:00
Jon Leighton
c472843bbc Merge pull request #4763 from kennyj/fix_4754
[MySQL] Fix GH #4754. Remove double-quote characters around PK when using sql_mode=ANSI_QUOTES
2012-01-31 08:23:25 +00:00
Xavier Noria
413790559c query cache instrumentation should included the bindings in the payload [closes #4750] 2012-01-30 13:48:05 -08:00
Jon Leighton
1c5bd8a33d Merge pull request #4715 from pwim/find-create-multi-args
Fix regression from Rails 3.1
2012-01-27 09:31:48 +00:00
Xavier Noria
67b8fbca92 updating RAILS_VERSION 2012-01-26 14:54:02 -08:00
Xavier Noria
97e8d1d819 CHANGELOG revision for v3.2.1 2012-01-26 14:28:48 -08:00
Aaron Patterson
5ac5acd63e Merge pull request #4696 from rafaelfranca/issue-4653
Remove extra attributes from HABTM join tables in AR tests
2012-01-26 09:41:04 -08:00
Rafael Mendonça França
06dcd9c0fb Remove extra attributes from HABTM join tables in AR tests
HABTM Join tables should not have extra attributes

When extra attributes is needed in HABTM join tables is better to use
`has_many :through` association.

Fix #4653
2012-01-26 10:32:10 -02:00
Xavier Noria
280937578b registers 2483460 in the CHANGELOG 2012-01-26 13:04:40 +01:00
Xavier Noria
24834606c2 disable automatic explain if there is no logger [closes #4671] 2012-01-26 02:51:18 -08:00
Sergey Nartimov
36d7af34d6 call to_s on value passed to table_name=
Signed-off-by: José Valim <jose.valim@gmail.com>
2012-01-26 08:19:45 +01:00
Jon Leighton
fab664a8e9 Fix another race condition.
From 2c667f69aa2daac5ee6c29ca9679616e2a71532a.

Thanks @pwnall for the heads-up.

Conflicts:

	activerecord/lib/active_record/core.rb
2012-01-20 18:31:41 +00:00
David Heinemeier Hansson
f36dcaf488 Preparing for 3.2.0 release 2012-01-20 17:44:32 +01:00
Aaron Patterson
4c5b73fef8 Merge pull request #4531 from exviva/pessimistic_with_lock
Add ActiveRecord::Base#with_lock
2012-01-19 09:39:20 -08:00
Vijay Dev
c8b584f576 select doesn't take multiple arguments - fixes #4539 [ci skip]
Didn't cherry pick the master commit because this one already had some
of the fixes made in master.
2012-01-19 21:58:19 +05:30
Aaron Patterson
57f73a6bcf Merge pull request #4487 from sarenji/fix-reset-counters
Fix bug where reset_counters resets the wrong counter cache.
2012-01-17 10:23:56 -08:00
Jon Leighton
70b762d1a7 Fix race condition 💣 2012-01-13 22:58:26 +00:00
Piotr Sarnacki
0d1df723c7 Fix table_name in ActiveRecord with more than one abstract ancestors
When subclassing abstract_class table_name should be always computed
based on class name, no matter if superclass is subclassing base
or another abstract_class. So:

class FirstAbstract < ActiveRecord::Base
  self.abstract_class = true
end
class SecondAbstract < FirstAbstract
  self.abstract_class = true
end

class Post < SecondAbstract
  self.table_name #=> 'posts' (not 'second_abstracts')
end
2012-01-12 20:53:01 +01:00
Aaron Patterson
1d74af6688 moving to arel 3.0.0 2012-01-12 11:39:35 -08:00
Vijay Dev
e6b59432ea fixes in api docs 2012-01-13 00:42:33 +05:30
Santiago Pastorino
3f16f5b7a0 Add CHANGELOG entry 2012-01-11 23:52:41 -02:00
Santiago Pastorino
fc74a51c3f on and ON are type casted to a true boolean column 2012-01-11 23:26:32 -02:00
Matt Jones
d0915ac2f9 add documentation explaining reorder behavior 2012-01-11 20:24:22 +05:30
Santiago Pastorino
bb78804a5e Merge pull request #4408 from tomstuart/read-and-write-attribute-aliases
#[] and #[]= are no longer interchangeable with #read_attribute and #write_attribute
2012-01-11 12:10:59 -02:00
Aaron Patterson
77785c7806 FFFFFFFFUUUUUUUUUUUUUUUUUUUUUUUUU 💣 2012-01-10 13:24:15 -08:00
Aaron Patterson
5e04884bce deprecate the subdirectories parameter to migrations
Conflicts:

	activerecord/lib/active_record/migration.rb
2012-01-10 13:19:11 -08:00
Santiago Pastorino
d268ef2f65 Bump to rc2 2012-01-04 18:59:41 -02:00