Commit Graph

4892 Commits

Author SHA1 Message Date
Ken Collins
e5cf2add10 Update SQL Server db related rake tasks.
* Uses open source smoscript since scptxfr came out in 2000.
  * Uses sqlcmd which replaces osql.
  * Takes advantage of host/user/pass passed down by TinyTDS.
2011-06-20 22:08:31 -04:00
Daniel Azuma
f542188e7a Add missing require 'set'
Signed-off-by: José Valim <jose.valim@gmail.com>
2011-06-20 08:53:39 -03:00
Steve Hodgkiss
aba7a43273 Fix inconsistencies by being polite to the wrapped body. Needed for Rack::Sendfile to function properly. See issue #1761. 2011-06-19 06:05:13 +01:00
Lucia Escanellas
a7813a64a6 Update remove_index documentation
* Changes should better reflect present code behavior
* Related to issue: https://github.com/rails/rails/issues/1624
2011-06-18 11:42:06 +02:00
Brian Lopez
89adadd39a bump mysql2 to 0.3.6 2011-06-17 09:32:43 -07:00
Ken Collins
f960cb2832 Allow the connection pool's #table_exists? method to give the connections #table_exists? method a chance. 2011-06-17 09:05:13 +02:00
Jon Leighton
1cc0c3f52c Perf fix - Use an instance variable instead of a class_attribute. Thanks @josevalim and @jhawthorn for the prompting. 2011-06-16 21:16:54 +01:00
Arun Agrawal
bf588c69de Mysql bump 2011-06-16 10:48:28 +05:30
Brian Lopez
d2b13403ff bump mysql2 version 2011-06-15 20:17:35 -07:00
Brian Lopez
7b04e5051e on second thought, lets keep casting on by default. it can be disabled in database.yml by setting 'cast: false' 2011-06-15 20:03:12 -07:00
Brian Lopez
aeb7beb3c6 mysql2 casting changes require mysql2 >= 0.3.3 2011-06-14 15:42:08 -07:00
Brian Lopez
e56567c0b2 Turn off eager casting for mysql2, so ActiveRecord can lazily cast values later. This should help performance for tables with complex types like DATETIME, TIMESTAMP 2011-06-14 15:17:01 -07:00
Andrew White
45509ee6b7 Pass mass-assignment options to nested models - closes #1673. 2011-06-13 13:07:44 +01:00
thoefer
1863f12713 Make sure to have a Hash under the i18n keys 'activerecord.attributes' and 'activerecord.models' as this might not always be the case. See issue #1662. 2011-06-12 21:28:38 +02:00
Jon Leighton
df63c99f06 Replace inline lambdas with named methods 2011-06-12 18:31:42 +01:00
Jon Leighton
5f43a2a2b1 Move BEGIN and COMMIT into IGNORED_SQL rather than having them as a special case in assert_queries 2011-06-12 18:31:20 +01:00
benedikt
b17fd25a2d Don't wrap operations on collection associations in transactions when they are not needed, so the connection adapter does not send empty BEGIN COMMIT transactions blocks to the database. 2011-06-12 18:26:29 +01:00
José Valim
c19bd4f88e Add a deprecation for nested i18n namespace lookup. 2011-06-11 17:58:07 +02:00
Brian Quinn
2d4d7ccf33 Ensure engine migrations are copied in the same sequence that they are required. 2011-06-10 12:59:41 +01:00
Aaron Patterson
279781f896 bumping to 3.1.0.rc4 2011-06-09 15:53:49 -07:00
Damien Mathieu
dc73c2c38f don't reinitialize the arel_table unless the table_name changes 2011-06-09 14:40:26 -07:00
Aaron Patterson
aefd703443 bumping to 3.1.0.rc3 2011-06-08 14:34:20 -07:00
Marian Rudzynski
31023da1b6 use association_primary_key in AssociationScope#add_constraints
(cherry picked from commit 1f7c3d0264)
2011-06-08 22:03:51 +01:00
Bhavin Kamani
696a94baa9 fix connection not established error while running rake task
db:schema:dump
(cherry picked from commit e9a2ff8bb7)
2011-06-08 17:12:23 +01:00
Aaron Patterson
26648978b6 bumping to rails 3.1.0.rc2 2011-06-07 17:01:20 -07:00
Jon Leighton
e1498611d5 When you add a record to a polymorphic has_one, you should be able to access the owner from the associated record 2011-06-08 00:33:18 +01:00
Jon Leighton
f5f020be43 Allow polymorphic has_one to work when the association is set before the owner has been saved. Fixes #1524. 2011-06-08 00:33:18 +01:00
Dmitriy Kiriyenko
54f5fb5dc3 Do not use default_scope in ActiveRecord::Persistence#touch. 2011-06-07 18:43:24 +01:00
Vijay Dev
fa1aad741d comment the recorder methods 2011-06-06 22:47:04 +02:00
Vijay Dev
59016b9b97 up and down are no longer class methods in a migration 2011-06-06 22:46:53 +02:00
Guillermo Iguaran
527499ca12 Remove trailing white-spaces 2011-06-06 22:45:45 +02:00
Ayose
6ad8f6ef5c Edited activerecord/lib/active_record/transactions.rb via GitHub 2011-06-06 22:42:44 +02:00
Ayose
700fd6d29b The URL http://dev.mysql.com/doc/refman/5.0/en/savepoints.html is no longer available 2011-06-06 22:42:37 +02:00
Sebastian Martinez
c32ba39785 Fix font styling on associations.rb 2011-06-06 22:37:04 +02:00
Andrew White
67f5c076de Don't double assign attributes - closes #1467. 2011-06-03 13:58:14 +01:00
Brian Mathiyakom
8a4013ddd0 Fix issue #1272
Set reverse_order_value when asked to reverse_order().
Do the actual reversal in build_arel.
2011-06-01 18:30:14 +01:00
Andrew White
f1fe3c2d52 Raise NameError instead of ArgumentError in ActiveSupport::Dependencies
ActiveSupport::Dependencies now raises NameError if it finds an existing
constant in load_missing_constant. This better reflects the nature of
the error which is usually caused by calling constantize on a nested constant.

Closes #1423
2011-06-01 01:12:41 +01:00
Jon Leighton
668767091f Merge pull request #1437 from joshk/ar_collection_new_alias
Ar collection new alias
2011-05-31 15:48:13 -07:00
Josh Kalderimis
22b02cb049 added an alias for new to build to the AR collection proxy, this corrects an issue where the collection proxies were not consistent 2011-06-01 00:42:02 +02:00
Jon Leighton
f4e3b70e9c Ensure that calculations properly override the select value even if it's set in the default scope. Fixes #1395. 2011-05-31 21:12:40 +01:00
Jon Leighton
64d7348b98 Only save the record once when calling create! on a collection association. Fixes #1360. 2011-05-31 20:32:55 +01:00
Jon Leighton
9d179135b0 Implementing @dmathieu's cleaner fix from #1425. Unfortunately he deleted the branch so I cannot just merge it. 2011-05-31 18:37:37 +01:00
Aaron Patterson
18a2dfbbcf work around bug in the sqlite3 bindings. fixes #1289 2011-05-27 14:12:08 -07:00
Josh Kalderimis
a1936b4a6b correction to the AR::Base#attributes= guard_protected_attributes deprecation message 2011-05-25 23:44:52 +02:00
José Valim
289f9cedef Everyone receives app as argument for consistency.
Conflicts:

	railties/lib/rails/application.rb
2011-05-25 01:39:09 +02:00
Jon Leighton
b519b0cac9 Fix infinite recursion where a lazy default scope references a scope. Fixes #1264. 2011-05-25 00:18:08 +01:00
Andrew White
8a4263c957 Ignore :includes on through associations 2011-05-25 00:17:53 +01:00
Jon Leighton
63a659847b Ensure that the surrounding code in Relation#to_a respects the default_scope (as well as having Relation#arel respect the default scope). Fixes #1233. 2011-05-25 00:17:15 +01:00
Aaron Patterson
656e7b0807 rescue record invalid exceptions and return false from the save method. fixes #796 2011-05-24 11:26:53 -07:00
Jon Leighton
872a9c1b50 Fix problem with loading polymorphic associations which have been defined in an abstract superclass. Fixes #552. 2011-05-23 20:30:26 +01:00