Raimonds Simanovskis
60d8e4ac28
Ensure correct ordering of results in test_update_all_with_joins_and_offset_and_order
...
Last two asserts in this test assume that all_comments are ordered by posts.id and then by comments.id therefore additional ordering is added. Without it test was failing on Oracle which returned results in different order.
2011-08-30 22:33:49 +01:00
Jon Leighton
bd4bd3f50a
Merge pull request #2750 from rsim/fix_test_column_names_are_escaped_for_oracle
...
Fix test column names are escaped for oracle
2011-08-30 11:04:01 -07:00
Jon Leighton
92619e4f78
Fix test failures on 1.8.7, since Object#initialize_dup is not defined there (and this call to super is no essential, so easiest to simply remove)
2011-08-29 23:05:26 +01:00
Aaron Patterson
cebff6d0f7
Merge pull request #2021 from dasch/more_postgres_utils
...
Make #extract_schema_and_table an instance method in Utils
2011-08-29 13:38:10 -07:00
Jon Leighton
c59c9bb8bc
Move clear_timestamp_attributes into Timestamp module
2011-08-29 17:39:09 +01:00
Jon Leighton
735d985b01
The join_nodes must be passed to the JoinDependency initializer and therefore counted by the alias tracker. This is because the association_joins are aliased on initialization and then the tables are cached, so it is no use to alias the join_nodes later. Fixes #2556 .
2011-08-29 15:05:47 +01:00
Jon Leighton
fd22d040fe
Move the bulk alter table code into the abstract mysql adapter, hence it is supported for mysql2 as well now.
2011-08-29 12:43:39 +01:00
Jon Leighton
4fcd847c8d
Extract simplified_type into the abstract class
2011-08-29 12:43:39 +01:00
Jon Leighton
5766539342
Create an AbstractMysqlAdapter to abstract the common code between MysqlAdapter and Mysql2Adapter.
2011-08-29 12:43:39 +01:00
Aaron Patterson
d63688d9e6
fixing typo
2011-08-28 16:31:13 -07:00
Aaron Patterson
b4ff82a791
clear and disable query cache when an exception is raised from called middleware
2011-08-28 14:16:00 -07:00
Aaron Patterson
e8b525f169
stop messing with the load path, load path should be adjusted in the test task
2011-08-26 10:15:17 -07:00
Aaron Patterson
42a7979cf1
Force binary data inserted for a string data type to utf-8 and log an
...
error. Strings tagged as binary will be stored in sqlite3 as blobs. It
is an error to insert binary data to a string column, so an error is
emitted in the log file. People are highly encouraged to track down the
source of the binary strings and make sure that the encoding is set
correctly before inserting to the database.
2011-08-25 16:07:54 -07:00
Aaron Patterson
5345958b3a
Merge pull request #2679 from amatsuda/nullify_abstract_class_table_name
...
do not compute table names for abstract classes
2011-08-24 16:05:24 -07:00
Claudio Poli
098cc186c1
Adding missing autoload
2011-08-24 19:15:49 +02:00
Akira Matsuda
0a0da9d554
do not compute table names for abstract classes
2011-08-24 21:11:15 +09:00
Santiago Pastorino
0942879a52
Merge pull request #2524 from JonathonMA/fix_ecd37084b28a05f05251
...
Use mysql_creation_options inside rescue block
2011-08-22 10:36:12 -07:00
Xavier Noria
74b57b387f
Merge pull request #2600 from al/finder_sql_example_update
...
Updated the docs for the has_many :finder_sql option
2011-08-21 04:36:12 -07:00
Alan Larkin
dbe9a9b482
Updated the docs for the has_many :finder_sql option to reflect changes made in #a7e19b30ca71f62af516, i.e. the use of Procs when interpolation of the SQL is required.
2011-08-20 19:42:07 +01:00
Ernie Miller
f74f5f7f00
Fix PredicateBuilder clobbering select_values in subquery.
2011-08-20 13:16:39 -04:00
Ernie Miller
e2ae015952
Fix assumption of primary key name in PredicateBuilder subquery.
2011-08-20 13:00:26 -04:00
Aaron Patterson
8a39f411dc
prevent sql injection attacks by escaping quotes in column names
2011-08-16 15:24:42 -07:00
Jon Leighton
0d5a6f68df
In 1efd88283e, ConnectionAdapters was put under eager_autoload. Due to the requires in that file, this caused ConnectionSpecification to be loaded, which references ActiveRecord::Base, which means the database connection is established. We do not want to connect to the database when Active Record is loaded, only when ActiveRecord::Base is first referenced by the user.
2011-08-16 16:40:16 +01:00
Santiago Pastorino
c6e57467a6
Revert "Merge pull request #2543 from htanata/unused_require_in_ar_test"
...
This reverts commit 87152f2604 , reversing
changes made to 0d3615f04c .
2011-08-16 09:24:49 -03:00
Hendy Tanata
21e2eeacff
Remove unused require.
2011-08-16 12:40:57 +08:00
Jon Leighton
03a045b306
Bump arel dependency
2011-08-15 23:10:16 +01:00
Jon Leighton
c3dcb795f1
Use new SelectManager#source method
2011-08-15 23:10:16 +01:00
Jon Leighton
cc206a3507
Use new SelectManager#projections= method
2011-08-15 23:10:16 +01:00
Jon Leighton
12aaad0848
use update.key instead of update.ast.key. make better use of select manager.
2011-08-15 23:10:16 +01:00
Jon Leighton
8778c82e32
Use a SelectCore rather than a full SelectManager
2011-08-15 23:10:15 +01:00
Jon Leighton
fe0ec85541
Refactor building the update manager
2011-08-15 23:10:15 +01:00
Jon Leighton
43b99f290a
Support for multi-table updates with limits, offsets and orders
2011-08-15 23:10:15 +01:00
Jon Leighton
128d006242
Support updates with joins. Fixes #522 .
2011-08-15 23:10:15 +01:00
Jon Leighton
57423d815b
Ensure empty has_many :through association preloaded via joins is marked as loaded. Fixes #2054 .
2011-08-15 16:01:01 +01:00
Jon Leighton
7b56fb034a
Fix private methods which are delegated to. This previously worked because Module#delegate previously ignored method visibility.
2011-08-15 12:38:44 +01:00
Jonathon M. Abbott
4bb7abcb77
Use mysql_creation_options inside rescue block
...
Commit ecd37084b2 did not take into account the use of
creation_options inside the access denied exception handler.
2011-08-14 22:09:42 +10:00
Xavier Noria
bf2b9d2de3
Merge branch 'master' of github.com:lifo/docrails
...
Conflicts:
RELEASING_RAILS.rdoc
actionpack/lib/sprockets/railtie.rb
actionpack/test/template/sprockets_helper_test.rb
activerecord/test/cases/calculations_test.rb
railties/guides/source/3_1_release_notes.textile
railties/guides/source/active_resource_basics.textile
railties/guides/source/command_line.textile
2011-08-13 16:30:07 -07:00
Florent Guilleux
56efdbc626
Document exclamation point on dynamic finders
2011-08-13 16:22:34 -07:00
Sukeerthi Adiga
b905f8c963
Rubygems => RubyGems
2011-08-13 16:22:31 -07:00
Jon Leighton
66e114cd0c
Quote these dates to prevent intermittent test failure. Suppose local time is 00:50 GMT+1. Without the quoting, the YAML parser would parse this as 00:50 UTC, into the local time of 01:50 GMT+1. Then, it would get written into the database in local time as 01:50. When it came back out the UTC date from the database and the UTC date of two weeks ago would be compared. The former would be 23:50, and the latter would be 00:50, so the two dates would differ, causing the assertion to fail. Quoting it prevents the YAML parser from getting involved.
2011-08-13 16:22:29 -07:00
artemk
bb72183bca
accept option for recreate db for postgres (same as mysql now)
2011-08-13 16:22:28 -07:00
Aaron Patterson
1ff52cbe81
initializing @open_transactions in the initialize method
2011-08-13 16:22:28 -07:00
Aaron Patterson
d6af6fc0c0
add a migrate class method and delegate to the new instance
2011-08-13 16:22:27 -07:00
Christopher Meiklejohn
9d31acf8b9
Ensure that .up and .down work as well.
2011-08-13 16:22:27 -07:00
Christopher Meiklejohn
9d19bae233
Support backwards compatible interface for migration down/up with rails 3.0.x.
2011-08-13 16:22:27 -07:00
Vishnu Atrai
665a89ed4f
remove extra require for 'stringio' as it is required in helper.rb
2011-08-13 16:22:26 -07:00
Arun Agrawal
3d2bda9601
magic comment test only if encoding_aware?.
2011-08-13 16:22:25 -07:00
Brian Cardarella
3d87d01dad
Resolve warnings by instantizing @attrubtes as nil
2011-08-13 16:22:25 -07:00
Aaron Patterson
4a74493816
default writing the schema file as utf-8
2011-08-13 16:22:24 -07:00
Aaron Patterson
17a66a8ddc
dump IO encoding value along with schema.rb so the file can be reloaded. fixes #1592
2011-08-13 16:22:24 -07:00