Jon Leighton
1a4bbaf106
Use scoped.first and scoped.last instead of find(:first, ...) and find(:last, ...)
2011-01-30 11:58:07 +00:00
Jon Leighton
1e7cf6c7e9
Try to make fetch_first_or_last_using_find? more readable
2011-01-30 11:58:07 +00:00
Jon Leighton
db503c4142
load_target returns the target
2011-01-30 11:56:41 +00:00
Jon Leighton
aa86420be2
Rename AssociationProxy#loaded to loaded! as it mutates the association
2011-01-30 11:56:41 +00:00
Jon Leighton
de05e2fb15
Abstract load_target conditional logic
2011-01-30 11:56:41 +00:00
Jon Leighton
d392c67d2c
Remove unused methods conditions, sql_conditions and sanitize_sql
2011-01-30 11:56:41 +00:00
Jon Leighton
dbb6fa723e
Don't pass around conditions as strings in ThroughAssociation
2011-01-30 11:56:41 +00:00
Jon Leighton
d85ee50eda
Indent methods under private/protected sections
2011-01-30 11:56:41 +00:00
Jon Leighton
15601c52e7
Let's be less blasé about method visibility on association proxies
2011-01-30 11:56:41 +00:00
Jon Leighton
63c73dd021
We shouldn't be using scoped.scoping { ... } to build associated records, as this can affect validations/callbacks/etc inside the record itself [ #6252 state:resolved]
2011-01-30 11:56:41 +00:00
Mikel Lindsaar
8adfede96e
Merge branch 'fix-gitignore' of https://github.com/telemachus/rails into telemachus-fix-gitignore
2011-01-30 00:06:03 +11:00
Philip Arndt
99f751ffef
Test non zero exit code and that a message still appears when generating inside an existing Rails directory.
2011-01-29 16:51:42 +08:00
Philip Arndt
a812cb6707
Dir.chdir is not useful in this test, that was for another one I am planning to do.
2011-01-29 16:51:41 +08:00
Philip Arndt
34fef7e258
Added test to ensure non zero exit codes when generating an application with a reserved name.
...
Unfortunately, I can't find out how to suppress its output so we see ....Invalid application name test. Please give a name which does not match one of the reserved rails words.....................................
2011-01-29 16:51:41 +08:00
Philip Arndt
d6fd5821da
Exit with non-zero to signal failure.
2011-01-29 16:51:40 +08:00
Philip Arndt
e0b16debd1
Use exit(1) instead of exit(false)
2011-01-29 16:51:40 +08:00
Philip Arndt
dcc72b2079
Use Thor's self.exit_on_failure? to exit whenever accessing the generators from the CLI and a Thor::Error is raised.
2011-01-29 16:51:39 +08:00
Philip Arndt
36f570dbd2
Apply exit code 1 when commands don't succeed so that other libraries can properly detect the failure.
2011-01-29 16:51:38 +08:00
Aaron Patterson
740bc35d32
always return the identity function from type_cast_code
2011-01-28 18:04:22 -08:00
Aaron Patterson
72c1818941
use an identity conversion to avoid conditional codes
2011-01-28 17:39:38 -08:00
Alexey Nayden
fa779c5357
Fixing incorrectly writtent testcase
2011-01-28 15:06:02 -08:00
Alexey Nayden
e92c2ffd8e
Nested attributes and in-memory changed values #first and #[] behaviour consistency fix
2011-01-28 15:06:01 -08:00
Alexey Nayden
2884482c34
test_first_and_array_index_zero_methods_return_the_same_value_when_nested_attributes_are_set_to_update_existing_record added
2011-01-28 15:06:01 -08:00
Aaron Patterson
c87fb22a06
make sure we play nicely when syck is activated
2011-01-28 15:00:52 -08:00
brainopia
eb33bd944d
Psych correctly gets visitor for SafeBuffer from superclass
2011-01-28 14:32:53 -08:00
brainopia
452dba72f5
Remove unneeded yaml_as declaration
2011-01-28 14:31:36 -08:00
Aaron Patterson
c29eef7da7
load psych by default if possible
2011-01-28 14:24:11 -08:00
Santiago Pastorino
e19a7729d1
Bump mail version up
2011-01-28 17:45:11 -02:00
Neeraj Singh
806e6f80dc
render_to_string must ensure that response_body
...
is nil
[ #5875 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2011-01-25 20:14:03 +01:00
Neeraj Singh
c1145d9281
If I want to set respond_body to nil then it
...
should be nil and not [nil]. If anything other
than nil then wrap it in array
Signed-off-by: José Valim <jose.valim@gmail.com >
2011-01-25 20:13:56 +01:00
Doug Fales
7927fc2ff7
A patch so that http status codes are still included in logs even during an exception [ #6333 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2011-01-25 20:12:22 +01:00
Aaron Patterson
59f3218463
load and prefer psych as the YAML parser when it is available
2011-01-21 17:53:28 -08:00
Aaron Patterson
3d6e223b84
use spec compliant YAML
2011-01-21 15:43:34 -08:00
Aaron Patterson
b5cc277763
psych does not emit a space after the tag
2011-01-21 15:13:30 -08:00
Aaron Patterson
370bcd1a01
use ! " " YAML string literal syntax rather than removing both quotes
2011-01-21 14:09:59 -08:00
Aaron Patterson
7642b7531d
prefering psych as the yaml parser if possible, fixing assertions for YAML 1.1 compatibility
2011-01-21 11:16:40 -08:00
Aaron Patterson
2570c85cb7
fixing psych support in big decimal, fixing tests to support YAML 1.1
2011-01-21 11:16:40 -08:00
brainopia
8491f16e12
Add tld_length option when using domain :all in cookies
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2011-01-21 13:13:51 +01:00
brainopia
91a4193ee0
Support list of possible domains for cookies
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2011-01-21 13:13:43 +01:00
Xavier Noria
02319b7982
Merge branch 'master' of github.com:rails/rails
2011-01-20 10:34:17 +01:00
Xavier Noria
236f1f52cd
Merge branch 'master' of git://github.com/lifo/docrails
2011-01-20 10:33:38 +01:00
Jamis Buck
bc9b1075ae
Revert "make TestCaseTest work for pre-1.9 rubies, too"
...
This reverts commit 7938039548 .
2011-01-19 15:55:32 -07:00
Jamis Buck
1de1dc02d7
Revert "scrub instance variables from test cases on teardown"
...
This reverts commit 79a06225ef .
2011-01-19 15:55:30 -07:00
Jamis Buck
41f76946d0
Revert "rein in GC during tests by making them run (at most) once per second"
...
This reverts commit 16a23a184e .
2011-01-19 15:55:23 -07:00
José Valim
262b2ea8cd
Solve SystemStackError when changing locale inside ActionMailer [ #5329 state:resolved]
2011-01-19 23:42:10 +01:00
Frank Fischer
b247f39442
Added a testcase for bug [ #5329 ]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2011-01-19 23:24:57 +01:00
Tobias Bühlmann
94e0f1db1c
use name instead of title in example
2011-01-19 22:03:54 +01:00
Matt Buck
2373eedc88
Make all references to engines lowercase in docs.
2011-01-19 14:30:28 -06:00
Jamis Buck
16a23a184e
rein in GC during tests by making them run (at most) once per second
...
this can provide a significant performance boost during testing, by
preventing the GC from running too frequently.
2011-01-19 10:57:30 -07:00
Jamis Buck
79a06225ef
scrub instance variables from test cases on teardown
...
this prevents test state from accumulating, resulting in leaked
objects and slow tests due to overactive GC.
2011-01-19 10:57:23 -07:00