Josh Kalderimis
5170d210e8
correction to the outputted controller name in the diagnostics error template, test included
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-03-24 19:43:48 -03:00
Josh Susser
5214e73850
add #first! and #last! to models & relations
2011-03-24 09:55:51 -07:00
Andrew White
9772de8d45
Fix filter :only and :except with implicit actions
...
The method_name argument is "default_render" for implicit actions
so use the action_name attribute to determine which callbacks to run.
[#5673 state:resolved]
2011-03-23 23:32:44 +00:00
Manfred Stienstra
5da9a74bd3
Add a failing test case for an implicit action with a before filter.
...
Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>
2011-03-23 23:32:44 +00: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
Aditya Sanghi
3a7c7dc73d
Fix test for prepend giving a false positive. [ #5716 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2011-03-23 18:06:30 +01:00
Diego Carrion
a1edbf7206
parse dates to yaml in json arrays
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-03-22 21:09:54 -03:00
Diego Carrion
7004434ad8
test json decoding with time parsing disabled with all backends and respect ActiveSupport.parse_json_times when converting to yaml
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-03-22 21:09:54 -03: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
Dr Nic Williams
ee8ca49414
Update 'Getting Started on Windows' tip to go to one-click Rails Installer
2011-03-22 15:13:55 -07:00
Ryan Bigg
137ff0402a
Caching guide: Capitalize 'Note' so that it's rendered as a proper note
2011-03-23 08:33:06 +11:00
Piotr Sarnacki
e06c448002
Install rb-fsevent gem if ENV[RB_FSEVENT] is set
2011-03-22 19:36:12 +01: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
Prem Sichanugrist
2ddfdba9a0
Do not show optional (.:format) block for wildcard route [ #6605 state:resolved]
...
This will make the output of `rake routes` to be correctly match to the behavior of the application, as the regular expression used to match the path is greedy and won't capture the format part by default
2011-03-22 09:19:40 -07:00
Aaron Patterson
15d3cc21f4
pushing id insertion and prefetch primary keys down to Relation#insert
2011-03-22 09:18:01 -07:00
Ryan Bigg
5a44951186
Querying guide: mention that performing a where on an relation that contains an includes statement will generate a LEFT OUTER JOIN rather than an INNER JOIN or another query
2011-03-22 12:16:15 +11:00
Ryan Bigg
c24e5548fd
Querying guide: mention that performing a where on an relation that contains an includes statement will generate a LEFT OUTER JOIN rather than an INNER JOIN or another query
2011-03-22 12:16:13 +11:00
Aaron Patterson
3378d77b04
use prepared statements to fetch the last insert id
2011-03-21 16:32:13 -07:00
Aaron Patterson
88636f7195
escaping binary data encoding when inserting to sqlite3. Thanks Naruse! [ #6559 state:resolved]
2011-03-21 14:49:07 -07:00
Aaron Patterson
ea8fcfb729
schemas set by set_table_name are respected by the mysql adapter. [ #5322 state:resolved]
2011-03-21 11:20:45 -07:00
Iain Hecker
96b9fc4400
Reapply extensions when using except and only
2011-03-21 10:29:45 -07:00
Aaron Patterson
55bf087da1
SJIS is an alias to Windows-31J in ruby trunk. Use SHIFT_JIS for this test
2011-03-21 10:00:30 -07:00
Gabriel Horner
6c309f04c9
Beef up Rails::Railtie::Configuration docs
2011-03-19 19:53:36 -04:00
José Valim
1413c9b1d5
Improved resolver docs a bit
2011-03-19 16:06:50 -07:00
Chris Kowalik
d76fadbd7d
[action_view] docs for FileSystemResolver
2011-03-20 07:01:47 +08:00
Chris Kowalik
de1fe5e8a7
[action_view] added custom patterns to template resolver
2011-03-20 07:01:46 +08:00
Jon Leighton
6ab65bec61
Merge branch 'master' into nested_has_many_through
2011-03-18 23:15:01 +00:00
Jon Leighton
5b84aebd14
Add order clauses to fix some tests which were failing under 1.8 on oracle and postgres
2011-03-18 23:14:45 +00:00
Paco Guzman
f3666040a0
remove bank line
2011-03-18 11:29:52 +01:00
Santiago Pastorino
445241d713
define_attr_method should be able to define methods that returns nil
2011-03-17 23:17:20 -03:00
Aaron Patterson
4532b39f5f
remove misleading comment
2011-03-17 10:31:12 -07:00
Aaron Patterson
00f0879367
dup strings on return so that in place modifications do not break anything. I am looking at you "compute_table_name"
2011-03-17 10:26:11 -07:00
Santiago Pastorino
c834a751d2
define_attr_method correctly defines methods with invalid identifiers
2011-03-16 21:20:44 -03:00
Santiago Pastorino
fda45f4fc4
Add a define_attr_method test
2011-03-16 21:08:02 -03:00
Santiago Pastorino
5232077517
Add test for define_attr_method using as name an invalid identifier
2011-03-16 21:01:49 -03:00
Santiago Pastorino
cb44e99de4
Add test for define_attribute_method using as name an invalid identifier
2011-03-16 21:01:04 -03:00
Jon Leighton
8aaf3c1e55
Merge branch 'master' into nested_has_many_through
2011-03-16 18:54:51 +00:00
Jon Leighton
9abc94c445
oracle, y u defy me
2011-03-16 18:54:34 +00:00
Josh Kalderimis
0eae625256
fixes an issue with number_to_human when converting values which are less than 1 but greater than -1 [ #6576 state:resolved]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-03-16 15:11:00 -03:00
Nicolas Cavigneaux
3edba71895
Add link to mailing-list
2011-03-16 13:04:39 +01:00
Andrew White
e8458d37c5
Fix typo in assertion message
2011-03-16 10:28:40 +00:00
Manuel Meurer
64fe0d4cba
Remove incorrect comment that a default value of NULL cannot be set with change_column_default.
2011-03-16 11:01:43 +07:00
Norman Clarke
7bd70dcd6c
Add messages to plain assertions.
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-03-15 10:44:14 -03:00
Gabriel Horner
61781d84c1
doc :anchor option for #match in routes
2011-03-15 09:23:17 -04:00