Commit Graph

5692 Commits

Author SHA1 Message Date
Xavier Noria
3e24e9ebc2 Merge branch 'master' of git://github.com/lifo/docrails 2011-04-03 22:22:03 +02:00
Akira Matsuda
bd3cdeea35 s/ERb/ERB/g
The author of ERB sais, his eRuby implementation was originally named "ERb/ERbLight" and then renamed to "ERB" when started bundled as a Ruby standard lib.
http://www2a.biglobe.ne.jp/~seki/ruby/erb.html
2011-04-03 12:47:51 +09:00
Santiago Pastorino
99da42c299 Gem::Specification#has_rdoc= is deprecated since rubygems 1.7.0 2011-04-02 00:35:33 -03:00
Ryan Bigg
cf07da0929 Symbol to proc is preferred over longer form of map 2011-03-31 06:59:48 +11:00
Ryan Bigg
04d5decfd3 Cleanup of named_scope documentation 2011-03-31 06:48:05 +11:00
Ryan Bigg
7a34ab7d60 Fix typo in named_scope documentation 2011-03-31 06:48:05 +11:00
Eadz
6a1715111e add space to conform with style 2011-03-31 06:48:05 +11:00
Eadz
45d5d6b268 Documented undocumented feature: Class methods on your model are automatically available on scopes 2011-03-31 06:48:05 +11:00
Aaron Patterson
cfb6f77ac0 TableAlias leg ordering has changed, so change accordingly 2011-03-30 09:54:46 -07:00
Aaron Patterson
2be383b946 test against AR class rather than the relation (thanks Andrew White!) 2011-03-29 17:50:39 -07:00
Aaron Patterson
0471fc9f1c Merge branch 'master' into zomg
* master: (51 commits)
  order is not guaranteed by this select, so add an order and call first!
  oracle stores this with microseconds, so convert to seconds before comparing
  make sure that active connections are not cleared during test when an exception happens
  clearing active connections in the ConnectionManagement middleware if an exception happens
  proxy body responses so we close database connections after body is flushed
  Pass the proper method_name instead of hardcoding to action_name.
  Quote find_in_batches ORDER BY clause [#6620 state:resolved]
  Delegate first!, last!, any? and many? to scoped
  Dont call authenticate_or_request_with_http_basic twice
  Remove 'warning: ambiguous first argument' when running ActionPack tests
  Change exists? so that it doesn't instantiate records [#6127 state:resolved]
  Move mapper_test to the appropriate location
  Update the wildcard route to be non-greedy by default, therefore be able to match the (.:format) segment [#6605 state:resolved]
  Fix examples
  Added Base.http_basic_authenticate_with to do simple http basic authentication with a single class method call [DHH]
  make sure we have an active database connection before running each connection management test
  adding active_connections? to the connection pool for finding open connections
  adding active_connection? to the connection pool
  testing app delegation from the ConnectionManagement middleware
  namespacing connection management tests. ❤️
  ...
2011-03-29 17:38:43 -07:00
Aaron Patterson
58becf1165 order is not guaranteed by this select, so add an order and call first! 2011-03-29 17:27:32 -07:00
Aaron Patterson
6067d29a1f oracle stores this with microseconds, so convert to seconds before comparing 2011-03-29 17:09:22 -07:00
Aaron Patterson
c7b7c6ad1c make sure that active connections are not cleared during test when an exception happens 2011-03-29 15:47:16 -07:00
Aaron Patterson
3b2a032677 clearing active connections in the ConnectionManagement middleware if an exception happens 2011-03-29 15:42:32 -07:00
Aaron Patterson
e5246092d1 proxy body responses so we close database connections after body is flushed 2011-03-29 15:37:07 -07:00
Andrew White
555d016389 Quote find_in_batches ORDER BY clause [#6620 state:resolved] 2011-03-29 17:24:55 +01:00
Andrew White
a9dafbb28d Delegate first!, last!, any? and many? to scoped 2011-03-29 17:21:21 +01:00
Andrew White
b155fdadf3 Change exists? so that it doesn't instantiate records [#6127 state:resolved] 2011-03-29 12:51:58 +01:00
ozzyaaron
d5dc02b5e8 Added back the Callback debugging section by interrogating the _*_callbacks method 2011-03-29 11:22:16 +08:00
Aaron Patterson
aea1477362 make sure we have an active database connection before running each connection management test 2011-03-28 17:47:46 -07:00
Aaron Patterson
25f94971ab adding active_connections? to the connection pool for finding open connections 2011-03-28 17:29:37 -07:00
Aaron Patterson
4211866b7a adding active_connection? to the connection pool 2011-03-28 16:43:34 -07:00
Aaron Patterson
ec0cacc293 testing app delegation from the ConnectionManagement middleware 2011-03-28 16:22:37 -07:00
Aaron Patterson
7b4866e0ae namespacing connection management tests. ❤️ 2011-03-28 16:08:42 -07:00
Aaron Patterson
e1a5007207 sql logger ignores schema statements 2011-03-28 15:27:37 -07:00
Sebastian Martinez
fb21511040 Bring #reorder back
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-03-28 10:24:08 -03:00
Sebastian Martinez
245542ea29 Added new #update_column method.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-03-27 21:47:38 -03:00
Sebastian Martinez
0e1fed537a Revert "Removed #update_attribute method. New #update_column method."
This reverts commit 45c233ef81.

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-03-27 18:55:30 -03:00
Aaron Patterson
a9d27c04ab cleaning up typecast test a little 2011-03-26 17:16:33 -07:00
Aaron Patterson
5013fe3a1d refactoring tz to a variable rather than repeating it 2011-03-26 17:04:54 -07:00
Aaron Patterson
dea3d2dd20 adding a test for attributes after type cast. thanks nragaz. ❤️ 2011-03-26 11:50:31 -07:00
Sebastian Martinez
45c233ef81 Removed #update_attribute method. New #update_column method.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-03-26 12:09:04 -03:00
Xavier Noria
9d9b873b95 removes unnecessary selfs, and mentions that first! and last! take no arguments in their API docs 2011-03-26 00:02:40 +01:00
Pratik Naik
25be204e3c No arguments for first! and last! 2011-03-25 22:30:36 +00:00
Josh Susser
65dce01091 comment typo fix 2011-03-25 12:28:37 -07:00
Aaron Patterson
7333f50abc fixing whitespace errors. 💣 2011-03-25 12:10:11 -07:00
John Mileham
28c73f0123 Use Arel to build subquery. Adapt tests to changed fixtures. 2011-03-24 15:09:24 -04:00
John Mileham
b44a0ec153 Merge branch 'master' of github.com:rails/rails into count_behavior 2011-03-24 15:03:08 -04:00
Josh Susser
5214e73850 add #first! and #last! to models & relations 2011-03-24 09:55:51 -07:00
Adam Meehan
c5908a8649 Fix before_type_cast for timezone aware attributes by caching converted value on write. Also remove read method reload arg on timezone attributes. 2011-03-23 15:38:51 -07:00
Murray Steele
54c963c89b Make clearing of HABTM join table contents happen in an after_destory callback.
The old method of redefining destroy meant that clearing the HABTM join table would happen as long as the call to destroy succeeded.  Which meant if there was a before_destroy that stopped the instance being destroyed using normal means (returning false, raising ActiveRecord::Rollback) rather than exceptional means the join table would be cleared even though the instance wasn't destroyed.  Doing it in an after_destroy hook avoids this and has the advantage of happening inside the DB transaction too.
2011-03-23 14:45:21 -07:00
Murray Steele
8ee81d21fb Failing test case to show that habtm join table contents are removed when a model is destroyed but the destruction is blocked by a before_destroy. 2011-03-23 14:45:21 -07:00
Xavier Noria
3b91b3726d Merge branch 'master' of git://github.com/lifo/docrails 2011-03-23 21:52:33 +01:00
Santiago Pastorino
450f7cf01b use class_eval with a string when it's possible 2011-03-22 20:11:36 -03:00
Santiago Pastorino
baa237c974 Allow to read and write AR attributes with non valid identifiers 2011-03-22 20:02:32 -03:00
Santiago Pastorino
da6c7bd4b4 Do not in place modify what table_name returns 2011-03-22 19:36:16 -03:00
Aaron Patterson
ed97c39517 adding missing require 2011-03-22 10:10:33 -07:00
Aaron Patterson
2ef6270f8f Merge branch 'master' into fuuu
* master:
  Do not show optional (.:format) block for wildcard route [#6605 state:resolved]
  pushing id insertion and prefetch primary keys down to Relation#insert
  use prepared statements to fetch the last insert id
  escaping binary data encoding when inserting to sqlite3. Thanks Naruse! [#6559 state:resolved]
  schemas set by set_table_name are respected by the mysql adapter. [#5322 state:resolved]
  Reapply extensions when using except and only
  SJIS is an alias to Windows-31J in ruby trunk. Use SHIFT_JIS for this test
  Improved resolver docs a bit
  [action_view] docs for FileSystemResolver
  [action_view] added custom patterns to template resolver
2011-03-22 09:34:33 -07:00
Aaron Patterson
15d3cc21f4 pushing id insertion and prefetch primary keys down to Relation#insert 2011-03-22 09:18:01 -07:00