Commit Graph

26365 Commits

Author SHA1 Message Date
Jon Leighton
f4853dc174 Extract attribute serialization code into a separate module 2011-11-30 23:18:40 +00:00
Jon Leighton
61489dc684 Use inheritance to avoid special-case code for the 'id' method 2011-11-30 23:18:40 +00:00
Jon Leighton
4c33d517d9 #id is an alias for whatever the primary key is 2011-11-30 23:18:40 +00:00
Jon Leighton
40840aa9ea fix indent 2011-11-30 23:18:40 +00:00
Vijay Dev
cbeeaa6ea0 expand on pluck docs 2011-12-01 01:42:54 +05:30
Vijay Dev
a72839bc9d minor typo fix 2011-12-01 01:42:54 +05:30
Vijay Dev
04b4fe77c9 s/is is/is 2011-12-01 01:42:54 +05:30
Yehuda Katz
a604983f8b Merge pull request #3816 from lest/exception-page-utf-8
fix exception page when template contains utf-8 and parameters contain utf-8
2011-11-30 11:45:18 -08:00
Leandro Santos
fca655f391 typo in the performance testing rails guide 2011-11-30 14:29:17 -05:00
Vijay Dev
0092f0612d Merge pull request #3786 from nashby/add-namespace-to-form
update guides for the namespace option in form helpers
2011-11-30 11:23:37 -08:00
Vijay Dev
9811c3624a fix bad nodocs 2011-12-01 00:34:21 +05:30
lest
13cab6ef50 fix exception page when template contains utf-8 and parameters contain utf-8 2011-11-30 21:51:01 +03:00
Aaron Patterson
5b3d4f0785 switch WatchStack to use composition, tighten up API 2011-11-30 10:17:27 -08:00
Vijay Dev
88daf08258 Merge branch 'master' of github.com:lifo/docrails 2011-11-30 23:32:01 +05:30
José Valim
5b2eb64ceb Revert "Implement ArraySerializer and move old serialization API to a new namespace."
This reverts commit 8896b4fdc8a543157cdf4dfc378607ebf6c10ab0.

Conflicts:

	activemodel/lib/active_model.rb
	activemodel/lib/active_model/serializable.rb
	activemodel/lib/active_model/serializer.rb
	activemodel/test/cases/serializer_test.rb
2011-11-30 18:48:17 +01:00
Aaron Patterson
be99f0c7eb Revert "avoid hundreds of thousands of calls to (Symbol|String)#to_s"
Test coverage isn't comprehensive enough to catch what this breaks. :(
This reverts commit 45dad592e47944704ab6951351b2fa29d4a2385f.
2011-11-30 09:46:35 -08:00
Aaron Patterson
45dad592e4 avoid hundreds of thousands of calls to (Symbol|String)#to_s 2011-11-30 09:08:30 -08:00
Aaron Patterson
4da879079e run_test method conflicts with newer minitest, so change the name 2011-11-30 09:08:30 -08:00
Jeremy Kemper
b757663af7 Using InstanceMethods in a Concern is deprecated 2011-11-30 10:06:07 -07:00
José Valim
3b07bb33e1 Merge pull request #3810 from lest/fix-warnings
fix method redefined warnings in tests
2011-11-30 08:07:51 -08:00
lest
6ce924fa9f fix method redefined warning in activemodel 2011-11-30 18:57:17 +03:00
lest
93387e2e7c fix deprecation warnings in activeresource 2011-11-30 18:57:17 +03:00
lest
565d92f578 fix method redefined warnings in tests 2011-11-30 18:57:12 +03:00
José Valim
2b96b20f3a Merge pull request #3809 from lest/test-helpers-in-erb
fix warning in tests when using render_erb helper
2011-11-30 07:11:40 -08:00
lest
a985309abc fix warning in tests when using render_erb helper 2011-11-30 18:05:23 +03:00
José Valim
ae53fcc5a7 Merge pull request #3806 from lest/test-helpers-in-erb
Test helpers in erb using erb
2011-11-30 06:47:05 -08:00
lest
e975fe710a test helpers in erb using erb 2011-11-30 17:38:09 +03:00
Jon Leighton
271308cb96 Merge pull request #1915 from bogdan/active_record_map
ActiveRecord::Base.map method for direct select by single column
2011-11-30 01:41:09 -08:00
Bogdan Gusiev
a382d60f6a ActiveRecord::Relation#pluck method 2011-11-30 11:03:00 +02:00
José Valim
38ab982cff Log 'Filter chain halted as CALLBACKNAME rendered or redirected' every time a before callback halts. 2011-11-30 09:53:09 +01:00
José Valim
a6ee246e5c Update sprockets which theoretically fixes the regression we have seen. 2011-11-30 09:53:09 +01:00
José Valim
6093d88ed8 Fixes for using action view template in isolation. 2011-11-30 09:53:09 +01:00
Aviv Ben-Yosef
e3bc1385f1 Fixing incorrect documentation
`path_names` can only be used for affecting `new` and `edit`
2011-11-30 06:55:34 +02:00
Aaron Patterson
d9c2882077 Module#synchronize is deprecated with no replacement. Please use monitor from ruby's standard library. 2011-11-29 15:40:46 -08:00
Aaron Patterson
c606fe2c6f push synchronization in to each method. Reduces method calls and makes
it clear which methods are synchronized.
2011-11-29 15:30:04 -08:00
Aaron Patterson
0e2477b602 Automatic closure of connections in threads is deprecated. For example
the following code is deprecated:

Thread.new { Post.find(1) }.join

It should be changed to close the database connection at the end of
the thread:

Thread.new {
  Post.find(1)
  Post.connection.close
}.join

Only people who spawn threads in their application code need to worry
about this change.
2011-11-29 15:04:41 -08:00
Aaron Patterson
29d2040b29 AbstractAdapter#close can be called to add the connection back to the
pool.
2011-11-29 14:40:37 -08:00
Aaron Patterson
ce3d8d646a Start implementing @reserved_connections in terms of connection leases. 2011-11-29 14:02:59 -08:00
Aaron Patterson
5725e397fe Rename checked_out to more descriptive active_connections 2011-11-29 14:02:59 -08:00
Aaron Patterson
b72b477c37 Use connection lease to determine "checked_out" connections 2011-11-29 14:02:59 -08:00
Aaron Patterson
f866f66b30 expire will set in_use to false 2011-11-29 14:02:58 -08:00
Aaron Patterson
79306de791 last_use is set on connection lease 2011-11-29 14:02:58 -08:00
Aaron Patterson
134cc8f939 Leased connections return false on second lease 2011-11-29 14:02:58 -08:00
Aaron Patterson
9bf8bf82b9 Adapters keep in_use flag when leased 2011-11-29 14:02:58 -08:00
Aaron Patterson
7837574e5b namespace the adapter test 2011-11-29 14:02:58 -08:00
Jon Leighton
3da5fba56a Fix ruby 1.8 compat. const_defined? only takes a second arg on 1.9. 2011-11-29 20:43:05 +00:00
Jon Leighton
8df787d428 Deprecated define_attr_method in ActiveModel::AttributeMethods
This only existed to support methods like `set_table_name` in Active
Record, which are themselves being deprecated.
2011-11-29 20:13:37 +00:00
Jon Leighton
f3c84dc316 Deprecate set_locking_column in favour of self.locking_column= 2011-11-29 20:13:37 +00:00
Jon Leighton
1a474cc8e4 Deprecate set_primary_key in favour of self.primary_key= 2011-11-29 20:13:37 +00:00
Jon Leighton
4aad289428 Make sure the original_foo accessor still works (but deprecated) if we are using self.foo= 2011-11-29 20:13:37 +00:00