Jon Leighton
9ecc4433bb
Perf: don't mess around with thread local vars unless we actually need to
2011-08-13 16:54:05 +01:00
Jon Leighton
24f902b1bc
Fix default scope thread safety. Thanks @thedarkone for reporting.
2011-08-13 16:54:05 +01:00
Myron Marston
d3c15a1d31
Allow ActiveRecord observers to be disabled.
...
We have to use Observer#update rather than Observer#send since the enabled state is checked in #update before forwarding the method call on.
2011-08-12 20:48:44 -07:00
Aaron Patterson
d00e1646f7
add the gem requirement for sqlite3
2011-08-10 11:39:48 -07:00
Jon Leighton
5680a51dcb
Remove TODO comment I didn't mean to commit
2011-08-09 00:00:52 +01:00
Jon Leighton
9062b75bb7
Fully marshal AR::Base objects. Fixes #2431 .
2011-08-08 23:28:49 +01:00
Jon Leighton
7db90aa7c7
Make it the responsibility of the connection to hold onto an ARel visitor for generating SQL. This improves the code architecture generally, and solves some problems with marshalling. Adapter authors please take note: you now need to define an Adapter.visitor_for method, but it degrades gracefully with a deprecation warning for now.
2011-08-08 23:28:23 +01:00
Gustavo Delfino
cdb49fc2f3
sqlite transactions now logged
...
motivation: http://stackoverflow.com/questions/6892630/sqlite-transactions-not-showing-in-test-log
2011-08-06 16:05:45 -04:30
Santiago Pastorino
1b676fc760
Revert "to_key on a destroyed model should return nil". Closes #2440
...
This reverts commit c5448721b5 .
2011-08-05 19:39:19 -03:00
Xavier Noria
9e18380a32
Revert "Explicitly included hashes in sentence regarding SQL-injection-safe forms"
...
Reason: The hash form is secure, and preferred over the array form if possible.
This reverts commit 6dc749596c .
2011-08-04 16:41:31 -07:00
Vijay Dev
38bfcffc59
make the warning clear about the effect of using validates_associated on both sides on an association.
2011-08-04 16:41:27 -07:00
Pete Campbell
3c3f808764
Explicitly included hashes in sentence regarding SQL-injection-safe forms
2011-08-04 16:40:25 -07:00
artemk
b386951e42
accept option for recreate db for postgres (same as mysql now)
2011-08-04 00:34:13 +03:00
Aaron Patterson
86b7d83f1c
initializing @open_transactions in the initialize method
2011-08-03 08:57:52 -07:00
Aaron Patterson
3a29cc3412
add a migrate class method and delegate to the new instance
2011-08-02 20:01:38 -07:00
Christopher Meiklejohn
74d7bfb200
Support backwards compatible interface for migration down/up with rails 3.0.x.
2011-08-02 18:55:59 -07:00
Aaron Patterson
cea06a8e3f
default writing the schema file as utf-8
2011-07-29 12:28:12 -07:00
Aaron Patterson
3d6e187255
dump IO encoding value along with schema.rb so the file can be reloaded. fixes #1592
2011-07-29 12:23:37 -07:00
Jon Leighton
971a74b81f
Revert "Merge pull request #2309 from smasry/master"
...
This reverts commit 9d396ee819 , reversing
changes made to fa2bfd832c .
Reason: the change broke the build.
2011-07-28 13:14:11 +01:00
Samer Masry
18d307ed94
Reverse order fix when using function for ActiveRecord::QueryMethods Fixes #1697
2011-07-27 10:17:25 -07:00
Dmitriy Kiriyenko
9a298a162c
Fixed failing query when performing calculation with having based on select.
2011-07-27 16:48:15 +03:00
Jon Leighton
24f0a872e6
Add a proxy_association method to association proxies, which can be called by association extensions to access information about the association. This replaces proxy_owner etc with proxy_association.owner.
2011-07-27 12:36:00 +01:00
Vishnu Atrai
cf3f1c9ba8
remove deprication warning for ruby 1.9.3-head for unused variables
2011-07-26 22:33:23 +05:30
Piotr Sarnacki
14c6fca9cd
Revert "allow select to have multiple arguments"
...
This reverts commit 04cc446d17 .
I reverted it because apparently we want to use: select([:a, :b])
instead of select(:a, :b), but there was no tests for that form.
2011-07-26 16:15:12 +02:00
Piotr Sarnacki
89f3d8a886
Merge pull request #2271 from slawosz/enhance_select_method_api
...
allow select to have multiple arguments ie. Post.select(:id,:name,:author)
2011-07-26 06:33:54 -07:00
Sławosz Sławiński
04cc446d17
allow select to have multiple arguments
2011-07-26 14:57:47 +02:00
Xavier Noria
703d0e05c0
Merge branch 'master' of git://github.com/lifo/docrails
2011-07-25 14:20:01 -07:00
Glenn Gillen
4605b5639d
Simplify the way default DATABASE_URL works.
2011-07-25 09:08:08 -07:00
Santiago Pastorino
64affc9384
Merge pull request #2236 from cldwalker/after_initialize
...
Fix after_initialize and Base.create edge case
2011-07-25 07:20:38 -07:00
thedarkone
10863580aa
Bring back the ability to provide :order for update_all.
2011-07-25 13:33:44 +02:00
Aaron Patterson
02691d3516
Merge pull request #2238 from cesario/order-with-extra-spaces
...
Ordering with extra spaces was raising a SQL exception
2011-07-24 14:40:15 -07:00
John
dd8a485170
Fixed Typo
2011-07-24 17:11:29 -04:00
Xavier Noria
4bb0a8bcbd
Merge branch 'master' of git://github.com/lifo/docrails
2011-07-24 21:02:51 +02:00
Oemuer Oezkir
71d18ce48e
Changed a few instances of of words in the API docs written in British English to
...
American English(according to Weber)
2011-07-24 10:21:42 +00:00
Franck Verrot
77bb0b79f2
Ordering with extra spaces was raising a SQL exception
2011-07-24 08:18:04 +02:00
Les Fletcher
f956759f8a
fix after_initialize edge case ( close #2074 and close #2175 )
...
fix behavior when after_initialize is defined and a block is passed to Base.create
2011-07-24 00:31:28 -04:00
Aaron Patterson
a14f4566dd
Merge pull request #2185 from castlerock/lazy_load_abstract_adapter
...
lazy load ConnectionAdapters remove require.
2011-07-23 20:51:43 -07:00
Xavier Noria
a62f450661
Merge pull request #2086 from amatsuda/date_multiparameter_nil
...
convert multiple Date parameters into a nil if any of its bits were blank
2011-07-23 11:20:12 -07:00
Santiago Pastorino
7dadb6aa0a
Merge pull request #2171 from arunagw/database-rake-1.9.2
...
This conditions is required to work with database create task. 1.9.2 is h
2011-07-23 07:58:59 -07:00
Xavier Noria
ace3723d2f
Merge branch 'master' of git://github.com/lifo/docrails
2011-07-23 12:15:41 +02:00
Vijay Dev
a2778861fe
Fixes typo
2011-07-22 08:41:00 -07:00
Vishnu Atrai
1efd88283e
lazy load ConnectionAdapters remove require.
2011-07-22 17:49:24 +05:30
Aaron Patterson
1a0b7ea3c9
adding more tests around database uri parsing
2011-07-21 12:57:05 -07:00
Arun Agrawal
fbf4bee6ed
This conditions is required to work with database create task. 1.9.2 is having a bug with "Calling return within begin still executes else".
2011-07-21 09:47:42 +05:30
Glenn Gillen
1f427b5341
Add documentation for URL connection strings.
2011-07-20 16:23:31 -07:00
Glenn Gillen
16249feaab
Added test for postgres connections as URL. Fixed query param parsing.
2011-07-20 16:23:31 -07:00
Glenn Gillen
89357c8f83
Provide database connection settings as a URL.
2011-07-20 16:23:31 -07:00
Aaron Patterson
22e47279bc
no need to sort the values
2011-07-20 15:52:53 -07:00
Franck Verrot
8bc314b3b7
assign_nested_attributes_for_collection_association should work with Ruby 1.9 [ Closes #2106 ]
...
Children attributes can be either String's or Symbol's, so let's check if the object responds to to_i.
2011-07-20 15:40:01 -07:00
Aaron Patterson
09a488456a
bigdecimal should be typecast to a float on sqlite3. fixes #2162
2011-07-20 14:39:01 -07:00