Michael Koziarski
a43ef2436c
Prepare for 2.3.4 release
2009-09-04 09:56:09 +12:00
Michael Koziarski
9a68c72b4b
Clean tag attributes before passing through the escape_once logic.
...
Addresses CVE-2009-3009
2009-09-04 09:26:13 +12:00
Manfred Stienstra
07c69380cf
Add verify and clean methods to ActiveSupport::Multibyte.
...
When accepting character input from outside of your application you can't
blindly trust that all strings are properly encoded. With these methods
you can check incoming strings and clean them up if necessary.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-09-04 09:26:13 +12:00
Coda Hale
1f07a89c59
Fix timing attack vulnerability in ActiveSupport::MessageVerifier.
...
Use a constant-time comparison algorithm to compare the candidate HMAC with the calculated HMAC to prevent leaking information about the calculated HMAC.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-09-04 09:26:13 +12:00
Jeremy Kemper
2b82708b0e
Revert "Assert primary key does not exist in habtm when the association is defined, instead of doing that everytime a record is inserted."
...
Test failures on PostgreSQL.
[#3128 ]
This reverts commit 594a281d66 .
2009-09-02 13:57:33 -07:00
José Valim
594a281d66
Assert primary key does not exist in habtm when the association is defined, instead of doing that everytime a record is inserted.
...
[#3128 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-01 10:18:47 -07:00
Geoff Buesing
6bf17770af
Rails::Info doesn't require version for unwanted frameworks
...
[#3124 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-01 02:29:46 -07:00
Joshua Peek
6fdfe4cb5f
Deprecated "best fit" detection is to difficult. Just provide a switch to toggle the new behavor on.
...
# new_rails_defaults.rb
ActionController::Routing.generate_best_match = false
2009-08-31 16:09:47 -05:00
Jay Pignata
49c4a79e59
Duplicating the options hash in Date#advance to prevent modification of the original [ #1133 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-08-31 13:01:34 -05:00
Antonio Tapiador del Dujo
49342d1745
I18n support for plugins
...
Rails will now automatically add locale files found in any engine's locale
directory to the I18n.load_path (i.e. files that match the glob pattern
"config/locales/**/*.{rb,yml}" relative to engine directories).
[#2325 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-30 13:38:10 -07:00
Jay Pignata
ff8cb50f25
Ensuring that a singular model name is set for use in controllers when scaffold is passed a plural model name
...
[#3062 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-30 13:31:16 -07:00
Chad Woolley
70ed47f5b4
CI config updates: do not send CI emails unless explicitly enabled, use 'gem update --system', and send emails from an address which can post to the core list
...
[#3116 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-30 00:06:39 -07:00
Sven Fuchs + Mateo Murphy
13fb26b714
Fix ActiveRecord Error message I18n:
...
* allow messages and full_messages to be lazily translated at any time
* allow locales to be swapped and still obtain correctly localized messages
* allow localized global and error-type specific full_message formats
* extract an Error class
[#1687 state:open]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-29 09:48:16 -07:00
Jeremy Kemper
05d7409ae5
Prefer utf8_unicode_ci (better) over utf8_general_ci (faster)
2009-08-27 23:09:21 -07:00
Jeffrey Hardy
058459dc22
When running multiple test tasks, don't abort early if one produces failures
...
[#3107 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-27 11:17:25 -07:00
Jeffrey Hardy
8a49183563
Don't use AR::Base.connection for fixture column quoting. Use the connection given to Fixtures.new
...
[#3104 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-26 14:53:32 -07:00
Jeffrey Hardy
4240890b28
UrlRewriter#rewrite_url should call #to_param on the value given in :anchor option, just as #url_for does
...
[#2746 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-26 14:11:39 -07:00
Akira Matsuda
e46e67c71f
I18n: use I18n for select helpers' prompt text
...
[#2252 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-26 13:56:15 -07:00
Jeremy Kemper
3cd245b7fa
Revert "I18n: use I18n for select helpers' prompt text"
...
Broke CI.
[#2252 state:open]
This reverts commit d725ad39da .
2009-08-26 12:12:04 -07:00
Sven Fuchs
a4838ee466
allow ActiveRecord#RecordInvalid exception message to be localized
...
[#2754 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-26 11:23:30 -07:00
Akira Matsuda
d725ad39da
I18n: use I18n for select helpers' prompt text
...
[#2252 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-26 09:39:01 -07:00
Jeremy Kemper
e213f0caaa
Fix typo
2009-08-25 13:43:20 -07:00
Emilio Tagua
38d6e65c5a
timestamps gives a created_at field not created_on.
...
[#3093 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-25 13:43:14 -07:00
Jeremy Kemper
f1355e6a4d
Benchmark script via miloops' arel fork via DataMapper's AR comparison script
2009-08-25 13:43:03 -07:00
Jeremy Kemper
d6a944f778
Add active_support/all for forward compatibility.
2009-08-23 17:18:23 -07:00
Mike Gunderloy
9127c5b7f5
Fix trivial typo in template runner example [ #3082 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-20 13:35:21 +01:00
David Heinemeier Hansson
f3c7bbeedd
Added db/seeds.rb as a default file for storing seed data for the database. Can be loaded with rake db:seed (or created alongside the db with db:setup). (This is also known as the "Stop Putting Gawd Damn Seed Data In Your Migrations" feature) [DHH]
...
Conflicts:
railties/CHANGELOG
2009-08-18 16:08:50 +01:00
Pratik Naik
b9f668ea94
Deprecate SQLite2Adapter and DeprecatedSQLiteAdapter
2009-08-17 14:49:31 +01:00
Jeremy Kemper
d8ae3d5a8b
2-3-stable CI notifies rails core list
2009-08-15 20:31:02 -07:00
Jeremy Kemper
1cb433ce78
Bump pg gem requirement to 0.8.0. Build psql db with UTF8 encoding.
2009-08-15 19:04:16 -07:00
Hongli Lai (Phusion)
14b6ab0f01
Fix reloading of metal pieces.
...
- Do not hold references to old metal objects after metal classes have been reloaded.
- Obtain the reloader lock before building the middleware stack, so that reloading of metal pieces works in the face of multithreading.
[#2873 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-15 18:00:49 -07:00
Jay Pignata
1cf32ad35a
Adding a call to logger from params_parser to give detailed debug information when invalid xml or json is posted
...
[#2481 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-15 16:46:43 -07:00
Jeremy Kemper
75a483e18e
Normalize route generation order: associations, yield block, then own routes.
2009-08-15 15:58:20 -07:00
Jeremy Kemper
061b0ba6cb
Refine the deprecated route check to explicitly check whether the future route pick comes before the deprecated route that was found.
2009-08-15 15:53:45 -07:00
Jatinder Singh
dbc62ad225
Fix ActiveResource load test for 64bit machines [ #3051 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-15 19:57:22 +01:00
Jay Pignata
a249cad5ef
Fix calculation tests on sqlite2 [ #3053 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-15 19:52:08 +01:00
Jay Pignata
dad0f62dc9
Fix test_has_many_through_polymorphic_has_one on sqlite2 [ #3054 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-15 19:27:35 +01:00
Jeremy Kemper
6f5d1f3190
'would of' => 'will be'
2009-08-11 01:25:15 -05:00
Bryan Helmkamp
e82b43599e
Allow delegating to nil, because the method might actually exist on it
2009-08-10 18:49:37 -05:00
Hongli Lai (Phusion)
a91969803e
Correctly unlock the reloader lock if the underlying app raises an exception.
...
[#2873 state:incomplete]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-10 16:18:35 -05:00
Kamal Fariz Mahyuddin
9284bcc35a
find_cmd should return the full path of the db command
...
[#1488 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-10 00:04:51 -07:00
codeape
9a42096e95
Introduce grouped_collection_select helper.
...
[#1249 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-10 00:00:02 -07:00
Erik Ostrom
4e014379a3
Correctly handle offsets in Multibyte::Chars#index and #rindex.
...
The offset in codepoints was being passed directly to the wrapped string's index/rindex method. Now we translate the offset into bytes first.
[#3028 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 23:32:08 -07:00
Cristi Balan
25fe43bc14
Add tests for scoping schema_migrations index by global table prefix and suffix
...
[#1543 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 22:58:35 -07:00
Tim Peters
9e96f37edd
Use table prefix and suffix for schema_migrations index.
...
[#1543 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 22:57:37 -07:00
Fabien Jakimowicz
c3da22c042
Add support for errors in JSON format.
...
[#1956 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 22:41:56 -07:00
Daniel Sheppard
9341655fa3
Fix that JSON parser fails to read escaped backslashes.
...
[#973 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 22:32:13 -07:00
Leonardo Borges
5c74cffae6
PostgreSQL: XML datatype support
...
[#1874 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 22:26:26 -07:00
Jaime Bellmyer
9d51f62866
raises an exception on habtm join table inserts if join table contains a primary key. Caches this check to save time on subsequent inserts.
...
[#2086 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 22:20:02 -07:00
Jaime Bellmyer
9a3a7983c3
raises exception (ActiveRecord::ConfigurationError with message) on habtm association creation if join table contains a primary key
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 22:19:56 -07:00
José Valim
e972acc0d7
Allow radio buttons to work with booleans.
...
[#2937 state:committed]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 22:15:35 -07:00
Morgan Schweers
d0bdff0799
Fix that creating a table whose primary key prefix type is :table_name generates an incorrectly pluralized primary key.
...
[#872 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 21:59:08 -07:00
Jeremy Kemper
011baa0f65
Fix test dependency on taggings
2009-08-09 21:31:22 -07:00
Gabe da Silveira
9bc80f4dd1
Fix that counter_cache breaks with has_many :dependent => :nullify.
...
[#1196 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 21:31:13 -07:00
Jatinder Singh
8a49af3158
AR should respect default values for MySQL BINARY and VARBINARY columns.
...
[#1273 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 21:05:29 -07:00
Joshua Peek
ff643ce967
Deprecate router generation "best match" sorting
2009-08-09 22:52:14 -05:00
Joshua Nichols
ebb6606a4d
Only load db/schema.rb if it exists; otherwise, display a message to run db:migrate or remove active_record in environment.rb.
...
[#3012 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 20:19:31 -07:00
Joshua Nichols
15fd67e9d8
Backported XML serialization behavior from master for dealing with root nodes that have modules.
...
ie,
- the root node is dasherized, such that MyApplication::Business::Project becomes <my-application-project-business-project>
- association children nodes have type attributes, such that MyApplication::Business::Developer becomes <developer type="MyApplication::Project::Developer">
[#2723 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 20:13:42 -07:00
Dan Croak
33c054d7e0
has_many :through create should not raise validation errors
...
[#2934 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 18:47:25 -07:00
jeem
cc3183d4be
make private_and_public_methods unmemoizable [ #2372 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-08-09 20:04:15 -05:00
Max Lapshin
9e29c084eb
Make sure link_to generates the form with the specified :href if any [ #2254 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-10 01:00:07 +01:00
Visnu Pitiyanuvath
ecc9b705d7
Allow ho:through#build when the owner is a new record [ #1749 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-10 00:49:51 +01:00
Tristan Dunn
491f1b5f36
Prevent overwriting of table name in merging SQL conditions [ #2949 state:resolved]
2009-08-10 00:41:53 +01:00
Gabe da Silveira
b763858ed5
Enable has_many :through for going through a has_one association on the join model [ #2719 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-10 00:34:32 +01:00
Arthur Zapparoli
9bcacf4962
Removed duplicated tests [ #3026 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-10 00:08:50 +01:00
Arthur Zapparoli
18b4ac6992
Model#human_attribute_name now accept symbols [ #3025 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-09 23:56:18 +01:00
Matt Duncan
ba961250bd
Fixed to_label_tag to accept id attribute without changing for attribute [ #2660 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-09 23:56:06 +01:00
Grzegorz Forysinski
59c3b0d0de
Ensure ActiveResource#load works with numeric arrays [Grzegorz Forysinski, Elad Meidar]
...
[#2305 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 23:40:06 +01:00
Jordan Brough
be017fd7d5
Active Resource recognizes 410 as Resource Gone now [ #2316 state:resolved] [Jordan Brough, Jatinder Singh]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
Conflicts:
activeresource/lib/active_resource/exceptions.rb
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 23:33:11 +01:00
Vladimir Meremyanin
93f5d9d5f0
Make sure association conditions work with :include and :joins [ #358 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 23:10:34 +01:00
Tristan Dunn
7908cfabf7
No longer require database name for MySQL to allow cross database selects.
...
[#1122 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 14:36:51 -07:00
Hugo Peixoto
39de15f136
Added both the documentation and a test case for the collection path name customization feature.
...
[#1218 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 14:27:04 -07:00
Bence Nagy
250e718355
path_names could be used to customize collection actions too
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 14:27:04 -07:00
Jatinder Singh
323f58f19f
Make ActiveResource#exists? work [ #3020 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 22:25:20 +01:00
Joshua Nichols
29a5549b34
Added back support for destroying an association's object by id. [ #2306 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-09 21:47:06 +01:00
David Burger
c9d4bcf163
Fix that Hash#to_xml and Array#to_xml shouldn't modify their options hashes [ #672 state:resolved] [David Burger, Dana Jones]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 21:47:06 +01:00
Hugo Peixoto
2c4f4a8734
With multiparameter date attributes, the behaviour when empty fields are present is now coherent with the one described in the date_select documentation.
...
[#1715 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 13:39:31 -07:00
Roy Nicholson
de0b073f3e
Add ability to set SSL options on ARes connections.
...
[#2370 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 13:23:48 -07:00
Elise Huard
f6f04f1549
validate uniqueness with limit in utf8
...
[#2653 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 12:53:09 -07:00
Hugo Peixoto
a8286af3c3
Added a uniqueness validation test that uses diacritics.
...
[#2883 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 11:56:16 -07:00
Jeremy Kemper
d44b5c6219
Fix that RedCloth shouldn't be required to run tests
2009-08-09 11:02:45 -07:00
Simon Jefford
c41fb5865f
Add test for routes_for_controller_and_action deprecation [ #3023 ]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 18:26:22 +01:00
Dan Croak
8058a1d7d7
Deprecation warning for routes_for_controller_and_action. Use routes_for instead. [ #3023 ]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 18:01:54 +01:00
Matt Conway
d3a802cee0
Allow connect_timeout, read_timeout and write_timeout settings for MySQL [ #2544 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 17:15:40 +01:00
railsbob
80d8608102
Ensure hm:t#find does not assign nil to :include [ #1845 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 17:03:38 +01:00
rizwanreza
d1202cfeb2
Support passing Redcloth options via textilize helper [ #2973 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 16:42:50 +01:00
Mike Breen
8056c57a94
Serialized attributes should only be saved with partial_updates when the serialized attribute is present [ #2397 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 16:36:54 +01:00
Hugo Peixoto
5e4b946927
Fixed the end_of_* to work with Time.usec (and Time.nsec in ruby1.9) [ #1225 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-09 16:11:55 +01:00
Hugo Peixoto
5f6623b1b4
added tests for namespaced models generation and fixed a bug related to it. Also fixed a pluralization=false issue.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-09 16:11:42 +01:00
Michael Siebert
4c96030d05
Fix deprecating =-methods by using send [ #2431 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-09 16:11:36 +01:00
José Valim
2d2216fadb
Make http digest work with different server/browser combinations. [ #3006 status:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 16:11:27 +01:00
Dmitry Ratnikov
32c23552f5
Changed to use klass instead of constantizing in assign_ids generated method
...
[#260 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 02:51:39 -07:00
Jeremy Kemper
83cc7de2a4
Setting connection timeout also affects Net::HTTP open_timeout.
...
[#2947 state:resolved]
2009-08-09 02:28:27 -07:00
Yehuda Katz
ee8fe3ae4e
Update bench harness in 2.3 to match master output
2009-08-09 05:45:44 -03:00
Yehuda Katz
3cad1df22e
Benchmarks
2009-08-09 05:45:44 -03:00
Yehuda Katz
7d40ba1cbf
Added benchmark to 2-3
2009-08-09 05:45:44 -03:00
Rich Bradley
0b95a2afab
Fix for nested :include with namespaced models.
...
[#260 state:committed]
2009-08-09 00:31:05 -07:00
Tristan Dunn
9aa9bad024
Don't define a default primary key in the schema dumper.
...
[#1908 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-08 19:32:03 -07:00
Rob
a25296ab05
Fix binary fixture test on Windows
...
[#2597 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-08 19:18:54 -07:00
Hugo Peixoto
ac9f9a9c3e
MySQL: fix diacritic uniqueness test by setting the default character set and collation to utf8/utf8_unicode_ci
...
[#2883 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-08 19:04:05 -07:00
Michael Koziarski
796b7c6ce6
Don't call additional methods on builders passed to the atom_feed helper.
...
Additionally, actually test that the atom_feed helper works with :xml as an option.
[#1836 state:committed]
2009-08-09 13:09:24 +12:00
Marc-Andre Lafortune
819c347f43
Enumerable#sum now works will all enumerables, even if they don't respond to :size
...
[#2489 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-08 17:51:34 -07:00
Matt Duncan
407fbb5090
Adding :from scoping to ActiveRecord calculations
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-08-09 12:42:47 +12:00
Jan Schwenzien
389449d9ae
Fix HTTP basic authentication for long credentials [ #2572 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 01:28:07 +01:00
Nick Quaranto and Josh Nichols
d39c45690e
Adding a deprecation warning for output.flush when rendering a proc or lambda
...
[#2893 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-08 17:23:40 -07:00
Steve St. Martin
679a0bf17f
Update truncate documentation / examples to more clearly demonstrate its actual behavior
...
[#3016 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-08 17:13:15 -07:00
Michael Koziarski
cd5e784389
Depend on rubygems 1.3.2
...
Also move the min_version definition up a line so it's present in the rescue block down below.
2009-08-09 11:13:12 +12:00
Marshall Huss
791c388039
HTTP proxy support
...
[#2133 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-08 15:35:59 -07:00
Jeremy Kemper
ab6d295ce4
Fix caller in assert_redirected_to deprecation warning.
...
[#2932 state:committed]
2009-08-08 14:45:45 -07:00
Emilio Tagua
6843fb9265
Fix models load order to be able to run unit tests.
...
[#2550 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-08 22:29:35 +01:00
Josh Sharpe
9aaeb18781
Tidy up the AR tests, removing duplicates and making tests clearer / more focussed.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2774 state:committed]
2009-08-08 14:52:16 +12:00
Mike Breen
1c6c216d91
Add option to routes task to target a specific controller with CONTROLLER=x.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2928 state:committed]
2009-08-08 14:39:00 +12:00
Matt Duncan
f73d34c131
Default sent_on time to now in ActionMailer
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2607 state:committed]
2009-08-08 14:10:46 +12:00
Brendan Schwartz
e1d27eedce
Ruby 1.9 compat: fix for SSL in Active Resource
...
[#1272 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-07 12:25:13 -07:00
Jeremy Kemper
4b33155428
Merge branch '2-3-stable' of git@github.com:rails/rails into 2-3-stable
2009-08-05 17:09:43 -07:00
Akira Matsuda
8dab61d146
Ruby 1.9.2 compat: Array#* uses to_str instead of to_s to join values since Ruby 1.9.2
...
[#2959 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-05 17:09:20 -07:00
rick
55501b9f6a
move the serialized AR record logic to #as_json. Leave ActiveRecord::Base#to_json to use the same Object#to_json implementation, but keep it around for documentation purposes.
2009-08-05 16:27:02 -07:00
Sven Fuchs
5a0e295911
Make app template git adapter sync back output immediately by using system() instead of backticks [ #2047 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-05 19:40:11 +01:00
Michael Koziarski
95db8aaa5f
Run the view tests too
2009-08-05 18:42:56 +12:00
Sven Fuchs
bf00de03de
Stop messing with supposedly-deprecated interpolation placeholders when no interpolation values have been passed.
...
[#2885 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-01 20:51:15 -07:00
Jeremy Kemper
6cbcfffeb1
Ruby 1.9: fix reloader tests using lambdas with no env arg
2009-08-01 20:18:22 -07:00
Jeremy Kemper
f09ceb55c0
Ruby 1.9: fix encoding for test_file_stream
2009-08-01 20:17:30 -07:00
Sava Chankov
dc559f274f
Ruby 1.9: fix Content-Length for multibyte send_data streaming
...
[#2661 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-01 20:07:12 -07:00
Jeremy Kemper
7244425b93
Extract String#bytesize shim
2009-08-01 19:52:00 -07:00
Jeremy Kemper
21029451d7
Fix errant require
2009-08-01 19:50:54 -07:00
Jeremy Kemper
32cfd4c2f8
SQLite: deprecate the 'dbfile' option in favor of 'database.'
2009-08-01 18:22:32 -07:00
Hongli Lai (Phusion)
d37ac7958f
Make the new code reloading behavior work with multithreaded environments such as Mongrel.
...
[#2948 state:incomplete]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-01 13:25:38 -07:00
Jeremy Kemper
17f336e2f0
Revert "Methods invoked within named scope Procs should respect the scope stack. [ #1267 state:resolved]"
...
This reverts commit 6a13376525 .
Conflicts:
activerecord/test/cases/named_scope_test.rb
2009-07-29 16:53:49 -07:00
Ross Kaffenburger and Bryan Helmkamp
523f3ba8da
Don't check authenticity tokens for any AJAX requests
2009-07-27 23:15:35 +01:00
Luke Melia
60122e81a3
Avoid loading the ActiveRecord::SessionStore class on initialization if it is not in use [ #2737 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-07-27 23:13:56 +01:00
Sebastian Delmont
ead5d88bf1
Fix filter_parameter_logging of non-hash values within array params
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2927 state:committed]
2009-07-23 09:33:29 +12:00
Michael Koziarski
143c55d325
Memoize cookies so that updates to cookies are available in the current request. [ #2733 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
Conflicts:
actionpack/test/controller/cookie_test.rb
2009-07-22 09:46:53 +12:00
Akira Matsuda
be4d743645
Ruby 1.9.2 compat: name method was renamed to __name__ since MiniTest 1.4.x [ #2922 state:resolved]
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-21 01:17:53 -07:00
Akira Matsuda
7a427a83ca
Ruby 1.9.2 compat: Use File#expand_path for require path because "." will not be included in LOAD_PATH since Ruby 1.9.2 [ #2921 state:resolved]
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-21 01:17:20 -07:00
Michael Koziarski
c7bcbb983f
Forgot to bump the railties versions
2009-07-19 17:27:45 +12:00
Michael Koziarski
a147becfb8
Move from referencing the BlueCloth constant directly, to referencing Markdown.
...
This supports alternative implementations of markdown such as rpeg-markdown or rdiscount, and later releases of bluecloth. There are some performance issues with earlier releases of bluecloth, and you should probably upgrade. In the event that you can't you can place the following code into an initializer:
Markdown = BlueCloth
2009-07-16 13:30:47 +12:00
Szymon Nowak
b3ec7b2d03
Add primary_key option to belongs_to association
...
[#765 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-07-15 18:14:00 -07:00
Joshua Peek
ae85927ea8
Correctly setup the rack gem dependency.
2009-07-12 19:31:41 -05:00
Joshua Peek
f36d9a6758
Go back to depending on Rack 1.0.x gem
2009-07-12 19:28:04 -05:00
Michael Koziarski
18e68d9524
Prepare version numbers, changelogs and gem dependencies for 2.3.3.
2009-07-12 15:43:39 +12:00
Michael Koziarski
6a50d6c8e3
Match tests with new reloading behaviour
2009-07-08 17:30:33 +12:00
Hongli Lai (Phusion)
bc2c4a4595
Cleanup application after #close has been called on the Rack response body, not when AC::Reload#call is done.
...
The Rack body might lazily evaluate its output, which is for example the case
if one calls 'render :text => lambda { ... }'. The code which lazily evaluates
the output might use other application classes. So we will want to defer
cleanup until the Rack request is completely finished.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-07-08 13:46:10 +12:00
Lawrence Pit
29c5985849
Use the i18n gem if present instead of vendor code. [ #2871 state:resolved]
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-07 18:38:02 -07:00
Hongli Lai (Phusion)
d8f8066cd1
Add support for dumping non-standard primary keys when using the SQLite3 adapter. Fix unit tests so that this feature is tested for all adapters.
...
Signed-off-by: Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local >
2009-07-07 16:17:49 -07:00
Hongli Lai (Phusion)
31254bedae
Mocha >= 0.9.7 is required, otherwise mocking doesn't work. [ #2874 state:resolved]
...
Signed-off-by: Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local >
2009-07-07 16:14:22 -07:00
Jesús García Sáez
6673001a5e
Allow symbols on routes declaration (:controller and :action values) [ #2828 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-02 12:19:38 -07:00
Brian Abreu
944f4fc7d2
Fixed ActiveSupport::OrderedHash::[] work identically to ::Hash::[] in ruby 1.8.7 [ #2832 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-02 12:01:46 -07:00
Jarl Friis
1c855ad4e7
My suggestion to fix ticket 2401 [ #2401 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-02 11:56:56 -07:00
Levin Alexander
d8fff7d9d5
make #inspect if zero length duration return '0 seconds' instead of empty string [ #2838 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-02 11:23:04 -07:00
Yehuda Katz + Carl Lerche
281c1a82de
Fixes a number of tests that inexplicably didn't fail when we committed the original patch
2009-07-02 10:50:39 -07:00
J.D. Hollis
f6f24b71a4
Only check for built extensions on gem dependencies that are in vendor/gems. [ #2825 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-02 10:28:25 -07:00
Elliot Winkler
0d3c5f0a82
Patch FormTagHelper so that when a form tag is created, the div which holds the form authenticity token is set to display:inline [ #2846 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-01 17:12:45 -07:00
Yehuda Katz + Carl Lerche
4d8fd8d335
Fixes bug where Memcached connections get corrupted when an invalid expire is passed in [ #2854 state:resolved]
2009-07-01 17:00:08 -07:00
Jeremy Kemper
5217c16b09
JSON.escape returns UTF-8 strings
...
[#2849 state:resolved]
2009-07-01 16:27:13 -07:00
Yehuda Katz + Carl Lerche
97ad936148
Updates CI to use latest mocha
2009-07-01 13:49:35 -07:00
Jeremy Kemper
dfdf8e5dab
Merge branch '2-3-stable' of git@github.com:rails/rails into 2-3-stable
2009-07-01 12:55:47 -07:00
Yehuda Katz + Carl Lerche
a8bd3c8a10
Move mocha down below initial T::U require and bump version to 0.9.7 [ #2858 state:resolved]
2009-07-01 12:09:32 -07:00
Yehuda Katz + Carl Lerche
e10305f0f4
Accept Symbol for contoller name [ #2855 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-01 11:51:09 -07:00
Chris Mear
eb52dc3db7
Make text_area_tag escape contents by default.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-27 13:15:53 +12:00
Michael Koziarski
9407f6e9a4
Make filter_parameters work correctly with array parameters.
...
Conflicts:
actionpack/lib/action_controller/base/filter_parameter_logging.rb
2009-06-27 13:11:01 +12:00
Joshua Peek
6720b25b2d
send_data should set Content-Length as a string
2009-06-25 14:44:09 -05:00
Jeremy Kemper
22554745b7
Turn on autolist for debugging also
2009-06-18 21:54:56 -04:00
Jeremy Kemper
8b9b954f40
Friendlier runtime exception if delegatee is nil
2009-06-18 20:11:02 -04:00
Jeremy Kemper
b75bc05bc5
Delegated methods report the expected file/line in backtraces
2009-06-18 18:06:42 -04:00
Joshua Peek
a491b19502
Add :concat option to asset tag helpers to force concatenation.
...
This is useful for working around IE's stylesheet limit.
stylesheet_link_tag :all, :concat => true
2009-06-15 10:23:55 -05:00
Luca Guidi
447d60e9ed
Bytes calculation speed up
...
[#2800 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-06-13 14:06:01 -07:00
Jeremy Kemper
cb9429a259
Update memcache-client to 1.7.4 for cheaper timeouts
2009-06-11 22:34:23 -07:00
Joshua Peek
25fde77674
Vendor rack 1.0.x stable
2009-06-11 19:39:21 -05:00
Andrew Kaspick
d3d4822262
allow absolute paths for the asset caches
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-11 16:33:01 +12:00
Jeremy Kemper
7e1bcef985
Remove dead AbstractRequest autoload
2009-06-09 23:51:04 -07:00
Michael Koziarski
19c38a9b70
Whitelist the methods which are called by multiparameter attribute assignment.
...
This prevents users from causing NoMethodErrors and the like by editing the parameter names, and closes a potential exploit of CVE-2009-1904.
2009-06-10 12:11:18 +12:00
Matt Jones
f43404d42b
Fix incorrect specification path in GemDependency#from_directory_name
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-10 09:54:49 +12:00
Stephen Anderson
cd14a4a00e
Sanitized the id generated by text_area_tag helper method. text_area_tag('item[description]') should return: <textarea id="item_description" name="item[description]"></textarea> instead of: <textarea id="item[description]" name="item[description]"></textarea> The old id was causing HTML validation failures.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-09 20:36:37 +12:00
David Stevenson
898a8801ff
Made label target radio button tags with values. Radio button now respects inherited :index options when generating id.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-09 20:29:02 +12:00
Friedrich Göpel
72d111a21c
1.9 compatibility - don't pass an array as the from address as this ends up generating invalid SMTP commands.
2009-06-09 20:24:19 +12:00
Steven Luscher
d63fab344f
Fixes #2439 . ActionController::Integration::Session no longer mangles multiparameter attribute params when processing multipart requests.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-09 20:14:01 +12:00
Eugene Pimenov
c5c022c705
PostgreSQL adapter should call thread safe quote_string function
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-09 20:11:51 +12:00
Tom Ward
d97073337c
Change autoload declaration in ActionView::Helpers from JavascriptHelper to JavascriptHelper, matching the actual helper name. Also removed require from UrlHelper which was inadvertently preventing the autoload typo from causing a failure.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-09 20:08:23 +12:00
Michael Koziarski
b1a044b629
Revert "Ensure HasManyThroughAssociation#destroy delete orphan records"
...
This reverts commit 7a85927da2 .
There's still some debate about the intended behaviour in the ticket, leaving in master but removing prior to shipping 2.3.3
2009-06-09 20:03:36 +12:00
Matt Jones
2c3d2906b2
Fix several issues with the 2.3.2 gem loader.
...
Incorporates the following:
- migrates back small change to gems:build:force from bfc1609a50 to finish closing #2266 .
- unrolls to_proc calls in gems.rake, to match the change in master.
- fixes #2722 by passing the options hash to dependencies during build. (includes a test)
- fixes #2721 by loading the specification directly in from_directory_name. Adds an option to opt-out of specification loading when needed (in gems:refresh_specs, for instance). Includes tests.
- fixes #2679 by refreshing specs for all frozen gems rather than just gems loaded from the environment.
- fixes #2678 by passing the options hash to dependencies during unpack.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-09 19:57:23 +12:00
nate
056ddbdcfb
A test to show that http_authentication needs to fail authentication if the password procedure returns nil. Also includes a fix to validate_digest_response to fail validation if the password procedure returns nil.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-09 19:47:16 +12:00
Pratik Naik
5fb66a3abb
Vendor Rack edge ( commit : 815342a8e15db564b766f209ffb1e340233f064f )
2009-06-08 23:47:36 -07:00
Jeremy Kemper
e70272e2a4
Clearer String#first and #last edge cases. Fix that 'foo'.first(0) == 'foo' instead of ''
2009-06-08 20:42:39 -07:00
Jeremy Kemper
63d0c33787
Fix AR json encoding
2009-06-08 20:42:39 -07:00
Jeremy Kemper
f9b2227649
Qualify constant references in BasicObjects
2009-06-08 20:42:39 -07:00
Jeremy Kemper
756e82d1b6
Prefer JSON.encode(value) to value.to_json
2009-06-08 20:42:39 -07:00
Jeremy Kemper
74f16a56e7
Simplify json decoder backend lazy load
2009-06-08 20:42:39 -07:00
Jeremy Kemper
f1e75e4378
Add #element and #collection to ModelName
2009-06-08 20:42:39 -07:00
Jeremy Kemper
cc5d313a48
Lazier Rakefile requires to avoid needing full rake gem on 1.9
2009-06-08 20:42:39 -07:00
Jeremy Kemper
91727ae5e4
Ruby 1.9: sqlite escape encoding
2009-06-08 20:42:31 -07:00
Jeremy Kemper
91fbdfd5b3
Failsafe doesn't return bare String body
2009-06-08 20:35:52 -07:00
Jeremy Kemper
05abd7c196
Check for to_str instead of String
2009-06-08 20:35:52 -07:00
Jeremy Kemper
aebd1ba5b4
Integration tests use Rack::Lint on 1.9 also
2009-06-08 20:35:51 -07:00
Jeremy Kemper
ec10f13939
Ruby 1.9: fix json encoding
2009-06-08 15:18:11 -07:00
Jeremy Kemper
01f820c3b2
Use to_json instead of rails_to_json
2009-06-08 14:09:16 -07:00
Jeremy Kemper
a69ee11968
JSON: split encoding and coercion
2009-06-08 01:37:28 -07:00
Jeremy Kemper
4a78dae2ab
Revert rails_to_json -> to_json so we don't break compatibility
...
[#2753 state:resolved]
2009-06-08 00:11:12 -07:00
Jeremy Kemper
4b4164e8a8
Don't rely on Rails.logger
2009-06-08 00:09:50 -07:00
Tim Connor
84a755b27e
Work around a gem dependency edge case that prevents Rails from booting..
...
If you have a frozen gem with unfrozen dependencies (for instance if the
dependency has native extensions so can't be frozen) you can have a
nightmare upgrade problem, where you cannot rake gems:install, because
rake is broken by a gem loading problem.
If you bump up your frozen gem to a newer version that requires a newer
dependency, everybody else on the team will have rake broken by that
dependency mismatch, since you will have had to specify the dependency
in your config.gems, otherwise nobody will have installed it, since the
parent is frozen. And now the config.gems loading code will kill rake.
[#2609 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-06-05 23:06:19 -07:00
Michael Koziarski
b600bf2cd7
name is case sensitive, update tests to reflect that
2009-06-01 14:21:08 +12:00
Han Kessels
4d7c597e84
fix for IE incompatibility of :disable_with in submit_tag
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-01 14:03:35 +12:00
Ian Terrell
a92790ab86
added a failing test case for counting has_many :through associations with scopes
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-01 13:54:56 +12:00
Michael Koziarski
34c3162c5c
Revert "Ensure calculations respect scoped :select". Broke .count on a has_many :through association.
...
This reverts commit 6543426c73 .
2009-06-01 13:54:20 +12:00
Joshua Peek
c73cf7d2c0
Revert "Only save the session if we're actually writing to it [ #2703 state:resolved]"
...
This reverts commit 14edaa104d .
2009-05-30 09:36:32 -05:00
Johan Sörensen
14edaa104d
Only save the session if we're actually writing to it [ #2703 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-28 09:32:16 -05:00
Johan Sörensen
dc94c09503
The FlashHash and friends causes a lot of needless session storing, when we know for a fact that there's no content in the flash. By not storing the empty hash in the session we save a lot of communication with the various session backends, while still keeping the same interface to the flash. [ #2703 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-28 09:22:35 -05:00
Hongli Lai (Phusion)
34a1ed0df8
Make the Failsafe middleware attempt to render 500.html during failsafe response rendering. Also make the default static failsafe response more friendly, in case 500.html rendering fails. [ #2715 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-27 14:59:11 -05:00
calavera
4196616778
ensure initialize_database_middleware doesn't use ActionController if action_controller framework is not enabled [ #2680 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-27 14:56:26 -05:00
Joshua Peek
b4c7b3e893
Ensure Memcache local cache returns duplicated values [ #2302 state:resolved]
2009-05-27 14:55:13 -05:00
Hongli Lai (Phusion)
9b2a665aff
activesupport/json/encoders fix that to_json should call rails_to_json, not just be an alias to the rails_to_json method defined in Object. Fixes #2690
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-25 15:28:14 +02:00
Eloy Duran
a70c78177a
Ensure the parent record is always saved when the child is invalid. [ #2249 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-20 21:19:30 +02:00
Bryan Helmkamp
542d6a0abd
Use duck typing to also allow MemCache-like object when initializing a MemCacheStore
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-05-19 16:58:20 -07:00
Jeremy Kemper
2a657725f1
Mark pending release in changelog instead of edge
2009-05-19 10:59:24 -07:00
Bryan Helmkamp
6339e5d360
Allow MemCacheStore to be initialized with a MemCache object instead of addresses and options
2009-05-19 10:58:30 -07:00
Jeremy Kemper
9fcadcbd68
Fix imprecise float comparison
2009-05-18 14:34:32 -07:00
Joe Van Dyk
ad85771221
Add ability to get multiple memcached keys at the same time (via MemCacheStore#read_multi).
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-05-18 13:44:45 -07:00
Ken Collins
50608ecccd
Reimplement Fixtures.identify so that it consistently generates identities across ruby versions.
...
[#2633 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-05-18 13:42:04 -07:00
Luca Guidi
7a85927da2
Ensure HasManyThroughAssociation#destroy delete orphan records [ #2251 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-18 22:31:14 +02:00
Pratik Naik
97b75c9f16
Make sure default_scope#create checks for options[:conditions] [ #2181 state:resolved] [James Le Cuirot]
2009-05-18 21:27:55 +02:00
Pratik Naik
dbb0258279
Ensure HTTP Digest auth uses appropriate HTTP method [ #2490 state:resolved] [Steve Madsen]
2009-05-18 17:00:29 +02:00
rick
2b5e4f38f5
load the JSON Backend lazily.
2009-05-17 19:16:11 -07:00
Jeremy Kemper
5b80ead2a3
Extract json string escaping
2009-05-17 18:42:56 -07:00
Jeremy Kemper
cc47d3ff0c
Only Object to_json alias is needed. Prefer nil options.
2009-05-17 18:42:44 -07:00
rick
d052e9fb58
Add pluggable JSON backends with support for the JSON gem.
...
Example: ActiveSupport::JSON.backend = "JSONGem"
All internal Rails JSON encoding is now handled by
ActiveSupport::JSON.encode(). Use of #to_json is not recommended, as it
may clash with other libraries that overwrite it. However, you can
recover Rails specific functionality
if you really want to use #to_json.
gem 'json'
ActiveSupport::JSON.backend = "JSONGem"
class ActiveRecord::Base
alias to_json rails_to_json
end
2009-05-17 18:40:38 -07:00
Joshua Peek
43e537b9e8
Missed a file from the previous commit
2009-05-17 14:45:06 -05:00
Joshua Peek
e30016c29e
Fix reset_session with ActiveRecord store [ #2200 state:resolved]
2009-05-17 14:44:19 -05:00
Mike Breen
f383a4aa33
Allow assert_template to take a symbol [ #2011 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-17 19:40:18 +02:00
Paulo Schneider
14b769899c
Fix typo in the generated routes.rb [ #2433 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-17 15:00:41 +02:00
Jacob Kjeldahl
d5f018eb10
Supply valid ruby-prof parameters [ #1804 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-17 14:53:50 +02:00
Daniel Guettler
4cd40726eb
has_one :through should not create a new association when assigned nil [ #698 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-17 14:50:09 +02:00
Pratik Naik
ba92e83bcc
Include guides directory in the rails gem
2009-05-16 17:08:34 +02:00
José Valim
66ead4f148
Allow strings to be sent as collection to select.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2391 state:committed]
2009-05-15 15:30:42 +12:00
Joshua Peek
f7cb7fce4c
Sweeper does not belong in Sweeping module
2009-05-14 16:47:24 -05:00
Peter Marklund
0380e9ca5f
Changed ActiveRecord::Base#exists? to invoke find_initial so that it is compatible with, and doesn't lose, :include scopes (references to eager loaded tables)
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2543 state:committed]
2009-05-14 20:42:13 +12:00
Jeremy Kemper
35e1785081
Revert "Fixed bug with polymorphic has_one :as pointing to an STI record"
...
[#2594 state:open]
This reverts commit 93c557828e .
2009-05-11 12:21:59 -07:00
Douglas F Shearer
2bcb2443a9
ActiveSupport::OrderedHash[1,2,3,4] creates an OrderedHash instead of a Hash.
...
[#2615 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-05-11 11:46:43 -07:00
Joshua Peek
4051dd3412
Fix syntax error from 5ac05f15
2009-05-09 22:22:14 -05:00
Anthony Crumley
88d5e3341d
Fixed eager load error on find with include => [:table_name] and hash conditions like {:table_name => {:column => 'value'}}
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-05-10 13:33:22 +12:00
John Small
7bf9bf3dd6
Add configuration options for :dasherize and :camelize calls to Hash#to_xml
...
People using ActiveResource & REST to integrate with other systems need to be able to control the default dasherize behavior of Hash.to_xml.
Currently there is no test for a default value, but existing code asssumes it's true. This patch adds tests for the default value and adds
mattr_accessor to ActiveSupport for :dasherize_xml and :camelize_xml. These module attributes set the defaults for :dasherize and :camelize in
rename_keys inside Hash#to_xml. The tests have been changed to separate out the testing of the parameter options for :camelize
and :dasherize so that we only test one thing at a time. We also test default values for :camelize_xml and :dasherize_xml.
The module attribute dasherize_xml is set to true in this patch to maintain existing code. But at some point in the future it should be set to
false because Hash#to_xml probably should not set underscores to dashes by default.
Changed documentation on ActiveResource#to_xml to correctly describe the behaviour of Hash#to_xml. The previous documentation said that
the default for :dasherize was false, in fact it was and still is true, but we now have a way to change the default. I've also added
documentation for the :camelize option.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-05-10 13:09:40 +12:00
Ken Collins
6dec3c45fc
ActiveSupport::OrderedHash#to_a method returns an ordered set of arrays. Matches ruby1.9's Hash#to_a.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2629 state:committed]
2009-05-10 13:05:14 +12:00
Joshua Peek
e61cceb37f
Don't stream each line of the body, just send the whole thing
2009-05-08 17:00:16 -05:00
Joshua Peek
7f1f16c01f
Deprecate assert_redirect_to's partial hash matching. This will be fully removed in 3.0.
2009-05-04 20:24:49 -05:00
Wincent Colaiuta
5ac05f15c6
Extract ActionController::Caching::Sweeper into separate file [ #1977 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-04 20:17:27 -05:00
Tim Connor
49169f7a6a
fix problems with requires in metal choking under development reloading [ #2579 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-04 20:12:16 -05:00
codebrulee
ebe8dd6108
Remove stray underscore from the hash conversion methods which broke backwards compatibility with Hash.from_xml
...
Also add an all-caps test to prevent future regressions
2009-05-04 09:51:35 -07:00
Ruy Asan
17e712d3a3
Added routing test for irregular ID requirements and custom member action.
...
[#2595 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-05-01 15:02:51 -07:00
Ruy Asan
93c557828e
Fixed bug with polymorphic has_one :as pointing to an STI record
...
[#2594 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-05-01 14:49:38 -07:00
Alexander Podgorbunsky
628b4ad679
Default scope :order should be overridden by named scopes.
...
[#2346 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-05-01 14:45:35 -07:00
Jeremy Kemper
a5ed7eede6
Missed commit for 7c4b325e0a
2009-04-30 16:49:34 -07:00
John F. Douthat
d1d1894c2f
Fix action-cached exception responses.
...
Methods raising ActiveRecord::RecordNotFound were returning 404 on first request and 200 OK with blank body on subsequent requests.
[#2533 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-04-30 16:48:07 -07:00
Jeremy Kemper
7c4b325e0a
Fix render :json => nil [ #2589 state:resolved]
2009-04-30 16:47:42 -07:00
David Dollar
00eee49e1e
Additional tests for the gem subsystem
...
* test_gem_ignores_development_dependencies
* test_gem_guards_against_duplicate_unpacks
* test_gem_does_not_unpack_framework_gems
[#2236 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-04-29 08:08:48 -07:00
David Dollar
6e3bede928
Attempt to deal with more cases of gems with native components.
...
This commit adds a rudimentary check for 'unbuilt' gems, so that we can abort
the application load if there are any gems that have native components that
have not yet been built.
The rake task gems:build has now only builds 'unbuilt' gems as a result.
The rake task gems:build:force has been added to deal with cases of incomplete
builds, or any case where you need to force the build of all of your gems.
Changes the gems:build task to get its gem list by parsing directory entries
in vendor/gems, which sidesteps the chicken/egg issues involved with having a
gem unpacked into vendor/gems without before its native bits are compiled.
[#2266 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-04-28 23:19:18 -07:00
Stephen Bannasch
4b68debb1c
add JRuby-JDOM backend for XmlMini
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-04-26 16:23:22 -07:00
Hongli Lai (Phusion)
2633108e1f
Fix environment variable testing code in failsafe.rb.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-04-26 11:22:44 -05:00
Hongli Lai (Phusion)
5e57e2fa58
Remove reference to Rack::RewindableInput, which has been removed a while ago.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-04-26 11:21:15 -05:00
Yehuda Katz
cb9a1f17f0
Updated 2-3-stable to Rack 1.0
2009-04-25 12:47:51 -07:00
Joshua Peek
61a1456937
Remove RewindableInput middleware since all input MUST be rewindable according to a recent change in the Rack 1.0 SPEC
2009-04-25 14:05:58 -05:00
Joshua Peek
16f36b6171
Remove vendored version of Rack
2009-04-25 13:59:26 -05:00
Joshua Peek
2d9b45722c
Remove pending rack specifications until they are official
2009-04-25 13:44:34 -05:00
Jeremy Kemper
617d7eb57b
Merge branch '2-3-stable' of git@github.com:rails/rails into 2-3-stable
2009-04-22 01:08:53 -07:00
Pratik Naik
09a976ac58
Change table to prevent copying indexes on sqlite2
2009-04-21 13:29:00 +01:00
Pratik Naik
5bbd097ce9
Specify :group with the table name for it to work on sqlite3
2009-04-21 13:12:15 +01:00
Pratik Naik
3267097393
Fix tests for sqlite3 3.6.xx
2009-04-21 13:08:26 +01:00
Max Lapshin
5a4603fafb
Fixed dumping from postgresql columns in index in wrong order. [ #2515 state:resolved]
...
Signed-off-by: Tarmo Tänav <tarmo@itech.ee >
2009-04-21 11:45:02 +01:00
Scott Woods
70ba90b072
Quote table names when casting to regclass so that capitalized tables are supported. [ #2418 state:resolved]
...
Signed-off-by: Tarmo Tänav <tarmo@itech.ee >
2009-04-21 11:44:54 +01:00
Max Lapshin
de4cc53f74
Fixed wrong quoting of index names in postgres [ #2402 state:resolved]
...
Signed-off-by: Tarmo Tänav <tarmo@itech.ee >
2009-04-21 11:44:47 +01:00
Max Lapshin
6060123470
Support multiple schemas in table names for postgresql [ #390 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-04-21 11:40:12 +01:00
Pratik Naik
fc2421b784
Ensure :dependent => :delete_all works for association with hash conditions
2009-04-21 11:33:27 +01:00
Pratik Naik
375e8976e3
Ensure JoinAssociation uses aliased table name when multiple associations have hash conditions on the same table
2009-04-20 13:56:03 +01:00
Mislav Marohnić
35c5727ace
Always buffer rack.input if it is not rewindable
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-04-17 21:54:09 -05:00
Mislav Marohnić
878aec9d95
Improve rewindable input test coverage so tests fail when you remove the middleware
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-04-17 19:35:25 -05:00
Jeremy Kemper
c9a3d99164
Clearer String#first and #last edge cases. Fix that foo.first(0) == instead of foo.
2009-04-17 18:06:47 -05:00
David Heinemeier Hansson
fa750e08a8
Added :touch option to belongs_to associations that will touch the parent record when the current record is saved or destroyed [DHH]
2009-04-16 17:26:10 -05:00
David Heinemeier Hansson
50e867480a
Added ActiveRecord::Base#touch to update the updated_at/on attributes with the current time [DHH]
2009-04-16 16:48:07 -05:00
Doug McInnes
dc69d9308a
Fix for TestResponse.cookies returning cookies unescaped [ #1867 state:resolved]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-04-07 13:22:21 -05:00
Kenny Ortmann
ace154d067
added tests for session options being defaulted correctly to rack defaults [ #2403 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-04-07 11:08:04 -05:00
Ryan Angilly
651611999d
adding session_options initialization and test [ #2303 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-24 10:53:29 -05:00
thedarkone
6a1267a0b1
Fix template extension parsing. [ #2315 state:resolved] [ #2284 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-24 10:53:24 -05:00
thedarkone
d2e6a0fbc3
Simplify handling of absolute path templates. [ #2276 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-24 10:53:20 -05:00
David Dollar
dace54b2e9
Updates tests to cause the tests for the Request class not to proxy through a fake TestRequest object [ #2278 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-24 10:53:14 -05:00
Peter Marklund
daffa5cbdd
Reset request_parameters in TestRequest#recycle! to avoid multiple posts clobbering each other [ #2271 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-24 10:53:07 -05:00
Joshua Peek
c91912700d
just kill brittle test
2009-03-24 10:52:49 -05:00
Pratik Naik
dc88847e5c
Try to use actionpack gem to generate guide when Rails is not vendored
2009-03-17 12:26:34 +00:00
Pratik Naik
18eb80ccc7
Merge docrails
2009-03-16 11:28:36 +00:00
Joshua Peek
4185a4a5f5
update rack fixture to be ruby 1.9 compat
2009-03-15 23:48:07 -05:00
Joshua Peek
0706de4301
Better error message to try to figure out why the CI build is failing
2009-03-15 23:41:47 -05:00
Joshua Peek
46c12fdcb6
ruby 1.9 compat: Pathname doesn't support =~
2009-03-15 23:29:00 -05:00
Joshua Peek
d0e5417861
update rack fixture to be ruby 1.9 compat
2009-03-15 23:25:12 -05:00
Joshua Peek
5a575bb992
update metal fixtures to be ruby 1.9 compat
2009-03-15 23:21:29 -05:00
Joshua Peek
367049cae6
Fix brittle Time.now mock
2009-03-15 23:17:31 -05:00
Joshua Peek
39ff550fa8
Ensure our bundled version of rack is at the front of the load path
2009-03-15 22:54:26 -05:00
David Heinemeier Hansson
73fc42cc0b
Prepare for final 2.3 release
2009-03-15 22:06:50 -05:00
Luca Guidi
5f10533949
Make sure Metal use ActionController class name conventions [ #2242 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-15 18:41:21 -05:00
misfo
7706b57034
allowed render :file to take Pathnames [ #2220 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-14 10:42:02 -05:00
Joshua Peek
112056333f
Add Rack version to Rails info
2009-03-14 10:37:20 -05:00
Mike Gunderloy
07710fd3e0
Fix requirements for additional member/collection routes [ #2054 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-14 10:06:00 -05:00
Jason King
ac3848201d
SQLite adapters now support DDL transactions [ #2080 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-14 12:58:42 +00:00
Joshua Peek
5b025a1d11
Revert 5b7527ca "Failing test for routes with member & requirement" [ #2054 state:wontfix]
2009-03-13 17:13:18 -05:00
Joshua Peek
eced3d8c55
Update rack to fix multipart uploads with an empty file [ #1945 state:resolved]
2009-03-13 17:13:10 -05:00
David Dollar
99d75a7b02
Makes the gem system understand development vs. runtime dependencies [ #2195 state:resolved]
...
The patch also fixes:
* Fixes the chicken/egg problem present in the current gem system when
gems are defined in the config that are not yet installed.
* Remove the need to have hoe as a dependency of your production app.
* Makes the gem 'unpacking' system a lot less fragile.
Signed-off-by: Matt Jones <al2o3cr@gmail.com >
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-13 10:20:23 +00:00
Zack Hobson
5b751ae0b3
Execute the appropriate gem command when using JRuby [ #2215 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-13 10:14:51 +00:00
John Dzak
9d906707be
Vendored gem paths now being loaded if they exist [ #2204 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-13 10:13:57 +00:00
Jeremy Kemper
5f1d6465b4
Change naming to match 2.2 so life is easier on plugin developers
2009-03-12 13:32:52 -07:00
Jeremy Kemper
82c6597dc2
Eliminate internal render stack since we only need its head and tail
2009-03-12 12:34:47 -07:00
Jonathan del Strother
9230678104
Use xmlschema when serializing TimeWithZones to xml [ #2223 state:resolved]
...
When using Hash#to_xml, any TimeWithZone objects now use xmlschema (iso8601), rather than a simple TimeWithZone#to_s.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-12 18:35:49 +00:00
Mike Gunderloy
d771e7d17f
Handle irregular plurals in polymorphic_urls [ #2212 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-12 17:02:07 +00:00
Chris Kampmeier
3c64c9a575
Fix spelling of an internal method [ #1734 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-12 15:41:31 +00:00
Luca Guidi
47bdf3bf40
Ensure AutosaveAssociation runs remove callbacks [ #2146 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-12 15:24:37 +00:00
Elijah Miller
91b98cf0a5
Returning nil from named scope lambda is equivalent to an empty hash [ #1773 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-12 15:06:19 +00:00
Bradford Folkens
aa57e66fec
Ensure HWIA#reverse_merge! retrurns HWIA [ #421 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-12 15:03:01 +00:00
Damian Terentiev
8a17fd1a65
Fixed that template runner gem method to output :lib => false correctly [ #1940 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-12 14:45:55 +00:00
Murray Steele
db26ace030
Ensure NoMethodError isn't raised when some of the nested eager loaded associations are empty [ #1696 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-12 13:49:16 +00:00
Will Bryant
92dadf6d79
Fixed autosave checks on objects with hm:t in :include [ #2213 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-12 13:26:21 +00:00
Donald Parish
be7b64b35a
Support MD5 passwords for Digest auth and use session_options[:secret] in nonce [ #2209 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-12 13:24:54 +00:00
Ubiratan Pires Alberton
7b382cb9e5
Reverted affe50105f and added more JSON decoding tests.
...
Works on Ruby 1.8 and 1.9
[#1100 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-03-11 14:36:14 -07:00
Russ Smith
f2c7508bef
Update bundled Rack to fix Litespeed compatibility [ #2198 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-11 12:50:24 -05:00
Pratik Naik
106976df09
Ensure ActiveRecord::Base.find_in_batches fires doesnt fire an extra query unless needed
2009-03-11 15:24:30 +00:00
Pratik Naik
f23adf0ed4
Add tests for AssociationCollection#find_each and AssociationCollection#find_in_batches
2009-03-11 15:07:24 +00:00
Pratik Naik
0b6f514947
Add NamedScope#find_each tests [ #2201 state:resolved]
2009-03-11 15:07:24 +00:00
Pratik Naik
04333482bd
Rename ActiveRecord::Base.each to ActiveRecord::Base.find_each
2009-03-11 15:07:23 +00:00
Jeremy Kemper
19ad375e7a
Don't duplicate :order from scope and options, it makes mysql do extra work
2009-03-10 23:11:05 -07:00
Jeremy Kemper
cfde60575a
Strip invalid leading whitespace error uncovered by nokogiri
2009-03-10 22:17:05 -07:00
Aaron Patterson
b9e021df97
adding more nokogiri tests and making the main rails tests pass
...
[#2190 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-03-10 22:11:15 -07:00
Mislav Marohnić
fa45540cdb
Ensure correct content type is declared after cache hits on actions with string cache keys [ #1585 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-10 23:31:19 +00:00
Henrik N
ea0e41d8fa
Make Inflector#parameterize correctly squeeze multi-character separators [ #1489 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-10 21:36:46 +00:00
Ken Collins
4b4e7caffa
The latest trunk of Mocha > 0.9.5 which addresses issue with MiniUnit compatibility uses namespaced integration classes.
...
[#2060 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-03-10 14:07:40 -07:00
Joshua Peek
0a887e2386
check for rack 1.0 gem before falling back to bundled version
2009-03-10 15:09:44 -05:00
Joshua Peek
572e0aac80
update bundled version of rack before 2.3 final
2009-03-10 15:05:38 -05:00
Joshua Peek
8970f8ace5
remove rack gem dependency
2009-03-10 15:02:58 -05:00
Jeremy Kemper
37cf224fdb
Make it easier to swap XmlMini backends. Require Nokogiri >= 1.1.1 for XmlMini backend tests.
2009-03-10 12:08:42 -07:00
Aaron Patterson
694998ee4f
Nokogiri backend for XmlMini
...
[#2190 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-03-10 11:56:19 -07:00
Jeremy Kemper
d4091d3bc7
Properly set up libxml includes. Don't include LibXML in toplevel.
...
[#2084 state:resolved]
2009-03-10 11:37:23 -07:00
Jeff Schwab
e609d83f1a
Fixed an incompatibility with Ruby 1.9.
...
Ruby 1.8 strings are Enumerable, but there is no String#lines method. In
Ruby 1.9, the situation is reversed. To work around this disparity, the
RailsEnvironment#externals method now explicitly checks whether a String
responds_to? :lines.
[#2130 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-03-10 11:37:23 -07:00
Pratik Naik
affe50105f
Remove untested part from 9b9b2937ce
2009-03-10 18:16:10 +00:00
Tim Pope
9b9b2937ce
Properly decode \u escape sequences in JSON [ #1100 state:resolved] [Tim Pope, Philip Hallstrom]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-10 17:05:17 +00:00
Pratik Naik
0464254430
Add a missing CHANGELOG entry
2009-03-10 16:52:40 +00:00
Eugene Pimenov
bdfa733d04
Ensure auto_link doesnt linkify URLs in the middle of a tag [ #1523 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-10 16:52:21 +00:00
Sean Dague
1dff106888
Allow custom type for multipart emails [ #1691 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-10 16:38:37 +00:00
Joshua Peek
e8b07dc340
Ensure public folder structure is setup correctly if the tests are ran out of order, fixes tests in 0c9bbf8
2009-03-10 11:19:32 -05:00
Manfred Stienstra
c3aa2bcdcf
Ensure nested with_scope merges conditions inside out [ #2193 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-10 11:49:58 +00:00
Bruce Krysiak
8272630ce8
Ensure ActiveRecord#to_xml respects :skip_types for included associations [ #1632 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-10 11:17:16 +00:00
Joshua Peek
0c9bbf8c9d
Fix serving index files with rack static file server [ #2180 state:resolved]
2009-03-09 23:31:04 -05:00
Joshua Peek
224a534400
reset_session should force a new session id to be generated [ #2173 ]
2009-03-09 22:46:03 -05:00
Jeremy Kemper
4458edc882
Use the REXML parser by default. XmlMini.backend = 'LibXML' to use libxml-ruby.
2009-03-09 13:42:42 -07:00
Jeremy Kemper
87d82ef76e
Require libxml-ruby 0.9.4 or 0.9.7 pending a segfault bugfix for 1.0.
...
Delegate parsing to a switchable backend.
2009-03-09 13:00:57 -07:00
Jeremy Kemper
146511e018
Revert "Revert "XmlMini supports different backend parsers, starting with libxml""
...
Will change to require a known-working libxml-ruby.
This reverts commit a995a738ca .
2009-03-09 12:39:20 -07:00
David Heinemeier Hansson
a995a738ca
Revert "XmlMini supports different backend parsers, starting with libxml"
...
Spews a ton undefined method `default_keep_blanks=' for XML:Module errors.
This reverts commit 822c41d69d .
2009-03-09 19:00:21 +01:00
Andrew Bloom
90dba00822
Ensure blank path_prefix works as expected [ #2122 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-09 15:27:13 +00:00
Andrew Timberlake
1d88a111b5
Ensure TemplateRunner#ask? works with the rake task to apply a template [ #1655 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-09 14:58:12 +00:00
Curtis Hawthorne
0d922885fb
Ensure Model#destroy respects optimistic locking [ #1966 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-09 14:56:09 +00:00
Jim Remsik and Tim Pope
1e6c50e21b
Ensure has_many :through works with changed primary keys [ #736 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-09 13:43:28 +00:00
rpheath
1ab2ff58ed
Fixed number_to_phone to work with 7 digit numbers [ #2176 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-09 12:53:44 +00:00
Rob Anderton
faf4ba6b79
Allow find(:last) :order be a symbol [ #2024 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-09 12:52:14 +00:00
Jan De Poorter
277c799d58
Fix find_by_last when order is given [ #2127 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-03-09 13:02:31 +01:00
David Heinemeier Hansson
9442d843ff
Merge branch 'master' of git@github.com:rails/rails
2009-03-09 12:50:47 +01:00
Matt Jones
0da8e45baf
Correctly clean backtraces from vendor/gems and gems in alternate install locations
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-03-09 12:49:58 +01:00
Matt Jones
f4bd0fbc91
Correctly clean backtraces from vendor/gems and gems in alternate install locations
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-03-09 12:09:40 +01:00
Jeremy Kemper
a3e67a15ed
Prototype helpers support the onCreate callback.
...
[#1074 state:committed]
2009-03-08 13:41:51 -07:00
Bart ten Brinke
822c41d69d
XmlMini supports different backend parsers, starting with libxml
...
[#2084 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-03-08 13:41:25 -07:00
Jeremy Kemper
1c36172c13
Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.
...
[#1617 state:resolved]
2009-03-08 13:11:58 -07:00
Jeremy Kemper
0c407891fb
Ensure Active Support is loaded locally rather than from RubyGems. [ #1620 state:committed]
2009-03-08 11:04:23 -07:00
Yury Kotlyarov
9b8cde41bc
Remove duplicate test [ #2136 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-08 15:50:38 +00:00
Jeffrey Hardy
96eaeee446
Add ActiveRecord::Base#invalid? as the opposite of #valid? [ #2159 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-08 15:20:23 +00:00
John Aughey
7a26a67b42
Ensure SQLite adapters stores the config [ #1947 state:resolved] [John Aughey, Pratik Naik]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-08 14:47:32 +00:00
Mike Gunderloy
5e0f6214d2
Support OPTIONS verb in route conditions [ #1727 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-08 12:37:17 +00:00
Tom Stuart
5c87e9addd
Ensure shallow routes respects namespace [ #1356 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-07 22:50:58 +00:00
George Ogata
7438788481
Make Chars#slice! behave more like String#slice! [ #1243 state:resolved]
...
- Chars#slice! now returns the slice instead of itself
- Chars#slice! now removes the slice from itself
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-07 22:41:11 +00:00
Joshua Peek
ea8488caef
Fixed simplified render with nested models [ #2042 state:resolved]
2009-03-07 14:05:18 -06:00
Matt Jones
87e8b16246
fix HTML fallback for explicit templates [ #2052 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-07 13:32:46 -06:00
Lawrence Pit
77f7d98e38
submit_tag with confirmation and disable_with [ #660 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-07 13:29:35 -06:00
Dan Barry
45494580d9
Ensure Active Record error related view helpers escape the message [ #1280 state:resolved] [Inge Jørgensen, Dan Barry]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-07 18:55:19 +00:00
Pratik Naik
df8669d4b5
Fix calculation tests to work on sqlite
2009-03-07 16:36:40 +00:00
Pratik Naik
272c2d2e9c
Ensure assert_select works with XML namespaced attributes [ #1547 state:resolved] [Jon Yurek]
2009-03-07 16:13:34 +00:00
karmi
4185fb1e58
Raise LoadError instead of a runtime exception [ #1498 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-07 16:02:52 +00:00
Pratik Naik
a0bb8bcb16
Remove unused variable [ #1451 state:resolved] [Raphaël Valyi]
2009-03-07 15:53:40 +00:00
stopdropandrew
6543426c73
Ensure calculations respect scoped :select [ #1334 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-07 15:26:56 +00:00
Arthur Klepchukov
ccb0a92fa2
Ensure validates_uniqueness_of considers limit on the field. [ #1042 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-07 13:52:17 +00:00
Adam Milligan
f36513653f
Fix RDoc grammar and ensure hm:t tests can run in isolation. [ #1644 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-07 12:34:56 +00:00
Johan Sørensen
c071123b3e
Ensure expires_in without a :public key sets the Cache-Control header to private. [ #2095 state:resolved]
...
This fixes a regression introduced in f2a32bd0 , which wasn't exposed due to two
test methods having the same name.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-07 12:18:10 +00:00
Pratik Naik
fd3ccbe955
DRY with_kcode in Active Record tests
2009-03-07 11:06:44 +00:00
Marcello Nuccio
dfcf1e4cf6
Fixed broken migrations tests: added assert_equal. [ #1704 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-07 11:00:24 +00:00
Sam Granieri
20d3892f46
Allow String#parameterize to accept a separator [ #2157 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-07 10:54:27 +00:00
Will Bryant
7fb7b48a1f
Allow :having conditions to be sanitized like regular :condition. [ #2158 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-06 22:29:53 +00:00
Adam Cooper
3ca5a0f9fd
Ensure belongs_to association with a counter cache in name spaced model works [ #1678 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-06 22:05:18 +00:00
Dimitri Krassovski
984bc7a614
Ensure replacing has_one associations respects the supplied :dependent option. [ #1305 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-06 19:11:13 +00:00
Pratik Naik
4863634a15
Ensure supplie :from has precedence over scoped :from [ #1370 state:resolved]
2009-03-06 18:36:30 +00:00
Tom Lea
c896d56c6e
Ensure self referential HABTM associations raise an exception if association_foreign_key is missing. [ #1252 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-06 18:27:34 +00:00
Pratik Naik
8bc0f90d6d
script/plugin install should remove .gitignore too. [ #1306 state:resolved] [Esad Hajdarevic]
2009-03-06 17:23:31 +00:00
jvoorhis
6a13376525
Methods invoked within named scope Procs should respect the scope stack. [ #1267 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-06 16:47:50 +00:00
Niels Ganser
c67d25e3c4
Ensure ActiveSupport::Memoizable respects private methods. [ #2138 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-06 14:41:13 +00:00
Simon Jefford
e97180c273
Ensure that loading metals from the main app and engines works on older Ruby versions [ #2143 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-05 18:50:52 -06:00
thedarkone
3191535ff0
Fix layouts with absolute paths [ #2134 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-05 18:49:22 -06:00
Mike Gunderloy
5b7527ca44
Failing test for routes with member & requirement [ #2054 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-05 18:46:59 -06:00
David Heinemeier Hansson
b1c989f28d
Fixed that redirection would just log the options, not the final url (which lead to "Redirected to #<Post:0x23150b8>") [DHH]
2009-03-05 12:22:49 +01:00
David Heinemeier Hansson
de540416e9
Make sure that Rails frameworks are silenced when running in gem mode too
2009-03-05 12:22:42 +01:00
David Heinemeier Hansson
713b9c6a1b
Push the guides
2009-03-05 12:20:00 +01:00
David Heinemeier Hansson
dfef3d8b14
Release RC2 today
2009-03-05 11:00:04 +01:00
Jeremy Kemper
9d13b9eed8
Fix OrderedHash#inspect recursion
2009-03-04 16:21:44 -08:00
Joshua Peek
638b3b15a1
Generating routes with optional format segment does not inherit params format [ #2043 state:resolved]
2009-03-04 14:37:59 -06:00
Joshua Peek
6087fe8eed
stray character in railties test
2009-03-04 12:26:53 -06:00
Jeremy Kemper
8ef46f0d61
Merge branch 'master' of git@github.com:rails/rails
2009-03-03 19:10:42 -08:00
Jeremy Kemper
cb53452438
Fix OrderedHash#to_hash to return self instead of a new hash with self as default value
2009-03-03 19:10:33 -08:00
Jeremy Kemper
a242abbad8
Skip backtrace filters if BACKTRACE environment variable is set
2009-03-03 19:10:12 -08:00
Mike Gunderloy
ce56c5daa8
Allow routes with a trailing slash to be recognized
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2039 state:committed]
2009-03-04 14:27:39 +13:00
Joshua Peek
9b1b88f09c
Fixed reset_session for ActiveRecord session store [ #2108 state:resolved]
2009-03-03 13:07:03 -06:00
Simon Jefford
4d4d2c3896
Enhanced Rails Metal - the load order of metals can now be configured [ #2057 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-03 12:39:19 -06:00
Michael Koziarski
818556ec4f
Revert "DDL transactions and savepoints for sqlite"
...
This reverts commit 38136f86dc .
Caused several test failures on the ci box:
http://ci.rubyonrails.org/builds/rails/38136f
[#2080 state:open]
2009-03-02 19:07:39 +13:00
Elliott Wood
c41ed929bb
Removed the "charset" parameter from the Content-Type header of multipart sections of nested multipart messages.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2109 state:committed]
2009-03-02 18:51:30 +13:00
Jason King
38136f86dc
DDL transactions and savepoints for sqlite
...
Sqlite has had DDL transactions since 2.0.0[1] and savepoints since
3.6.8[2]. This patch updates the connection_adapters.
[1] http://tinyurl.com/sqlite-v2-0-0
[2] http://tinyurl.com/sqlite-v3-6-8
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2080 state:committed]
2009-03-02 18:46:30 +13:00
Jeremy Kemper
04fdb6eccb
Revert "Speed up script/console by launching IRB directly."
...
[#2104 state:open]
This reverts commit 3b169cd693 .
2009-03-01 19:04:32 -08:00
Matt Jones
a3ac1e1621
Display gem dependencies correctly and unpack exactly once [ #2097 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-01 11:53:58 +00:00
Charles Nutter
3b169cd693
Speed up script/console by launching IRB directly.
...
[#2104 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-02-28 17:03:37 -08:00
Pratik Naik
0db6c3f518
Merge docrails and update the release notes
2009-02-28 19:44:25 +00:00
Pratik Naik
5029210914
Use Array.wrap() instead of Array() and handle action_view.cache_template_loading being false
2009-02-28 19:03:41 +00:00
Pratik Naik
2686286a70
Ensure 16b3d2b621 works with Ruby 1.9
2009-02-28 18:31:24 +00:00
Andrew Vit
16b3d2b621
Added :env option for gem in template runner [ #1983 state:resolved]
...
For installing gems that are only needed in the test environment, specify the :env option so the dependency is written to config/environments/test.rb:
gem 'rspec', :env => 'test'
gem 'quietbacktrace', :env => %w[development test]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-02-28 17:59:01 +00:00
Pratik Naik
8607740a29
Ensure the old behaviour is retained when action_view.cache_template_loading is not set explicitly
2009-02-28 17:42:15 +00:00
Mike Gunderloy
c653f700d3
Fix that scoped find with :group and :having [ #2006 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-02-28 17:35:58 +00:00
Mike Gunderloy
dcd9c7f58e
Fix spelling in test name.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-02-28 15:35:03 +00:00
Gregg Pollack
f2a32bd0de
Added ability to pass in :public => true to fresh_when, stale?, and expires_in to make the request proxy cachable [ #2095 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-02-28 10:33:42 +01:00
David Heinemeier Hansson
7058c1366e
So it didnt happen yesterday, but very soon! Just need the final details ironed out
2009-02-28 10:30:49 +01:00
Jeremy Kemper
df2adc4c51
Merge branch 'master' of git@github.com:rails/rails
2009-02-27 12:21:34 -08:00
Jeremy Kemper
884068a13a
Skip console test when using minitest
2009-02-27 12:19:23 -08:00
Jeremy Kemper
1ceddd9514
Skip backtrace filter test when using minitest
2009-02-27 12:18:45 -08:00
Jeremy Kemper
eb217b2cf0
Ruby 1.9 compat: limit const_defined?
2009-02-27 12:18:18 -08:00
Jeremy Kemper
f732c16808
Invoke tests with the same ruby
2009-02-27 12:12:42 -08:00
Sven Fuchs
943d64b1c8
Vendorize i18n 0.1.3 gem (fixes issues with incompatible character encodings in Ruby 1.9) (Akira Matsuda) [ #2038 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-02-27 17:15:15 +01:00
David Heinemeier Hansson
77b0994c78
Prep for RC2 later today
2009-02-27 14:46:23 +01:00
Zack Hobson
ff894b55dd
Update rdoc: all is not a named_scope [ #1959 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-02-27 14:43:11 +01:00
Matthew Rudy Jacobs
319106d09c
Metal can now line in plugins under app/metal [ #2045 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-02-27 14:37:11 +01:00
David Heinemeier Hansson
6de83562f9
Force all internal calls to Array#to_sentence to use English [ #2010 state:resolved]
2009-02-27 14:22:39 +01:00
Eloy Duran
e2b925fa68
Don't validate records of an :autosave association if they're marked for destruction. [ #2064 status:resolved]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-02-27 13:57:27 +01:00
Eloy Duran
3d1d422b8b
Pass a custom form builder on to nested fields_for calls. [ #2023 status:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-02-27 13:56:27 +01:00
David Heinemeier Hansson
5cda000bf0
Fixed that autosave should validate associations even if master is invalid [ #1930 status:committed]
2009-02-27 13:50:24 +01:00
Jeremy Kemper
dec91a2e06
Fix test failure introduced by 6099f261ea
2009-02-25 14:01:44 -08:00
Manfred Stienstra
6099f261ea
Test view path loading from the initializer.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-25 12:49:21 -06:00
Manfred Stienstra
ea5d288606
Test database middleware loading from the initializer.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-25 12:49:10 -06:00
Manfred Stienstra
809409d92f
Add test case for ActiveRecord::ConnectionAdapters::ConnectionManagement.
...
- Make sure ConnectionManagement clears connections after each call, except in tests
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-25 12:48:53 -06:00
Sam Granieri
0a8c003b1e
Ruby 1.9 compat: silence a warning about regexp languages
...
[#2050 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-02-25 09:38:26 -08:00
rick
1cfc39e7e7
update the default scope test to take the model's default scope into account
2009-02-25 09:27:44 -08:00
Diego Algorta
0dd2f96f5c
Fixed bug that makes named_scopes _forgot_ current scope
2009-02-25 09:21:08 -08:00
Joshua Peek
92a30b0c88
missed template fixtures with ~
2009-02-24 11:36:58 -06:00
Joshua Peek
1b22071b27
Ensure ActiveRecord session store's connections are checked in after each request [ #1927 state:resolved]
2009-02-24 11:34:32 -06:00
Joshua Peek
d32eb410f1
Put back dispatcher cleanup call in console reload! [ #2056 state:resolved]
2009-02-24 10:52:51 -06:00
Marcus Mateus
5c684f518f
Just require tmail instead of autoloading it to fix issues when using the gem
...
version [#1851 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-24 10:47:50 -06:00
thedarkone
85df4841dd
Template without a known template handler should only be reachable through its exact path. [ #2027 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-24 10:41:45 -06:00
Matt Jones
b35562f432
correctly handle layouts for AJAX requests and regular js files [ #2052 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-24 10:38:07 -06:00
Pratik Naik
53cd102b39
Merge with docrails
2009-02-24 12:29:25 +00:00
Jeremy Kemper
e56b3e4c0b
Update bundled memcache-client from 1.5.0.5 to 1.6.4.99.
...
See http://www.mikeperham.com/2009/02/15/memcache-client-performance/
2009-02-23 19:28:01 -08:00
David Heinemeier Hansson
45787bdd0e
Fix docs
2009-02-23 12:20:37 +01:00
David Heinemeier Hansson
d13623ca46
Added ActiveRecord::Base.each and ActiveRecord::Base.find_in_batches for batch processing [DHH/Jamis Buck]
2009-02-23 12:11:02 +01:00
Sven Fuchs
441e4e2235
load plugin view_paths to action_mailer view_paths and make action_mailer use them [ #2031 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-22 10:39:56 -06:00
Guillermo Álvarez
ff1afbd650
Deprecated warnings for :skip_last_command and :connector of to_sentence [ #1847 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-02-22 16:11:40 +01:00
David Heinemeier Hansson
b61cad6ae1
Ensure that the app routes file is loaded even when engines are in play (Thjis) [ #1970 state:committed]
2009-02-22 16:04:04 +01:00
Jeremy Kemper
57cca81cae
Don't depend on project.developers ordering
2009-02-21 21:17:17 -08:00
moro
b6c8379834
Expected cookie value should also be escaped.
...
Ruby 1.9 compat for test.
[#1965 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-02-21 21:11:50 -08:00
Michael Koziarski
06040849b5
Revert "Wrap calls to update_attributes in a transaction."
...
This caused failures on sqlite, sqlite3 and postgresql
This reverts commit fc09ebc669 .
[#922 state:reopened]
2009-02-22 16:41:04 +13:00
Andrew White
3248553d32
Fix requirements regexp for path segments
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1772 state:committed]
2009-02-22 15:35:22 +13:00
Andrew White
f7a0a394f4
Remove hardcoded number_of_capturesin ControllerSegment to allow regexp requirements with capturing parentheses
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1887 state:committed]
2009-02-22 15:34:01 +13:00
Xavier Noria
fc09ebc669
Wrap calls to update_attributes in a transaction.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#922 state:committed]
2009-02-22 15:31:27 +13:00
Jeremy Kemper
f4391c362d
Update changelog for URI.unescape fix
...
[#2033 state:committed]
2009-02-20 18:41:42 -08:00
Jeremy Kemper
69bbbe9068
Broaden URI.unescape fix to all affected 1.9.x by checking for broken behavior instead of specific patchlevel
2009-02-20 18:38:18 -08:00
moro
bfe7d518a7
fix test data, should specify encoding to use multibyte chars on Ruby 1.9
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-02-20 18:25:19 -08:00
Jeremy Kemper
98ddc64782
URI.unescape fix removes the old unescape method
2009-02-20 18:25:02 -08:00
moro
3b3dbd7973
Ruby 1.9.1p0's URI.decode() bug fix
...
backport to fix Ruby 1.9.1p0 bug on [ruby-dev:38005].
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-02-20 18:18:39 -08:00
Sven Fuchs
8c5cc66a83
make action_controller/layouts pick templates from the current instance's view_paths instead of the class view_paths [ #1974 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-20 14:19:45 -06:00
Matt Jones
01c818e99f
break out of initializer early if gems aren't loaded [ #1750 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-20 14:16:07 -06:00
thedarkone
6bf9b69bde
Fix a failing mailer test.
2009-02-20 12:08:05 -06:00
Joshua Peek
69c049f5ab
Move development mode reloading up the stack to avoid issues with class reloading in middleware
2009-02-20 12:04:57 -06:00
Sven Fuchs
53fe301a42
Lazy evaluate middleware arguments [ #2028 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-20 10:50:21 -06:00
Joshua Peek
9702636a08
Lazy evaluate ActionController session store middleware class to pickup custom plugin session stores [ #2001 state:resolved]
2009-02-19 21:21:34 -06:00
Bruno Duyé
3668a64170
Make atomic_write() puts the check_file in the cache dir, not in application
...
root [#1962 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-19 21:01:18 -06:00
Joshua Peek
f8ea9f85d4
Fix templates reloading in development when using custom view path [ #2012 state:resolved]
2009-02-19 20:55:56 -06:00
Akira Matsuda
7c0e008973
Ruby 1.9 compat: fix JSON decoding to work properly with multibyte values
...
[#1969 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-02-17 11:58:53 -08:00
Joshua Peek
b6e56efe07
Special case in deprecated CGI proxy layer for Mongrel CGI cookies [ #1957 state:resolved]
2009-02-16 22:17:54 -06:00
Joshua Peek
c33ab118f8
Properly skip fcgi tests if the gem is not installed
2009-02-16 15:12:28 -06:00
Joshua Peek
460269dcaf
Autoload ActionController::Caching::Sweeper constant [ #1977 state:resolved]
2009-02-16 14:37:42 -06:00
Joshua Peek
0096eb1555
Removed dead convert_expires! in Response [ #1952 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-16 14:18:06 -06:00
unknown
2414fdb244
Ensure template_runner can run script/* ruby scripts under Windows. [ #1859 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-02-16 20:22:02 +01:00
Donald Parish
86d8f92282
Fixed http digest authentication to use credentials URI passed from client. [ #1848 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-02-16 20:20:23 +01:00
Joshua Peek
238a6bb62d
Update bundled rack to fix more parameter parsing issues
2009-02-14 18:23:08 -06:00
Sven Fuchs
0cb020b4d6
workaround for picking layouts based on wrong view_paths [ #1974 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-14 18:22:41 -06:00
Levin Alexander
b91d98011c
Remove obsolete silence_warnings wrappers from TZInfo-dependent tests in ActiveSupport [ #1914 state:resolved]
2009-02-14 12:22:39 -06:00
Tekin Suleyman
d676a7f18a
Updated rdoc to reflect changes to form option helpers
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#837 state:committed]
2009-02-14 14:51:40 +13:00
Tekin Suleyman
1525f3816e
Enhanced form option helpers to add support for disabled option tags and use of anonymous functions for specifying selected and disabled values from collections.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-02-14 14:51:35 +13:00
Tekin Suleyman
d206b80a36
DRY up form option helper tests
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-02-14 14:51:35 +13:00
Sam Oliver
f04346d8b9
Stops date select helpers from defaulting the selected date to today if :prompt option has been used
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#561 state:resolved]
2009-02-13 22:04:27 +13:00
Lance Ivy
5dbc9d40a4
Changed API of NestedAttributes to take an array, or hash with index keys, of hashes that have the id on the inside of the attributes hash and updated the FormBuilder to produce such hashes. Also fixed NestedAttributes with composite ids.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
[#1892 state:committed]
2009-02-13 21:47:56 +13:00
Oshoma Momoh
a650852757
Fix loader's LoadError exception message to mention missing plugins and omit loaded plugins.
...
Prior to this change the LoadError message listed all plugins if any one of them was missing.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1921 state:committed]
2009-02-13 21:40:30 +13:00
Pat Nakajima
0c95644396
Changed scaffold generated controller tests to use #to_param.
...
Before, the generated controller tests were calling #id, which
can change over time, making for brittle tests.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1913 state:committed]
2009-02-13 21:37:03 +13:00
Joshua Sierles
11b4a6d74d
Allow memcache-client versions > 1.5.x to override bundled version
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-12 13:16:27 -06:00
thedarkone
3942cb406e
Port fast reloadable templates from rails-dev-boost.
2009-02-12 13:04:12 -06:00
Mike Gunderloy
b1d41bdfb0
Remove space from the test name [ #1953 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-02-12 17:47:52 +01:00
Jiri Zajpt
7ed2e6c463
Adding inflection of databases (usually we wouldn't amend the current defaults, but this seems to obvious) [ #1942 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-02-12 14:31:27 +01:00
Will Bryant
1a2a71333f
Array#wrap should use #to_ary so association collections and named scopes are not re-wrapped
...
[#1935 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-02-10 18:03:33 -08:00
Joshua Peek
ff3fb6c5f3
Reapply 0d5b3e6
2009-02-10 13:36:50 -06:00
Joshua Peek
5689e681e9
Update vendored rack
2009-02-10 13:18:13 -06:00
Joshua Peek
f400209084
Move checkbox hidden field before the actual checkbox so the actual value doesn't get clobbered [ #1863 state:resolved]
2009-02-10 13:10:46 -06:00
Andrew White
199e750d46
Fix some edge cases when the same template is called with different local assigns
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-10 12:09:49 -06:00
Gaspard Bucher
1dab1d3803
Fixes a typo in initializer.rb producing error: undefined local variable or method `view_path'.
2009-02-10 12:00:22 -06:00
Joshua Peek
0d5b3e6b41
Make sure vendored rack is at the front of the load path
2009-02-10 10:48:54 -06:00
David Heinemeier Hansson
7527cdf79c
Added partial scoping to TranslationHelper#translate, so if you call translate('.foo') from the people/index.html.erb template, you'll actually be calling I18n.translate(people.index.foo) [DHH]
2009-02-10 12:57:12 +01:00
Geoff Buesing
3c6bf82115
TimeWithZone#advance: leverage Hash#values_at and non-block form of #any? for a little less line noise, and a slight speedup (thanks raggi and Roman2K)
2009-02-09 23:12:47 -06:00
Geoff Buesing
16cc69af6f
Changelog update for previous commit
2009-02-09 23:11:21 -06:00
Zachary Zolton
73c91429a1
Time#to_s(:rfc822) uses #formatted_offset instead of unreliable and non-standard %z directive [ #1899 state:resolved]
2009-02-09 22:38:43 -06:00
Joshua Peek
5c63be1f92
Still need to setup view paths
2009-02-09 14:53:14 -06:00
Andrew White
893e9eb995
Improve view rendering performance in development mode and reinstate template recompiling in production [ #1909 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-09 14:20:30 -06:00
Geoff Buesing
5120429c31
TimeWithZone#advance: use #any? instead of #detect
2009-02-08 23:40:42 -06:00
Geoff Buesing
887434f75f
TimeWithZone: eliminate unnecessary flatten
2009-02-08 23:32:54 -06:00
Geoff Buesing
5394fcb19a
TimeWithZone: use Array#any? instead of detect, since we don't care about the block return value
2009-02-08 22:19:46 -06:00
Levin Alexander
18d6369344
Make TimeWithZone#to_formatted_s an alias to TimeWithZone#to_s [ #1796 state:resolved]
2009-02-08 11:36:57 -06:00
Joshua Peek
5fbacde2af
Session LazyHash#inspect triggers the hash to load
2009-02-07 16:47:44 -06:00
Joshua Peek
acd0612cde
Don't add vendored rack to load path
2009-02-07 16:22:33 -06:00
Joshua Peek
524d8edf68
Update bundled Rack for Ruby 1.9 spec changes
2009-02-07 16:18:09 -06:00
Joshua Peek
0edb0a4fac
Deprecate ActionController::Response#set_cookie :http_only option infavor of :httponly
2009-02-07 15:37:54 -06:00
Joshua Peek
3c625d65e8
Ruby 1.9 compat: removed redundant nested repeat operator
2009-02-07 15:33:11 -06:00
Joshua Peek
e4a7c0bb5b
~ backup files don't clobber original templates [ #1818 state:resolved]
2009-02-07 12:06:35 -06:00
Andrew White
5f5d2d30a0
Move cleanup before prepare_dispatch so that constants are not loaded twice [ #1898 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-07 11:41:00 -06:00
José Valim
50f51ff950
Render implicit html template when xhr request now supports localization [ #1886 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-07 11:37:02 -06:00
Joshua Peek
f98d8ee72b
Fix up failing tests broke by 2316e7d
2009-02-07 00:35:15 -06:00
Joshua Peek
2316e7dfb1
Fix FCGI handler with lighttpd [ #1854 state:resolved]
2009-02-07 00:25:07 -06:00
Joshua Peek
2277fbedbe
Temporarily bundle Rack 1.0 prerelease for testing
2009-02-07 00:08:28 -06:00
José Valim
24f2e676f7
Added support to dashed locales in templates localization [ #1888 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-06 23:23:50 -06:00
Joshua Peek
43c09383ce
Ensure session id is set in session options hash [ #1880 state:resolved]
2009-02-06 23:16:58 -06:00
Jeremy Kemper
78c6f48b26
Handle either error string or array
2009-02-06 20:26:24 -08:00
Jeremy Kemper
24ac1d6bdc
Oops, don't yield per expression
2009-02-06 17:01:34 -08:00
Jeremy Kemper
49afe58d0b
Test jdbc adapters by default on jruby
2009-02-06 13:32:07 -08:00
Jeremy Kemper
a5c98bb063
Test AR integration with jdbcsqlite3 adapter on jruby
2009-02-06 13:27:50 -08:00
Jeremy Kemper
9c2918d974
Fix example and exception message
2009-02-06 12:50:45 -08:00
Jeremy Kemper
4b48f09a9a
Work around mock request hashing problem on 1.9 and jruby
2009-02-06 12:47:01 -08:00
Jeremy Kemper
f7d509882e
Prefer tap to returning
2009-02-06 12:18:24 -08:00
Jeremy Kemper
95dfcc4f3c
Remove dummy Object#try before aliasing it
2009-02-06 11:49:34 -08:00
Jeremy Kemper
468231ee50
Avoid circular require
2009-02-06 11:48:54 -08:00
Eugene Pimenov
b1c1e3deb7
Ruby 1.9 compat: change encoding of action_view/renderable to utf-8, so erb templates can use utf-8 properly
...
[#1881 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-02-06 11:03:41 -08:00
Eugene Pimenov
ae36fcedce
Ruby 1.9 compat: call bytesize for content_length
...
[#1881 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-02-06 10:28:09 -08:00
Jeremy Kemper
5581229195
Add sibling AS to load path for testing to ensure gems aren't used
2009-02-06 10:23:58 -08:00
Jeremy Kemper
5f56d90085
Use Array.wrap, remove unneeded returning block
2009-02-06 10:05:16 -08:00
Jeremy Kemper
676b0c8764
Introduce Array.wrap(foo) to wrap the argument in an array unless it's already an array. Wraps nil as an empty array. Use instead of Array(foo) and foo.to_a since they treat String as Enumerable.
2009-02-06 10:04:43 -08:00
Jeremy Kemper
7564d98929
Include failed difference expression in assert message
2009-02-06 09:55:32 -08:00
Jeremy Kemper
8746f7cac2
Remove dead testing core_ext
2009-02-06 09:54:13 -08:00
Jeremy Kemper
86dcfdc1fb
Work around enumerable string deprecation warnings
2009-02-06 09:18:41 -08:00
Matthias Hennemeyer
86dd2f841d
Tightening the condition for including ActiveSupport::Testing::SetupAndTeardown::ForMiniTest.
...
[#1871 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-02-06 08:59:02 -08:00
Jeremy Kemper
a4790e93bc
Merge branch 'master' of git@github.com:rails/rails
2009-02-06 08:58:21 -08:00
David Heinemeier Hansson
10b6073968
This is no longer relevant when the 500.html is comletely static
2009-02-06 15:22:04 +01:00
David Heinemeier Hansson
7a5da7ce78
Merge branch 'master' of git@github.com:rails/rails
2009-02-06 12:13:44 +01:00
David Heinemeier Hansson
81c7a5d48d
Remove the ERb in the 500 as it looks dumb when served by the web server directly. Also, to instructions will often be wrong (the error might well be in the web server log)
2009-02-06 12:13:23 +01:00
Jeremy Kemper
34f34e3009
Merge branch 'master' of git@github.com:rails/rails
2009-02-05 23:05:41 -08:00
Joshua Peek
be098f8406
Cleanup application has been merged with reload
2009-02-05 20:39:52 -06:00
Joshua Peek
7259baab47
Restore stale session check and move after dispatch development cleanups before the request
2009-02-05 20:22:43 -06:00
Pratik Naik
96d610553e
Merge docrails along with the new guides and guides generation code
2009-02-06 02:01:22 +00:00
Andrew White
bccd2c54b2
Use Path rather than EagerPath when cache_classes == false so other view paths are properly recompiled in development mode [ #1764 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-05 19:56:22 -06:00
Joshua Peek
f75b98d67e
Revert "Fixed FCGI handling [ #1854 state:resolved]"
...
This reverts commit dcc2407d99 .
2009-02-05 19:40:51 -06:00
Michael Koziarski
011ea46569
Don't use weird attribute_condition methods in AR Session Store
...
Use the hash condition for find instead.
2009-02-06 14:32:03 +13:00
Will Bryant
9991868d85
support end-exclusive ... Ranges in SQL hash condition sanitization properly
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1865 state:committed]
2009-02-06 13:43:02 +13:00
Will Bryant
ba146a84d0
re-enable db:schema:dump so db:migrate:redo dumps the schema after migrating back up
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1412 state:committed]
2009-02-06 13:40:58 +13:00
Max Lapshin
1fe9d6cc88
Support true/false in query_attribute for calculated columns
...
Signed-off-by: Tarmo Tänav <tarmo@itech.ee >
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-02-06 13:39:08 +13:00
Max Lapshin
9c6bde58c5
Fixed tests of postgresql money insertion when non-C locale
...
Signed-off-by: Tarmo Tänav <tarmo@itech.ee >
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-02-06 13:39:07 +13:00
Eloy Duran
db5d695016
Also save :autosave enabled associations when #save! is used.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1877 state:committed]
2009-02-06 13:38:15 +13:00
Pascal Ehlert
455a7633db
Nested attribute accessors should ignore new records with truthy _delete key.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1861 state:committed]
2009-02-06 13:36:59 +13:00
Michael Koziarski
4e4f961c11
Handle every error that can come out of the Iconv branch by rescuing and returning nil
...
[#1195 state:committed]
2009-02-06 13:32:47 +13:00
Pascal Ehlert
d15d53cf81
Allowing an object to be passed explicitly to a fields_for with nested_attributes on one-to-one associations
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1849 state:committed]
2009-02-06 13:26:58 +13:00
Joshua Peek
c96382a71a
Make sure all autoload constants are pulled in when using config.threadsafe! [ #1831 state:resolved]
2009-02-05 16:39:32 -06:00
Peter Wagenet
dcc2407d99
Fixed FCGI handling [ #1854 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-05 16:21:50 -06:00
Andrew White
7aa847fab4
Eliminate unnecessary File.exist? when correct file extension given [ #1879 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-05 15:38:29 -06:00
Adam McCrea
06182ea02e
implicitly rendering a js response should not use the default layout [ #1844 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-05 15:23:05 -06:00
Chris Cherry
b6e7a76cc5
script/server command can accept --path option to set app's root path [ #1156 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-02-05 15:19:40 -06:00
Mike Gunderloy
4866ce45d0
Fix broken scaffolding tests [ #1889 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-02-05 21:07:51 +01:00
David Heinemeier Hansson
9b4aa9bcd9
Revert "created unit tests and fixed bug that failed tests"
...
This reverts commit be1dbf321a .
2009-02-05 21:00:44 +01:00
Thijs de Vries
be1dbf321a
created unit tests and fixed bug that failed tests
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-02-05 20:59:05 +01:00
Matt Jones
250dfb18af
Fixed that ActionMailer should send correctly formatted Return-Path in MAIL FROM for SMTP [ #1842 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-02-05 20:53:02 +01:00
Scott Taylor
5a8f764661
Add ActiveRecord::Base.exists? with no args [ #1817 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-02-05 20:51:06 +01:00
David Heinemeier Hansson
6db78e8c02
Added tests from Andrew Whites fix [ #1385 state:committed]
2009-02-05 20:37:57 +01:00
chris finne
b80fa817d4
Fix a syntax error in current_page?() that was prevent matches against URL's with multiple query parameters [ #1868 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-02-05 20:31:04 +01:00
David Heinemeier Hansson
a2da7fd349
A few more minor scaffold template cleanups
2009-02-05 20:30:33 +01:00
Mike Gunderloy
44f02de2ad
Update scaffolding [ #1840 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-02-05 20:27:48 +01:00
David Heinemeier Hansson
46288f5935
Remove double parenthesis in docs
2009-02-05 20:27:34 +01:00
Jeremy Kemper
6f8ed1cd3f
Migrations: make default database connection overridable
2009-02-04 12:21:22 -08:00
Jeremy Kemper
922c528d42
Ruby 1.9 compat: use String#each_line instead of #each
2009-02-04 09:29:00 -08:00
Jeremy Kemper
b302e023b7
Require rubygems
2009-02-03 18:58:06 -08:00
Jeremy Kemper
aa6c7185ff
Update ci config to use mocha 0.9.5
2009-02-03 18:45:23 -08:00
Jeremy Kemper
4d6d2e9f83
Merge branch 'master' of git@github.com:rails/rails
2009-02-03 18:41:28 -08:00
Jeremy Kemper
bdaf3348de
Ruby 1.9: force ascii encoding for comparison with utf8 regexp
2009-02-03 18:41:06 -08:00
Jeremy Kemper
278186534c
Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha.
2009-02-03 18:40:22 -08:00
Pratik Naik
59fde8a5d6
Remove all the existing asciidoc guides
2009-02-04 01:18:32 +00:00
Pratik Naik
a0f5e0b6d9
Merge docrails
2009-02-03 22:52:07 +00:00
Jeremy Kemper
34a37ea9e8
Workaround jruby issue with protected module attr_accessor showing up as public in included class
2009-02-02 22:39:02 -08:00
Jeremy Kemper
2259ecf368
Don't assume ActiveRecord is available
2009-02-02 22:26:57 -08:00
José Valim
2ecc678ed6
Added localized rescue (404.da.html) [ #1835 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-02-02 17:56:22 +01:00
Pratik Naik
beca1f2e15
Template#mime_type should not use Mime::Type when Action Controller is not included
2009-02-02 00:21:03 +00:00
David Heinemeier Hansson
ed5fa2fe33
Mark CHANGELOGs for release
2009-02-01 22:06:40 +01:00
Pratik Naik
886124e688
Merge docrails
2009-02-01 18:25:03 +00:00
Mike Gunderloy
3be0ad60e4
Add Rails Guides to the default links on generated index.html [ #1839 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-02-01 17:41:12 +00:00
Mike Gunderloy
8d35b36d1a
Add :reconnect option to generated mysql database.yml [ #1838 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-02-01 17:39:20 +00:00
Joshua Peek
5b5d0e325d
Use Rack::Head middleware to ensure the body is discarded for HEAD requests
2009-02-01 01:01:49 -06:00
Joshua Peek
63b4fe53ab
Remove ancient tests for CGI parsing bug
2009-01-31 23:51:42 -06:00
Joshua Peek
28b65c9120
Removed Prototype specific Safari 2 AJAX hack.
...
The normal null character stripper is still there.
2009-01-31 23:51:41 -06:00
Michael Koziarski
fa7aa19a99
Don't rely on the order in these tests
2009-02-01 15:27:41 +13:00
miloops
2b8be761e4
validate_length_of should use custom message if given when using in or within.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1057 state:committed]
2009-02-01 14:58:17 +13:00
Tarmo Tänav
80747e9db1
Removed map.resources :only/:except inheritance
...
It's very rare for these options to apply identically to nested child resources, and with this inheritance on it's very difficult to have a child resource with more actions than the parent.
This reverts commit 2ecec6052f .
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1826 state:committed]
2009-02-01 14:47:56 +13:00
Eloy Duran
ec8f045844
Add support for nested object forms to ActiveRecord and the helpers in ActionPack
...
Signed-Off-By: Michael Koziarski <michael@koziarski.com >
[#1202 state:committed]
2009-02-01 14:44:30 +13:00
Jeremy Kemper
a02d752ae4
Ruby 1.9 compat: omit Rack::Lint from integration tests until it accepts String headers and bodies
2009-01-31 11:03:00 -08:00
Jeremy Kemper
bc94061156
Fix unsorted array comparison
2009-01-31 10:56:16 -08:00
Jeremy Kemper
4790e02e74
Ruby 1.9 compat: work around that String is not Enumerable
2009-01-31 10:55:47 -08:00
Luca Guidi
75b2e7e9c9
Make sure XmlMini is being correctly autoloaded by Ruby 1.9.1
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-01-31 10:26:24 -08:00
Charles Nutter
ed0e564087
Ensure constant_watch_stack is protected by a mutex, so concurrent requires do not corrupt it.
...
[#1816 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-01-30 08:27:03 -08:00
Scott Taylor
2dedb5b03a
Controller, response, and request should all refer to same session, even after a call to session_reset [ #1823 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-29 19:39:48 -06:00
Mike Gaffney
1b79683171
Deprecation tests for f17c876 [ #1801 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-29 19:37:38 -06:00
Pratik Naik
b3bc4fa5e0
Digest#validate_digest_response should accept request instead of controller
2009-01-29 22:06:03 +00:00
Jon Crawford
8761663a68
Added grouped_options_for_select helper method for wrapping option tags in optgroups. [ #977 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-29 18:00:18 +00:00
Gregg Kellogg
306cc2b920
Implement HTTP Digest authentication. [ #1230 state:resolved] [Gregg Kellogg, Pratik Naik]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-29 16:01:59 +00:00
Jacob Dunphy
e6493eb9b7
Sqlite adapter's copy_table incorrectly attempts to recreate a primary key id (:id => true in the create_table) if an :id column is present, even if it isn't a primary_key.
...
This fix sets :id => false if there is an :id column, but it's not the primary_key.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1766 state:committed]
2009-01-29 17:34:33 +13:00
Michael Koziarski
feed7b4cfd
Move to use pg instead of postgres on the CI server
2009-01-29 17:07:29 +13:00
Joshua Peek
2e69db18ce
Only dup local cache values if duplicable [ #1653 state:resolved]
2009-01-28 21:20:46 -06:00
Pratik Naik
a1a9889b06
Move basic auth test controller inside the test class
2009-01-29 01:59:55 +00:00
Bob Aman
166c63818e
Improve exception handling when Location header is invalid. [ #1192 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-28 20:56:46 +00:00
Dan Weinand
91eeb0ff11
Using the highlight helper on text with html shouldn't highlight text inside html attributes. [ #1302 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-28 19:53:59 +00:00
Filip H.F. "FiXato" Slagter
a0d8202bb9
Ensure whitespaces are stripped when merging string joins. [ #1297 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-28 19:50:55 +00:00
Bryan Ray
f725b19710
Added options to script/dbconsole to sqlite3 console in various different modes. [ #607 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-28 19:47:45 +00:00
Rasik Pandey
6079ec1f77
ActiveResource#eqls? and == should not take into account object identity and prefix options should be considered. [ #1098 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-28 19:39:06 +00:00
Daniel Rodríguez Troitiño
9a8e2a059c
Ensure selected option is not ignored for collection_select. [ #1037 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-28 19:35:18 +00:00
Nathan de Vries
32eeb3e521
Ensure that when UrlWriter is included in multiple classes, the default_url_options of one don't affect the other. [ #1277 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-28 19:31:48 +00:00
Pratik Naik
74871961ec
Add array id support to Model.update_counters. [ #1254 state:resolved] [Carlos Júnior]
2009-01-28 19:20:55 +00:00
Pratik Naik
2ae8d3079b
Session cookie header should always be set if :expire_after option is specified
2009-01-28 05:05:48 +00:00
Jeremy Kemper
9714a9b001
Use toplevel reference to ::StringIO since we're in a BasicObject.
2009-01-27 15:25:05 -08:00
David Heinemeier Hansson
e73445ba1b
Merge branch 'master' of git@github.com:rails/rails
2009-01-27 16:13:23 -06:00
Tys von Gaza
dd02af5c7e
Fix for sweepers method_missing missing &block argument [ #1581 status:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-01-27 16:11:45 -06:00
Joshua Peek
f716ab92bf
Disable eager loading for all rake tasks [ #802 state:resolved]
2009-01-27 15:53:02 -06:00
Joshua Peek
093f758bd0
Restore implicit rendering for XHR requests that want a HTML template [ #1590 state:resolved]
2009-01-27 14:09:11 -06:00
Joshua Peek
f17c87665e
Fixed deprecated methods on TestSession [ #1801 state:resolved]
2009-01-27 12:28:05 -06:00
Pratik Naik
57b156b338
Dont use Memoizable for ActionController::Request
2009-01-27 17:26:37 +00:00
Yaroslav Markin
17db28f1ca
Improve i18n support for number_to_human_size helper:
...
* now using pluralization properly
* storage unit translations moved to number.human.storage_units.units
* introduced number.human.storage_units.format for languages that do not follow "{{number}} {{unit}}" format (Japanese)
NOTE: I18n table changed, you will need to update your translations.
[#1634 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-01-27 09:22:00 -08:00
Joshua Peek
a1ac635d96
Ensure the full path is used when searching for layouts [ #1803 state:resolved]
2009-01-27 11:08:29 -06:00
Dov Murik
5fe6635e05
Mysql#reconnect is set according to the 'reconnect' key in the connection spec.
...
The 'reconenct' boolean option is read from the connection specification
and is used to set the reconnect attribute of Mysql. The default is
false in order not to change existing application behaviour.
Also, reconnect is set AFTER real_connect is called, so its value sticks
(the mysql gem sets reconnect to false inside real_connect).
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1797 state:committed]
2009-01-27 09:55:25 +13:00
Joshua Peek
57f0b85900
Fix for failing ActionMailer multipart tests
2009-01-26 13:15:29 -06:00
Joshua Peek
a98cd7ca9b
Add localized templates
...
# Default locale
app/views/messages/index.html.erb
# I18n.locale is set to :da (Danish)
app/views/messages/index.da.html.erb
2009-01-25 22:51:21 -06:00
Sven Fuchs
5c062bf100
add #available_locales to I18n and I18n::SimpleBackend, flatten translations load_path when loading translations [ #1714 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-25 22:51:21 -06:00
Greg Borenstein
f4bf318db0
add an inspect method to OrderedHash to make it clear that it is not a species of Array
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1782 state:committed]
2009-01-26 16:26:37 +13:00
Stephen Bannasch
4ef9845aa3
Adding AR tests for JDBC connections
...
New connections:
jdbcmysql jdbcpostgresql jdbcsqlite3 jdbcderby jdbch2 jdbchsqldb jdbcpostgresql
To test you will need the native database installed (if one is required),
activerecord-jdbc-adapter and the specific activerecord-jdbc<database>-adapter
for the database you are testing.
Run the tests like this:
jruby -S rake test_jdbcmysql
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1685 state:committed]
2009-01-26 16:08:44 +13:00
Pratik Naik
617ad23574
Remove the irrelevant fixture added in fe6ffce51d
2009-01-24 18:22:17 +00:00
Pratik Naik
fe6ffce51d
Make sure inner scope conditions get a preference over the outer ones
2009-01-24 17:54:10 +00:00
Pratik Naik
b2192888ab
Fix the changelog entry
2009-01-23 15:38:19 +00:00
Josh Susser
ccda96093a
Minor refactoring of validates_associated to replace #inject with #collect + #all?
...
[#1686 state:committed]
2009-01-22 13:45:19 +13:00
Joshua Peek
73cc5f270a
Setup ActiveRecord QueryCache middleware in the initializer
2009-01-21 12:44:07 -06:00
Joshua Peek
82334a7431
Only insert metal middleware if any exist
2009-01-21 12:37:03 -06:00
Joshua Peek
ae3a93ad89
Missed RequestParser in ff0a267
2009-01-21 12:29:41 -06:00
Joshua Peek
a8ad6568f9
Allow empty files to be uploaded
2009-01-20 20:34:35 -06:00
Joshua Peek
7e4d13d357
Add MiddlewareStack#swap
...
config.middleware.swap ActionController::Session::CookieStore, MySessionStore
2009-01-20 20:19:52 -06:00
Mislav Marohnić
01f06fc7f4
Don't let empty Tempfiles come through as uploaded files [ #1785 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-20 12:38:25 -06:00
Cody Fauser
c090e5e075
Restore cookie store httponly default to true. Remove extraneous dup of options on initialization [ #1784 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-20 11:50:43 -06:00
Pratik Naik
9cefd5ea0c
Deprecate ActionController::Base#session_enabled?
2009-01-19 18:53:14 +00:00
Pratik Naik
68fdfde003
Improve HTTP Basic authentication tests
2009-01-18 19:21:34 +00:00
Pratik Naik
39e1ac658e
Merge docrails
2009-01-18 18:10:58 +00:00
Pratik Naik
085991891e
Bump up the year in MIT license files
2009-01-18 05:28:21 +00:00
Pratik Naik
41af606db3
Remove script/performance/profiler in favour of performance integration tests.
...
To continue using script/performance/profiler, install the request_profiler plugin :
script/plugin install git://github.com/rails/request_profiler.git
2009-01-18 05:20:39 +00:00
Jose' Valim
c2e7851fb2
Add ActionMailer::Base#enable_starttls_auto option for enabling/disabling STARTTLS. [ #1731 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-18 04:19:18 +00:00
Joshua Peek
ff0a2678c4
Build query string and POST params parser on top of Rack::Request. Also switch our multipart parser to use Racks. Moved XML, JSON, and YAML parsers into ActionController::ParamsParser middleware [ #1661 state:resolved]
2009-01-17 20:29:50 -06:00
Joshua Peek
aab760c3df
Add test coverage for fixing Safari 2 trailing null character
2009-01-17 20:03:22 -06:00
Josh Susser
78f2c19ae7
Refactor Object#try to use inheritance. [ #1774 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-18 00:47:38 +00:00
Pratik Naik
3b1cd9e525
Fix has_and_belongs_to_many_associations tests. #1738
2009-01-18 00:34:57 +00:00
Lourens Naude
b08c968875
Decouple the local cache strategy from MemCacheStore for reuse with other remote stores [ #1653 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-17 18:05:48 -06:00
Joshua Peek
29e7a02428
Ensure any method sent to RewindableIO reads the original IO object [ #1767 state:resolved]
2009-01-17 11:12:18 -06:00
Joshua Peek
515a1a3328
Lock middleware has been committed upstream
2009-01-17 10:16:31 -06:00
lukeludwig
3ee4e00918
Cache columns for has_and_belongs_to_many associations
...
This avoids repeatedly calling SHOW COLUMNS when the association is queried
[#1738 state:committed]
2009-01-17 18:09:13 +13:00
Jeremy Kemper
fe013ce934
Fix performance regression
2009-01-16 20:36:59 -08:00
Jeremy Kemper
78af271069
Skip respond_to check so rack.input doesn't have to implement it
2009-01-16 20:36:59 -08:00
Mike Gunderloy
1e02d95d60
Make ActioMailer quoting test play nice with Ruby 1.9 [ #1726 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-16 17:25:37 +00:00
Josh
7260852187
Fix date_select within fields_for with an index [ #1666 state:resolved] [Josh, Frederick Cheung]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2009-01-16 17:23:43 +00:00
Brandon Keepers
452cd74d81
Dup keys in OrderedHash to prevent them from being modified [ #1676 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2009-01-16 17:23:43 +00:00
Carlos Kozuszko
5ed119c005
Fix dirty handling of nullable non-integer numeric columns [ #1692 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2009-01-16 17:23:35 +00:00
Ben VandenBos
0e92f67073
Make belongs_to :dependent => :destroy destroy self before associated object [ #1079 state:resolved]
...
If foreign key constraints are in place then deleteing the associated object first will cause a foreign key violation
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2009-01-16 17:23:19 +00:00
Michael Koziarski
f2ee3f20df
Fix the AR json serialization tests to comply with the earlier change to quote keys correctly
2009-01-16 17:57:45 +13:00
Michael Koziarski
0bed5bdb21
Properly quote json keys.
...
According to the RFC and the json.org site all json keys must be strings, and those strings must be quoted with double quotes.
[#1755 state:committed]
2009-01-16 17:40:04 +13:00
Nahum Wild
a53ad5bba3
Added in a local per request cache to MemCacheStore. It acts as a buffer to stop unneccessary requests being sent through to memcache [ #1653 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-15 21:29:32 -06:00
Michael Lovitt
7a0e7c7270
Fixed broken after_save callback; was being called when before_create was canceled or before_update was canceled
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1735 state:committed]
2009-01-16 10:11:58 +13:00
Carlos Kozuszko
c891d685de
Fixing bug on ActiveRecord::Dirty#field_changed? for nullable numeric columns, NULL gets stored in database for blank (i.e. '') values. Only integer columns were considered.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1692 state:committed]
2009-01-16 10:00:39 +13:00
Hongli Lai (Phusion)
9bcf01b23c
Fix PostgreSQL unit test failures that only occur when using the old 'postgres' driver.
...
[#1748 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-01-13 15:58:50 -08:00
Joshua Peek
b281a6a5b2
Use Rack's MethodOverride lib [ #1699 state:resolved]
2009-01-13 17:26:29 -06:00
Joshua Peek
9775c25824
Update multipart tests to expose (another) bug in Rack's multipart parser
2009-01-13 17:21:45 -06:00
Joshua Peek
1adc1496f9
Add RewindableInput wrapper to fix issues with middleware that impolitely eat up non-rewindable input
2009-01-13 16:09:51 -06:00
Bryan Ash
5a43908c74
Explicitly read as binary in multipart_body for Windows [ #1065 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-13 14:42:43 -06:00
Cody Fauser
d3107ce3b0
Use :key instead of old :session_key in session_store.rb generator and docs [ #1746 state:resovled]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-13 14:27:23 -06:00
Cody Fauser
b6a94fc1c6
Remove legacy reloadable? method from ActiveRecord::SessionStore [ #1745 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-13 13:45:10 -06:00
Pratik Naik
c99ef814b0
Revert "HTTP Digest authentication [ #1230 state:resolved]"
...
This reverts commit 45dee3842d .
Reasons :
1. The code is not working in it's current state
2. Should not be using exceptions for flow control
2009-01-13 16:13:42 +00:00
Pratik Naik
5339f813be
Change Object#try to raise NoMethodError on private methods and always return nil when Object is nil [Pratik Naik, Lawrence Pit]
2009-01-13 03:28:32 +00:00
Nicholas Dainty
296ca4da17
TimeWithZone#xmlschema accepts optional fraction_digits argument [ #1725 state:resolved]
2009-01-11 13:56:07 -06:00
Jeremy Kemper
f1fff0a480
Merge branch 'master' of git@github.com:rails/rails
2009-01-10 15:09:08 -08:00
Joshua Peek
18cb0493d1
Refactor request urlencoded params parsing tests
2009-01-10 16:02:03 -06:00
Jeremy Kemper
ab0ce052ba
Introduce transaction_joinable flag to mark that the fixtures transaction can't joined, a new savepoint is required even if :requires_new is not set. Use :requires_new option instead of :nest. Update changelog.
...
[#383 state:committed]
2009-01-10 13:39:37 -08:00
Jeremy Kemper
223a1d9451
Merge branch 'master' into savepoints
2009-01-10 12:14:44 -08:00
Joshua Peek
9fe69b225c
Moved query string parsing tests into the request tests folder
2009-01-10 11:39:57 -06:00
Joshua Peek
92dbf5ba83
Refactor request multipart params parsing tests
2009-01-10 11:32:38 -06:00
Joshua Peek
40a75a5091
Refactor request xml params parsing tests
2009-01-09 16:05:27 -06:00
Joshua Peek
38a723e6ea
Refactor request json params parsing tests
2009-01-09 15:43:32 -06:00
Joshua Peek
ac4bf1180a
Ensure we override Rack::Request's POST method too
2009-01-09 13:12:39 -06:00
Joshua Peek
282c1d6159
Refactor request query string parsing tests
2009-01-09 12:52:59 -06:00
Joshua Peek
e1f73aab8c
Inherit ActionController::Request from Rack::Request
2009-01-09 11:47:44 -06:00
Pratik Naik
e0fa041fce
Process time should be wall time when benchmarking
2009-01-09 16:46:24 +00:00
Jeremy Kemper
859e1508be
Fix test broken by test process changes
2009-01-07 16:37:32 -08:00
Jeremy Kemper
074414883c
Remove Content-Length header from :no_content responses
2009-01-07 15:55:28 -08:00
Jeremy Kemper
48963a55c7
Set assigns for integration tests also
2009-01-07 15:52:19 -08:00
Jeremy Kemper
347db97edd
Take care not to mix in public methods
2009-01-07 14:49:12 -08:00
Jeremy Kemper
c90572e3ab
Use instance_eval instead of adding an accessor to the class
2009-01-07 14:49:12 -08:00
Jeremy Kemper
35fa007313
Include process methods in ActionController::TestCase only. No need to alias_method_chain :process either.
2009-01-07 14:49:05 -08:00
Jeremy Kemper
0f9e65b71f
Object#tap for Ruby < 1.8.7
2009-01-07 13:19:48 -08:00
Pratik Naik
17da45b789
Fix JSON decoder date-converter regexp [ #1662 state:resolved] [Jonathan del Strother]
2009-01-07 17:51:11 +00:00
Michael Koziarski
2f92313324
Spam people with commit rights on test failures.
2009-01-07 18:18:00 +13:00
Mike Gunderloy
19818eb0ea
Update CI configuration to reflect latest gems.
2009-01-07 16:42:53 +13:00
Jeremy Kemper
8736dd3241
Fix failing flash test
2009-01-06 16:57:41 -08:00
Jeremy Kemper
851c3de5c9
Merge branch 'master' of git@github.com:rails/rails
2009-01-06 15:36:38 -08:00
Jeremy Kemper
9b96e8d1cc
Consolidate test_help requires
2009-01-06 15:36:08 -08:00
Jeremy Kemper
84194ce936
Explicitly require AS::TestCase
2009-01-06 15:35:46 -08:00
Joshua Peek
b7ea4add86
Bump Rack version to 0.9
2009-01-06 15:20:57 -06:00
Joshua Peek
ce706b4b9b
Cache AssetTag timestamps
2009-01-04 15:39:16 -06:00
gbuesing
d2a1c2778e
TimeWithZone#- gives correct result with wrapped DateTime, and with DateTime argument
2009-01-04 13:58:08 -06:00
Joshua Peek
f00e86d7e9
Memoize request accessors on the Rack env so other request objects have access to the same cache [ #1668 state:resolved]
2009-01-04 12:15:15 -06:00
Joshua Peek
ed2e776bde
Move metal above method piggybacking middleware and add some test coverage
2009-01-03 23:02:29 -06:00
Joshua Peek
f7ee082bb3
Add failing test for file uploads with unrewindable input
2009-01-02 18:46:01 -06:00
Joshua Peek
104898fcb7
Revert to the good old days when AssetTag didn't cause anyone problems
2009-01-02 13:40:23 -06:00
Laszlo Bacsi
606176a55b
Fixed call_with_exception for Routing Errors [ #1684 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-02 10:46:48 -06:00
ddemaree
f90160c6c1
Fixed bug where calling app method from console would raise ArgumentError [ #1629 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-01-02 10:31:21 -06:00
David Heinemeier Hansson
a1fb57aa69
Added :silence option to BenchmarkHelper#benchmark and turned log_level into a hash parameter and deprecated the old use [DHH]
2009-01-01 18:53:16 +01:00
David Heinemeier Hansson
f1e20ce9a7
Merge branch 'master' of git@github.com:rails/rails
2009-01-01 18:13:14 +01:00
David Heinemeier Hansson
49a055dff6
Fixed the AssetTagHelper cache to use the computed asset host as part of the cache key instead of just assuming the its a string [ #1299 state:committed]
2009-01-01 18:12:49 +01:00
Jeremy Kemper
a5004573d8
Only silence backtrace from plugin lib dirs
2008-12-30 18:25:44 -08:00
Jeremy Kemper
2e1132fad8
Test that exceptions raised in filters are properly rescued
2008-12-30 18:06:56 -08:00
Jeremy Kemper
c69d8c043f
Fix formatted_* deprecation message
2008-12-30 15:16:51 -08:00
Jeremy Kemper
2f9edde142
Clean trailing / after rails root from backtraces
2008-12-30 12:44:31 -08:00
Jeremy Kemper
d961592886
Merge branch 'master' of git@github.com:rails/rails
2008-12-30 12:40:32 -08:00
Pratik Naik
82443ecfad
Merge commit 'fred/pullable'
2008-12-30 17:50:17 +00:00
Mike Gunderloy
a29369ae4a
Fix named scope tests for sqlite3 [ #1667 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-30 03:10:11 +00:00
Mike Gunderloy
220dff4c3b
Add transaction check to SQLite2 adapter to fix test_sqlite_add_column_in_transaction_raises_statement_invalid [ #1669 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-30 03:07:30 +00:00
Joshua Peek
558ab327b7
Clean up view path cruft and split path implementations into Template::Path and Template::EagerPath
2008-12-29 19:27:19 -06:00
Jeremy Kemper
276ec16007
Merge branch 'master' of git@github.com:rails/rails
2008-12-29 14:38:54 -08:00
Mike Gunderloy
490c26c843
Fix failing gem dependency tests [ #1659 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-29 20:00:47 +00:00
Mike Gunderloy
36af857c43
Fix FCGI dispatching tests
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-29 19:58:10 +00:00
Joshua Peek
c20c72e3d9
Use rack namespace for routing args
2008-12-28 15:34:59 -06:00
Joshua Peek
5d89605c11
Make router and controller classes better rack citizens
2008-12-28 15:31:03 -06:00
Joshua Peek
45dee3842d
HTTP Digest authentication [ #1230 state:resolved]
2008-12-28 15:13:16 -06:00
Joshua Peek
1f0aecd931
Allow custom rails generators to pass in their own binding to Create command so that the corresponding erb templates get rendered with the proper binding [ #1493 state:resolved]
2008-12-28 15:10:41 -06:00
Joshua Peek
1e45818a62
Allow multiple conditions for callbacks [ #1627 state:resolved]
2008-12-28 15:07:17 -06:00
Yaroslav Markin
3b92b141fd
Fix 'i18n' require broken by 0.0.1 -> 0.1.1 commit [ #1658 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-12-28 21:34:57 +01:00
Yaroslav Markin
1648df79b7
Update i18n gem to version 0.1.1 (Rails' changes were backported) [ #1635 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-12-28 21:19:27 +01:00
David Heinemeier Hansson
0efec64520
Merge branch 'master' of git@github.com:rails/rails
2008-12-28 20:53:58 +01:00
Yaroslav Markin
66ee5890c5
Introduce dynamic scopes for ActiveRecord: you can now use class methods like scoped_by_user_name(user_name) and scoped_by_user_name_and_password(user_name, password) that will use the scoped method with attributes you supply. [ #1648 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-12-28 20:52:46 +01:00
Xavier Noria
a2270ef259
Inline code comments for class_eval/module_eval [ #1657 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-28 19:49:28 +00:00
Mike Gunderloy
1fb275541a
Ensure template runner tests don't depend on hash ordering [ #1654 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-28 17:49:58 +00:00
Pratik Naik
fec0ea9d6d
Request#env['SERVER_NAME'] does not contain port number
2008-12-28 17:07:13 +00:00
Aaron Quint
c0c79f779c
Use SimpleLogger for Rails::TemplateRunner outside of the Generator context [ #1618 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-28 16:49:19 +00:00
Mark Reginald James
5138f755ff
Fixed incorrect parsing of query parameters with mixed-depth nesting inside an array [ #1622 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-28 01:15:48 +00:00
Aaron Quint
9fd35fc2d8
Adding test coverage and better logging to Rails::TemplateRunner [ #1618 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-27 21:03:44 +00:00
Yaroslav Markin
fdaa9ed033
Fix ActionPack build on Windows: we really should not test anything regarding symlinks on Windows.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-27 17:33:13 +00:00
Yaroslav Markin
28347d889b
Refactor ActiveRecord::Base#new_record? [ #1647 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-12-27 15:25:39 +01:00
Frederick Cheung
afdec83ed5
Fix to_sentence being used with options removed by 273c77
2008-12-27 14:16:17 +00:00
Yaroslav Markin
6e98adfc8e
ActiveRecord::Base#new_record? now returns false for existing records (was nil) [ #1219 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-12-27 14:36:11 +01:00
Yehuda Katz
4f043a4838
More optimizations on respond_to after a profile and benching:
...
App with simple respond_to:
def index
respond_to do |format|
format.html
format.xml
format.json
end
end
On JRuby (after complete hotspot warmup) -- 8% improvement:
550 requests per second after this commit
510 requests per second with old method_missing technique
On MRI (8% improvement):
430 requests per second after this commit
400 requests per second with old method_missing technique
2008-12-27 00:06:57 -08:00
Roman Shterenzon
21efba464a
Fix HasManyAssociation#create ignoring the :primary_key option [ #1633 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-27 01:10:29 +00:00
Frederick Cheung
f9cab0e503
Fix :include of has_one with :primary_key option
2008-12-26 23:26:37 +00:00
Frederick Cheung
7db1704068
Fix :include of has_many associations with :primary_key option
2008-12-26 23:17:56 +00:00
Pratik Naik
f4f8923cf0
Merge commit 'fred/pullable'
2008-12-26 21:56:21 +00:00
Yehuda Katz
6dc1288111
Remove method missing use in respond_to
2008-12-26 13:41:02 -08:00
Frederick Cheung
5cebe69e74
Preload uses exclusive scope [ #643 state:resolved]
...
With self referential associations, the scope for the the top level should not affect fetching of associations, for example
when doing
Person.male.find :all, :include => :friends
we should load all of the friends for each male, not just the male friends.
2008-12-26 18:25:55 +00:00
Pivotal Labs
eb457ceee1
Association preloading no longer stops if it hits a nil object [ #1630 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-26 18:25:50 +00:00
trans
c9d4335418
MaKe Hash#slice! return removed values, akin to Array [ #971 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-26 18:25:42 +00:00
Frederick Cheung
dce0da77e7
Fix assert_select_rjs not checking id for inserts [ #540 state:resolved]
2008-12-26 18:25:32 +00:00
Frederick Cheung
d7b6e48c70
Fix randomly failing cookie store tests
...
Marshal.dump(Marshal.load(marshaled_hash)) is not guarenteed to be equal to marshaled_hash
because of the lack of ordering of hash
2008-12-26 18:25:03 +00:00
Pratik Naik
db5a98e6cb
Merge docrails
2008-12-26 17:19:59 +00:00
Pratik Naik
07298fd092
Don't recurse when ActionController#render is called without any arguments
2008-12-26 01:49:14 +00:00
Pratik Naik
80307c8b0a
Make ActionController#render(symbol) behave same as ActionController#render(string) [ #1435 ]
2008-12-26 01:12:11 +00:00
Pratik Naik
cd1d6e8768
Make ActionController#render(string) work as a shortcut for render :action => string. [ #1435 ]
...
Examples:
# Instead of render(:action => 'other_action')
render('other_action')
Note : Argument must not have any '/'
2008-12-25 23:05:34 +00:00
Pratik Naik
d67e03871e
Make ActionController#render(string) work as a shortcut for render :template => string. [ #1435 ]
...
Examples:
# Instead of render(:template => 'controller/action')
render('controller/action')
Note : Argument must not begin with a '/', but have at least one '/'
2008-12-25 22:26:03 +00:00
Pratik Naik
061952392a
Make ActionController#render(string) work as a shortcut for render :file => string. [ #1435 ]
...
Examples:
# Instead of render(:file => '/Users/lifo/home.html.erb')
render('/Users/lifo/home.html.erb')
Note : Filename must begin with a forward slash ('/')
2008-12-25 21:43:07 +00:00
Pratik Naik
dd0753458f
Move ActionController::Base#render arguments validation to a separate method
2008-12-25 20:49:31 +00:00
Pratik Naik
04a8b2362d
Make render_test.rb run in isolation
2008-12-25 19:28:08 +00:00
Pratik Naik
6e2a771661
Undry ActionController::TestCase#<HTTP_METHODS> for better documentation
2008-12-25 17:54:44 +00:00
Pratik Naik
e898f82a74
Move request parsing related code to ActionController::RequestParser
2008-12-25 03:51:04 +00:00
Joshua Peek
9c1e48eaea
ActionController::VerbPiggybacking middleware
2008-12-23 13:36:05 -06:00
Pratik Naik
3562d54d18
Remove duplicate attr_reader :env
2008-12-23 00:36:13 +00:00
Pratik Naik
293bb02f91
Unify ActionController::AbstractRequest and ActionController::Request
2008-12-23 00:30:32 +00:00
Pratik Naik
b5ecfe78f9
Use Rack::MockRequest for TestRequest
2008-12-23 00:30:32 +00:00
Pratik Naik
7e1751111e
Rename RackRequest to Request
2008-12-23 00:30:32 +00:00
Pratik Naik
408ec6c0dc
Remove rack_process.rb
2008-12-23 00:30:32 +00:00
Pratik Naik
900aad677f
Remove deprecated relative_url_root
2008-12-23 00:30:32 +00:00
Joshua Peek
faf8364050
Defining a new method is atomic, no mutex needed.
2008-12-22 16:58:48 -06:00
Jeremy Kemper
2e053aec9b
Don't construct object deprecation proxy if unneeded
2008-12-22 14:48:45 -08:00
Joshua Peek
0b22a96b7a
Move default middleware stack to middlewares.rb
2008-12-22 12:04:32 -06:00
Joshua Peek
aa002c0e86
ActiveRecord::QueryCache middleware
2008-12-22 11:31:18 -06:00
Luis Hurtado
63aac33833
Ensure of Model#create support custom updated_at and updated_on attributes [ #1612 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-22 15:19:33 +00:00
Sam Oliver
70456aed31
Use I18n for date/time select helpers prompt text [ #561 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-22 15:13:39 +00:00
Sergio Gil
e8de7a67a5
Add :allow_nil option to delegate [ #1127 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-21 23:24:06 +00:00
Daniel Luz
f7bd0beb67
Ensure Model#last doesn't affects order for another finders inside the same scope [ #1499 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-21 23:24:06 +00:00
Sam Oliver
389534c38c
Added prompt options to date helpers [ #561 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-21 23:24:05 +00:00
Joshua Peek
858a420ce1
Ensure the template format is always passed to the template finder. Now we can cleanup some nasty stuff.
2008-12-21 17:24:16 -06:00
Pratik Naik
f5b7f0911b
Merge commit 'fred/more_pullable'
2008-12-21 19:04:48 +00:00
=?utf-8?q?Adam=20Cig=C3=A1nek?=
fcd58dc27a
Allow use of symbols for :type option of ActionController::Streaming#send_file/#send_data [ #1232 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-21 18:58:55 +00:00
pfagiani
7cda0df7f1
Fix script/dbconsole not handling numeric password [ #1395 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-21 16:48:02 +00:00
Pratik Naik
fab4f96bf2
Correct description of tmp:create task [ #1607 state:resolved] [Roderick van Domburg]
2008-12-21 16:10:26 +00:00
Frederick Cheung
b17b9371c6
Fix configure_dependency_for_has_many not quoting conditions properly [ #1461 state:resolved]
2008-12-21 15:57:48 +00:00
Frederick Cheung
6f4b2469fb
Use explicit order to stop test failing randomly
2008-12-21 15:57:21 +00:00
Frederick Cheung
cf9c36834a
Fix failing cookie store test
2008-12-21 15:57:09 +00:00
Frederick Cheung
40247a8cbb
Remove observe_field :on option as prototype no longer supports it [ #1088 state:resolved]
2008-12-21 15:55:52 +00:00
Yaroslav Markin
276ea48de9
Remove dead commented out code [ #1467 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-21 15:55:42 +00:00
Joshua Peek
3b317b7100
Switch to Rack::Response#set_cookie instead of using CGI::Cookie to build cookie headers
2008-12-20 21:25:47 -06:00
Frederick Cheung
606cd61b9a
Fix Mime::Type#=~ not using Regexp.quote
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-21 02:24:22 +00:00
Karthik Krishnan
75a133f92f
Fix has many through not quoting table names [ #1163 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-20 21:08:51 +00:00
Emilio Tagua
c092dbef50
Add missing fixture to allow reload models test to run isolated [ #1609 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-20 20:39:25 +00:00
Matt Bauer
7b249b67e9
Fix reset_session with lazy cookie stores [ #1601 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-20 14:37:51 -06:00
Pratik Naik
462c75b60c
Fix duplicate test name [ #1058 state:resolved] [Dave Rothlisberger, Pratik Naik]
2008-12-20 18:08:54 +00:00
Joshua Peek
fda62ecf70
Rename AbstractResponse to Response and inheirt from Rack::Response
2008-12-19 17:15:22 -06:00
Joshua Peek
a14bbd7a85
Process CGI 'cookie' header into 'Set-Cookie' for all responses.
...
This mostly affects response.headers['cookie'] for test requests. Use response.cookies instead.
2008-12-19 16:49:06 -06:00
Joshua Peek
cbee72d216
Improve cookie test coverage
2008-12-19 16:35:23 -06:00
Joshua Peek
3da1b94d07
Use status response accessor instead of the 'Status' header
2008-12-19 15:05:51 -06:00
Joshua Peek
12e416a04b
Diverge Metal implementation from Rack::Cascade since we want the last app to return its headers and body if the status is a 404.
2008-12-19 11:07:25 -06:00
Pratik Naik
c3f53f412c
Merge docrails
2008-12-19 14:27:43 +00:00
Pratik Naik
89b7581404
Add repair_helper.rb file I forgot in previous commit 8a92cd
2008-12-19 13:52:21 +00:00
Murray Steele
8a92cdc863
Add a repair_helper to repair changes to the validations inside validations_test.rb [ #674 state:resolved]
...
Many of the tests in validations_test would add a new validation to
models. However, only Topic was being reset with a fairly aggressive
clearing of all validations. None of the other models being used however
were recieving the same treatment. Now we use repair_validations(Topic)
for the whole test case because most test cases use Topic and then the
block form of repair_validations(<other_models>) inside any tests that use
other models.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-19 13:37:50 +00:00
Pratik Naik
c044c079ab
Revert "Auto-load template handlers based on unmatched extensions [ #1540 state:resolved]"
...
This reverts commit e8c1915416 .
Reasons :
- ActionPack tests run very slow
- Gem.searcher hanging for long time when extension is nil
2008-12-19 13:05:45 +00:00
Jeremy Kemper
6ce4b43035
Cheaper metal cascade
2008-12-18 16:55:03 -08:00
Jeremy Kemper
03f6ecc6c6
Use LogTailer
2008-12-18 16:53:53 -08:00
Jeremy Kemper
248391a7e1
Merge branch 'master' of git@github.com:rails/rails
2008-12-18 14:49:02 -08:00
Jeremy Kemper
86abd6887d
Ensure rack.multithread is set back to original value. Accept external lock.
2008-12-18 14:48:53 -08:00
Jeremy Kemper
788ab8458a
No need to dup immutable options
2008-12-18 14:42:58 -08:00
Jeremy Kemper
c81cd321d1
Be sure to call super
2008-12-18 14:42:39 -08:00
Jeremy Kemper
a10e473b81
Rename Rails::Rack::Logger -> LogTailer. Speed up log mtime checks.
2008-12-18 14:42:06 -08:00
Jeremy Kemper
6703f909c7
Cheaper log tail time comparison
2008-12-18 14:17:43 -08:00
Matt Jones
a9422cc1db
Fix preloading of has_one :through associations on belongs_to [ #1507 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-18 19:19:36 +00:00
Manfred Stienstra
8326b95169
Free MySQL::Result objects after a call to execute [ #1416 state:resolved]
...
No freeing Result objects causes the MySQL driver to free result sets
at undefined times, this can lead to erratic performance in your
application.
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-18 19:19:36 +00:00
Frederick Cheung
9c7fe7c672
Don't include table_name twice
2008-12-18 19:19:36 +00:00
Frederick Cheung
c9ab7098be
Ensure :include checks joins when determining if it can preload [ #528 state:resolved]
2008-12-18 19:19:36 +00:00
Emilio Tagua
9cf6b1b15e
Add missing model files so tests can run isolated [ #1506 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-18 19:19:36 +00:00
Frederick Cheung
707d0dd3e1
Fix preloading of belongs_to with null foreign key generating useless query [ #1027 state:resolved]
2008-12-18 19:19:35 +00:00
Frederick Cheung
428e77bf0f
Make exceptions raise from find_by_foo! have a more helpful message [ #1567 state:resolved]
2008-12-18 19:19:35 +00:00
Joshua Peek
a9fde9a2ab
Cleanup dispatch path
2008-12-18 13:14:09 -06:00
Joshua Peek
3b35366d5d
Use more generic test env flag
2008-12-18 12:57:37 -06:00
Joshua Peek
2e22c7fda0
Conditionally inject session middleware instead of using session management
2008-12-18 12:56:18 -06:00
Joshua Peek
2eb2ec9e63
Move gaint lock into middleware
2008-12-18 12:00:54 -06:00
Lourens Naude
3ff6b00ee3
Persistent session identifier support for CookieSessionStore and API compat. with the server side stores [ #1591 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-18 11:33:53 -06:00
Brady Bouchard
33f76bb25a
Ensure error file is sent with a 'text/html' content type [ #1478 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-17 10:23:59 -06:00
Joshua Peek
f23c2796ee
When checking for the wrong routing method, ensure the environment is passed to recognize optimize [ #1406 state:resolved]
2008-12-17 10:20:19 -06:00
Joshua Peek
175cb7a963
Fix metal tests
2008-12-17 10:10:24 -06:00
Joshua Peek
61a41154f7
Make generated Metal bits a pure rack endpoint application (not middleware)
...
Instead of calling super to pass the request on, return a 404.
The modified app looks like this:
# app/metal/poller.rb
class Poller
def self.call(env)
if env["PATH_INFO"] =~ /^\/poller/
[200, {"Content-Type" => "text/html"}, "Hello, World!"]
else
[404, {"Content-Type" => "text/html"}, "Not Found"]
end
end
end
But you aren't locked in to just Rails:
# app/metal/api.rb
require 'sinatra'
Sinatra::Application.default_options.merge!(:run => false, :env => :production)
Api = Sinatra.application unless defined? Api
get '/interesting/new/ideas' do
'Hello Sinatra!'
end
2008-12-17 09:53:56 -06:00
Jesse Newland
97a178bfa4
Decorate responses from Rack Middleware and Rails Metal for the purposes of integration testing. A test for the following Metal:
...
class Poller < Rails::Rack::Metal
def call(env)
if env["PATH_INFO"] =~ /^\/poller/
[200, {"Content-Type" => "text/plain"}, "Hello World!"]
else
super
end
end
end
might be tested like so:
class PollerTest < ActionController::IntegrationTest
test "poller returns hello world" do
get "/poller"
assert_response 200
assert_response :success
assert_response :ok
assert_equal "Hello World!", response.body
end
end
[#1588 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-12-17 15:59:47 +01:00
Joshua Peek
1bcfce0130
Remove set_cookie hack from rack response since we dont use cgi sessions anymore
2008-12-16 20:21:27 -06:00
Joshua Peek
246b582ddf
Remove CGI::Session memory leak patch
2008-12-16 19:56:09 -06:00
Joshua Peek
ec1bd98705
Session Fixation tests have been rolled into the session cookie tests
2008-12-16 16:28:39 -06:00
Joshua Peek
8c3a543664
Introduce Rails Metal
...
# app/metal/poller.rb
class Poller < Rails::Rack::Metal
def call(env)
if env["PATH_INFO"] =~ /^\/poller/
[200, {"Content-Type" => "application/json"}, Message.recent.to_json]
else
super
end
end
end
* There is a generator to help you get started
`script/generate metal poller`
* Also, metal bits can be ran standalone with rackup
`rackup app/metal/poller.rb`
2008-12-16 13:15:06 -06:00
Daniel Luz
c4023cbe20
Update documentation for default_scope
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-12-16 14:34:02 +01:00
Xavier Noria
46c7dd2348
normalize author names in changelogs [ #1495 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-12-16 14:33:32 +01:00
Hongli Lai (Phusion
9e2b4a10f7
Do not output an ETag header if response body is blank or when sending files with send_file(... :xsendfile => true) [ #1578 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-12-16 12:30:28 +01:00
Joshua Peek
7c09050999
Lazy load flash access
2008-12-16 01:00:48 -06:00
Joshua Peek
9a733f6c64
Don't write nil values to default session options hash
2008-12-16 00:04:04 -06:00
Joshua Peek
95c839bd2a
Session objects are always a hash, so we need to ensure a flash hash is always assigned to the session
2008-12-15 20:43:01 -06:00
Jeremy Kemper
89056885b0
Merge branch 'master' of git@github.com:rails/rails
2008-12-15 18:22:35 -08:00
Jeremy Kemper
19be3d35b3
Revert "Make constantize look into ancestors"
...
[#410 state:open]
This reverts commit 262fef7ed5 .
2008-12-15 18:20:18 -08:00
Joshua Peek
43ac42c46a
Clear empty nil values in session hash before saving
2008-12-15 19:25:31 -06:00
Joshua Peek
ed70830713
Switch to Rack based session stores.
2008-12-15 16:33:31 -06:00
Nathan Weizenbaum
e8c1915416
Auto-load template handlers based on unmatched extensions [ #1540 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-15 14:49:38 -06:00
Hongli Lai (Phusion)
a392f34fb4
Require mocha >= 0.9.3, older versions don't work anymore [ #1579 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-15 14:47:19 -06:00
Jeremy Kemper
0d48408dcc
Merge branch 'master' of git@github.com:rails/rails
2008-12-15 11:05:29 -08:00
Frederick Cheung
262fef7ed5
Make constantize look into ancestors
...
[#410 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-15 11:01:04 -08:00
Seth Fitzsimmons
4966076d35
Use Mime::JS in place of explicit 'text/javascript' [ #1573 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-15 12:18:45 -06:00
Seth Fitzsimmons
f36dafa492
Implement Mime::Type.=~ to match all synonyms against arg [ #1573 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-15 12:00:55 -06:00
Frederick Cheung
7c18518105
Properly parenthasize calls to defined?(Rails) in 75fa82418 [ #1563 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-15 11:49:08 -06:00
Dan Pickett
38412ecb5d
Fixed ActionView::TestCase current url context [ #1561 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-15 11:47:39 -06:00
David Heinemeier Hansson
07326b38ec
Merge branch 'master' of git@github.com:rails/rails
2008-12-15 15:37:47 +01:00
David Heinemeier Hansson
f9a02b12d1
Added gem backtrace pretty priting (Juan Lupión) [ #1497 state:committed]
2008-12-15 15:37:27 +01:00
Frederick Cheung
4dcd8f01af
Make delete_if/reject faster and fix other mutators
...
[#1559 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-15 15:34:29 +01:00
Frederick Cheung
6eed6cf5c6
Make delete_if/reject faster and fix other mutators
...
[#1559 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-12 10:19:07 -08:00
mark
49306ccacf
Add :partial option to assert_template [ #1550 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-11 11:06:35 -06:00
Frederick Cheung
5ede4ce188
Fixed session related memory leak [ #1558 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-11 10:20:33 -06:00
Joshua Peek
7cfa6c535b
Fixed template lookups from outside the rails root [ #1557 state:resolved]
2008-12-11 10:17:29 -06:00
Eloy Duran
7394d12dc7
Fixed ActiveSupport::OrderedHash #delete_if, #reject!, and #reject, which did not sync the @keys after the operation.
...
This probably holds true for other mutating methods as well.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-12-11 14:32:20 +01:00
Christos Zisopoulos
69387ce016
Fix for Integration::Session follow_redirect! headers['location'] bug with Rack [ #1555 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-10 18:38:28 -06:00
Joshua Peek
75fa82418d
Prefer Rails.logger over RAILS_DEFAULT_LOGGER
2008-12-10 18:08:14 -06:00
Frederick Cheung
455c7f9e37
Don't use the transaction instance method so that people with has_one/belongs_to :transaction aren't fubared
...
[#1551 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-10 15:11:42 -08:00
Frederick Cheung
9f69ff12d4
Squash memory leak when calling flush with an empty buffer
...
[#1552 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-10 15:07:34 -08:00
Jeremy Kemper
d45e2c733d
Merge branch 'master' of git@github.com:rails/rails
2008-12-10 14:53:18 -08:00
Jeremy Kemper
b30ae19748
Revert "Fix: counter_cache should decrement on deleting associated records."
...
[#1196 state:open]
This reverts commit 05f2183747 .
2008-12-10 14:48:12 -08:00
Bruce Krysiak
aa5cdb0d47
Added a :camelize option to ActiveRecord and Hash to_xml serialization and from_xml deserialization
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-12-10 20:28:05 +01:00
Emilio Tagua
96b815d7e8
Fix test names collision.
...
[#1549 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-10 11:10:22 -08:00
Jeremy Kemper
9539543026
Add ActiveRecord::VERSION autoload
2008-12-10 11:01:04 -08:00
Jeremy Kemper
e4c0163f32
Fix ActionController autoloads
2008-12-10 11:00:44 -08:00
Emilio Tagua
05f2183747
Fix: counter_cache should decrement on deleting associated records.
...
[#1195 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-10 10:59:52 -08:00
Frederick Cheung
355f41d8aa
Rework ActiveSupport::OrderedHash to make lookups faster
...
[#1352 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-10 09:07:47 -08:00
Joshua Peek
014b7994ac
Explicitly require ERB Utils extensions from TagHelper
2008-12-09 14:13:33 -06:00
Jeremy Kemper
bf2532616e
Merge branch 'master' of git@github.com:rails/rails
...
Conflicts:
activesupport/CHANGELOG
2008-12-09 11:54:54 -08:00
Jeremy Kemper
781e29be0a
Fix tests broken by switch to Pathname
2008-12-09 11:39:45 -08:00
Jeremy Kemper
e8c4939fb3
Benchmark.ms
2008-12-09 11:17:11 -08:00
Jeremy Kemper
c3fe6ebbfa
How'd that sneak in there?
2008-12-09 11:16:30 -08:00
David Heinemeier Hansson
e54f17920f
Updated included memcache-client to the 1.5.0.5 version which includes fixes from fiveruns and 37signals to deal with failover and timeouts (Joshua Sierles) [ #1535 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-12-09 11:13:56 +01:00
Jeremy Kemper
9adcf951ea
Fix failing test introduced by optional-format routes
2008-12-08 19:19:48 -08:00
Jeremy Kemper
39de112e7b
Use full path to environment
2008-12-08 19:14:07 -08:00
Hongli Lai (Phusion)
13c6c3cfc5
Merge commit 'origin/master' into savepoints
2008-12-09 01:38:17 +01:00
Jason Cheow
4e60eebae0
Add ActiveSupport::Multibyte::Chars#ord method so that it returns correct Unicode value instead of falling back on String#ord in CoreExtensions, which is not multibyte compatible
...
[#1483 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-08 16:02:57 -08:00
Jeremy Kemper
9b22e56d89
Changelog entry for #1294
2008-12-08 15:59:42 -08:00
Jeremy Kemper
e631c5daca
Changelog entry for #1397
2008-12-08 15:57:36 -08:00
Akira Matsuda
c3b87dd4c9
Make word separator in AR validation error messages configurable.
...
[#1294 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-08 15:55:02 -08:00
Akira Matsuda
273c770011
Change Array#to_sentence I18n options to pass comma and space character from outside.
...
[#1397 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-08 15:53:20 -08:00
Ben Symonds
091e6f791a
Change field_changed? method to handle the case where a nullable integer column is changed from 0 to '0'
...
[#1530 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-12-08 15:42:13 -08:00
Joshua Peek
ebec9d43e2
Make integration test runner more Rack friendly and clean out old CGI cruft
2008-12-08 12:33:16 -06:00
Sergio Gil
e4eadf3910
Fix message when running TemplateRunner#git. [ #1526 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-08 00:26:49 +00:00
Pratik Naik
f7f113610e
Add a rake task to apply a template to an existing application.
...
Example : rake rails:template LOCATION=~/template.rb
2008-12-07 03:40:23 +01:00
Pratik Naik
2dc5d12c91
Remove unused TemplateRunner attributes
2008-12-07 03:28:39 +01:00
Pratik Naik
dbbae5e00e
Merge with docrails
2008-12-07 03:27:53 +01:00
Peter Cooper
9eca588bdf
Added support for plugins to be installed as submodules with the application templater. [ #1517 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-06 00:01:42 +01:00
Joshua Peek
731dcd8404
Silence server backtrace in rescue templates and log files. Also remove some noise from missing template errors.
2008-12-05 11:24:28 -06:00
Joshua Peek
9c9da6c892
Boot out CGI Processor.
...
* Add ActionController::CGIHandler as a backwards compatible CGI wrapper around Rack.
* Also pull failsafe responder into ActionController::Failsafe middleware.
2008-12-04 20:39:36 -06:00
Joshua Peek
27ebfd795f
Ensure route set is cleared on teardown
2008-12-04 19:10:52 -06:00
Joshua Peek
148aff2097
Set template_format to html inside rjs templates so renders within it default to html.
2008-12-04 17:20:51 -06:00
Sam Stephenson
ab211bf592
Fix rendering html partials from an rjs template
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-04 16:35:13 -06:00
Mike Ferrier
566a3dce67
Make NoMethodError message more descriptive when an undefined message has been sent to an association [ #1515 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-12-04 13:31:18 -06:00
Joshua Peek
b2ad3029cd
Ensure each rack request has its own dispatcher instance
2008-12-04 11:03:16 -06:00
Joshua Peek
40e9ba1e46
Refactor SessionFixationTest and WebServiceTest with IntegrationTest so they are compatible with the Rack interface.
2008-12-04 09:43:06 -06:00
Jeremy Kemper
57f0b9738e
Remove config dir from the load path
2008-12-03 21:46:36 -06:00
Pratik Naik
e52affb210
Add :env and :sudo options to TemplateRunner#rake.
...
Examples :
rake("gems:install", :sudo => true)
rake("db:migrate", :env => "production")
2008-12-04 01:08:36 +01:00
Pratik Naik
ef0b1cbb1b
Make TemplateRunner#generate accept any number of arguments
2008-12-03 22:05:54 +01:00
Joshua Peek
7c0dfa35db
Register bogus template handlers for ActionMailer test fixtures
2008-12-03 13:58:47 -06:00
Hongli Lai (Phusion)
ccb96f2297
Merge commit 'origin/master' into savepoints
...
Conflicts:
activerecord/lib/active_record/fixtures.rb
activerecord/test/cases/defaults_test.rb
2008-12-03 19:30:35 +01:00
Joshua Peek
761a633a9c
Add Memoizable#flush_cache to clear the cache of a specific method [ #1505 state:resolved]
2008-12-03 10:57:35 -06:00
Joshua Peek
2fc6c7dd05
Validate template extensions [ #1187 state:resolved]
2008-12-03 10:57:35 -06:00
Jeremy Kemper
99f2cb4918
Merge branch 'master' of git@github.com:rails/rails
2008-12-03 10:32:30 -06:00
Jeremy Kemper
0b4858cf38
Require rack/utils explicitly
2008-12-03 10:23:58 -06:00
Jeremy Kemper
3db59ce0dc
Unnecessary CGI require
2008-12-03 10:23:43 -06:00
Jeremy Kemper
f54ae9a997
Fix failsafe response path. [ #1504 state:committed]
2008-12-03 10:23:02 -06:00
Joshua Peek
1e1056f643
Removed deprecated register_template_extension
2008-12-02 20:26:32 -06:00
Pratik Naik
be75cb8877
Remove docs for TemplateRunner#gem as the behaviour has been changed
2008-12-02 19:48:25 +01:00
Jeremy McAnally
e8cc4b116c
Add "-m/--template" option to Rails generator to apply template to generated application.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-02 19:39:11 +01:00
miloops
2014d9141a
Make new_record? an alias of new? in ActiveResource to fix problem with route generation in forms.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-12-02 15:27:16 +01:00
David Heinemeier Hansson
bf024b6a11
Github comments are an excellent way to perform community code review -- keep it up!
2008-12-01 23:06:29 -06:00
Aliaksey Kandratsenka
a0bc480e1d
establish mysql connection before dropping database
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#63 state:committed]
2008-12-01 21:38:30 +01:00
Michael Koziarski
a8fc494dbb
Manually load the DB config rather than firing the whole initializer [Gerrit Kaiser]
2008-12-01 21:38:30 +01:00
Joshua Peek
06ed8e4511
Add internal middleware stack to Dispatcher
...
config.middleware.use Rack::Cache
2008-12-01 13:49:34 -06:00
Matt Jones
3c07a8828e
handle missing dependecies in gem loading
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-12-01 20:42:46 +01:00
Darren Boyd
0a4a5f3129
Making the IP Spoofing check in AbstractRequest#remote_ip configurable.
...
Certain groups of web proxies do not set these values properly. Notably,
proxies for cell phones, which often do not set the remote IP information
correctly (not surprisingly, since the clients do not have an IP address).
Allowing this to be configurable makes it possible for developers to choose
to ignore this simple spoofing check, when a significant amount of their
traffic would result in false positives anyway.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1200 state:committed]
2008-12-01 20:40:18 +01:00
miloops
97403ad5fd
Add :having option to find, to use in combination with grouped finds. Also added to has_many and has_and_belongs_to_many associations.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1028 state:committed]
2008-12-01 20:22:31 +01:00
Foliosus
0c4ba90aa1
Removed extra 'as' in :joins clause for habtm preloading
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1405 state:committed]
2008-12-01 20:00:19 +01:00
Tekin Suleyman
dab78e55cf
Ensure ActionMailer doesn't blow up when a two argument proc is set for the asset host
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1394 state:committed]
2008-12-01 19:38:25 +01:00
Andrew Kaspick
bda55f82c6
allow options to be passed to email address auto generation
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1418 state:committed]
2008-12-01 19:27:03 +01:00
Joshua Peek
25f6524b89
opps, inner_app is in the wrong conditional
2008-12-01 12:24:02 -06:00
Joshua Peek
61958032d3
Generate rackup dispatcher with rails:update:generate_dispatchers
2008-12-01 12:21:18 -06:00
Joshua Peek
725928854d
fix failing railties test
2008-12-01 12:12:57 -06:00
Joshua Peek
926844e869
Switch FCGI handler over to Rack
2008-12-01 11:54:32 -06:00
David Heinemeier Hansson
119a41e21d
Merge branch 'master' of git@github.com:rails/rails
2008-11-30 20:06:41 -06:00
Jeremy Kemper
eb5e6fe713
Simplify Request#path
2008-11-30 17:24:36 -08:00
Jeremy Kemper
4fabc9b2f3
Simplify REMOTE_ADDR parsing
2008-11-30 17:06:11 -08:00
Jeremy Kemper
93456a2ed2
Deprecated formatted_polymorphic_url
2008-11-30 17:04:24 -08:00
David Heinemeier Hansson
3b3c0507e2
Extracted the process scripts (inspector, reaper, spawner) into the plugin irs_process_scripts [DHH]
2008-11-30 16:23:20 -06:00
David Heinemeier Hansson
be140e8c6b
Changed Rails.root to return a Pathname object (allows for Rails.root.join("app", "controllers") => "#{RAILS_ROOT}/app/controllers") [ #1482 ]
2008-11-30 15:59:30 -06:00
David Heinemeier Hansson
668872efd8
Add restart notice where missing
2008-11-30 15:54:44 -06:00
David Heinemeier Hansson
6e66e7d646
Even more polish of the default configration files and split off the session store configuration into its own file
2008-11-30 15:53:21 -06:00
David Heinemeier Hansson
c5f461d7b0
Cleanup the app generator
2008-11-30 15:52:50 -06:00
David Heinemeier Hansson
73213f4ca7
Say it briefly
2008-11-30 15:18:46 -06:00
David Heinemeier Hansson
6358e6c107
More organization based on priority
2008-11-30 15:06:55 -06:00
David Heinemeier Hansson
471f024018
Me loves me some whitespace
2008-11-30 14:58:42 -06:00
David Heinemeier Hansson
201b64b4e1
Cleanup other examples and wording
2008-11-30 14:53:22 -06:00
David Heinemeier Hansson
0eac9daa0a
Rails::Configuration never had more details. Stop lying about it
2008-11-30 14:46:11 -06:00
David Heinemeier Hansson
5c26b2e47b
Its no longer common to run Rails in environments where you cant set the environment to be the production one. Dont need a notice telling about the ENV var that prominently any more
2008-11-30 14:44:56 -06:00
Jeremy Kemper
cfb2126726
Load app initializers by path relative to Rails.root
2008-11-29 20:06:49 -08:00
Jeremy Kemper
635e2ccd3e
Extract named_helper module_eval so it's easier to override
2008-11-29 19:32:13 -08:00
Jeremy Kemper
9e4621d6f7
Merge branch 'master' of git@github.com:rails/rails
2008-11-29 19:23:31 -08:00
Jeremy Kemper
8521cebbad
Turn on debugger autoeval
2008-11-29 16:55:02 -08:00
Sven Fuchs
1182658e76
Make sure #compute_public_path caching allows to return different results for different given sources [ #1471 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-29 16:03:44 -06:00
Joshua Peek
cec8a92a6d
Merge branch 'master' of git@github.com:rails/rails
2008-11-29 15:59:47 -06:00
David Heinemeier Hansson
fdfcdf4673
Enhanced Rails.root to take parameters that'll be join with the root, like Rails.root('app', 'controllers') => File.join(Rails.root, 'app', 'controllers') [ #1482 state:committed] (Damian Janowski)
2008-11-29 10:57:36 +01:00
David Heinemeier Hansson
1e8f9634f6
Include Rack in the server noise
2008-11-29 10:45:52 +01:00
David Heinemeier Hansson
50f428661a
Merge branch 'master' of git@github.com:rails/rails
2008-11-29 10:45:30 +01:00
David Heinemeier Hansson
34905673a3
Revert "Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache." as it killed dev mode reloading.
...
This reverts commit 4d910b0333 .
2008-11-29 10:45:06 +01:00
Joshua Peek
9fccf72725
fixed template recompile issue with previous commit and add some better tests so we can make sure it doesn't happen again
2008-11-28 14:31:54 -06:00
Joshua Peek
9fc23745f1
Reinstate "Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache." as it killed dev mode reloading."
2008-11-28 11:18:28 -06:00
David Heinemeier Hansson
5fa0457542
Revert "Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache." as it killed dev mode reloading.
...
This reverts commit 4d910b0333 .
2008-11-27 21:04:24 +01:00
David Heinemeier Hansson
6fa9957e0e
Merge branch 'master' of git@github.com:rails/rails
2008-11-27 18:59:33 +01:00
David Heinemeier Hansson
f2ee056873
Added view path support for engines [DHH]
2008-11-27 18:59:24 +01:00
David Heinemeier Hansson
229f959d15
Added the option to declare an asset_host as an object that responds to call (see http://github.com/dhh/asset-hosting-with-minimum-ssl for an example) [DHH]
2008-11-27 17:51:33 +01:00
Joshua Peek
4d910b0333
Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache.
2008-11-26 20:54:47 -06:00
Jeremy Kemper
9d2002a12a
Merge branch 'master' of git@github.com:rails/rails
2008-11-26 18:00:25 -08:00
Jeremy Kemper
2c43a6429e
Ruby 1.9 compat: no Unicode normalization support yet
2008-11-26 17:59:35 -08:00
Jeremy Kemper
51e15a60b0
Ruby 1.9 compat: CGI#escape_skipping_slashes
2008-11-26 17:59:09 -08:00
Jeremy Kemper
5fa8c3b6db
MiniTest::Unit#method_name alias for Test::Unit compat
2008-11-26 17:20:05 -08:00
Jeremy Kemper
9880baa90b
Ensure Test::Unit::Assertions is available
2008-11-26 17:18:50 -08:00
David Heinemeier Hansson
3cc9d1c5ad
Let all plugins not just engines have a config/routes.rb file
2008-11-26 20:30:21 +01:00
David Heinemeier Hansson
7d8f9ef051
Fix routing test and add changelog note about draw no longer clearing the route set
2008-11-26 20:26:55 +01:00
David Heinemeier Hansson
e2362babdf
Merge branch 'master' of git@github.com:rails/rails
2008-11-26 20:04:00 +01:00
David Heinemeier Hansson
4999d52e08
Added that config/routes.rb files in engine plugins are automatically loaded (and reloaded when they change in dev mode) [DHH]
2008-11-26 20:03:25 +01:00
David Heinemeier Hansson
40b40c4870
Added support for multiple routes files and made draw not clear the map so they can be additive
2008-11-26 15:57:36 +01:00
Paul
9a4d557713
Ensure hash conditions on referenced tables are considered when eager loading with limit/offset. [ #1404 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-11-26 15:25:39 +01:00
Pratik Naik
17940a82e8
Don't re-require 'rexml/document'
2008-11-26 15:01:59 +01:00
Christoffer Sawicki
05a938c5f7
Added ActiveSupport::OrderedHash#each_key and ActiveSupport::OrderedHash#each_value [ #1410 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-11-26 14:54:35 +01:00
David Heinemeier Hansson
63d8f56774
Added app/[models|controllers|helpers] to the load path for plugins that has an app directory (go engines ;)) [DHH]
2008-11-26 14:41:20 +01:00
Jeremy Kemper
133c349b0a
Merge branch 'master' of git@github.com:rails/rails
2008-11-26 02:05:53 -08:00
Jeremy Kemper
a88094fd7a
No need to have #generate and #generate_extras per instance
2008-11-26 02:05:28 -08:00
Aaron Batalion
fef6c32afe
Added optimal formatted routes to rails, deprecating the formatted_* methods, and reducing routes creation by 50% [ #1359 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-26 10:52:05 +01:00
Jeremy Kemper
6599dd907f
Simpler and clearer to just explicitly require the JSON encoders
2008-11-26 01:08:37 -08:00
Jeremy Kemper
44216d5776
Autoload ActiveSupport::XmlMini
2008-11-26 00:35:55 -08:00
Jeremy Kemper
f4cae89da9
Require as little of REXML as possible to apply the entity_expansion_limit fix
2008-11-26 00:32:26 -08:00
Jeremy Kemper
27dbc27c41
Lazy-require CGI for Object#to_query
2008-11-26 00:31:55 -08:00
Jeremy Kemper
ad93212f79
Rename use_transactional_fixtures? so it doesn't collide with the superclass_delegating_accessor's query method
2008-11-25 23:50:57 -08:00
Jeremy Kemper
b7fef2610b
Extract XmlMini. Namespace FileLike extension.
2008-11-25 23:37:10 -08:00
Jeremy Kemper
d1213fa402
Rescue OpenSSL::Cipher::CipherError or OpenSSL::CipherError depending on which is present
2008-11-25 23:36:33 -08:00
Jeremy Kemper
4073a6d0a2
Remove XmlSimple dependencies
2008-11-25 19:49:49 -08:00
Jeremy Kemper
ab8fff2e3a
Unbundled XmlSimple
2008-11-25 18:55:09 -08:00
Joseph Holsten
fea8d9d06f
Extract XmlMini from XmlSimple. [ #1474 state:committed]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-11-25 18:53:24 -08:00
Jeremy Kemper
8d2ca7dde1
Merge branch 'master' of git@github.com:rails/rails
2008-11-25 18:48:46 -08:00
Joshua Peek
c80fe1093d
Move debugger into middleware
2008-11-25 15:05:07 -06:00
Michael Koziarski
07abc5efe1
Add a MessageEncryptor, just like MessageVerifier but using symmetric key encryption.
...
The use of encryption prevents people from seeing any potentially secret values you've used. It also supports and encrypt_and_sign model to prevent people from tampering with the bits and creating random junk that gets fed to
A motivated coder could use this to add an :encrypt=>true option to the cookie store.
2008-11-25 20:51:30 +01:00
Joshua Peek
e126e1aac0
don't try to require vendored rack in script/server
2008-11-25 13:26:38 -06:00
Joshua Peek
3dd3ffde06
Depend on rack 0.4.0 instead of vendoring it
2008-11-25 13:20:12 -06:00
Joshua Peek
d4754677a3
Deprecate assert_valid
2008-11-25 12:32:14 -06:00
Joshua Peek
759183c822
Ensure ActionView will be available to ActionMailer if ActionController is not loaded
2008-11-25 10:38:20 -06:00
Craig Davey
f8558798d4
Ensure all HTML:: constants are available to autoload [ #1462 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-25 10:05:59 -06:00
Jeremy Kemper
d9c95c82e5
Explicitly require Active Support for tests
2008-11-24 22:45:44 -08:00
Jeremy Kemper
b6fd6ccc8f
AS::Dependencies also has core extensions; don't autoload it.
2008-11-24 22:42:11 -08:00
Jeremy Kemper
6482db8669
Explicitly require Action View also
2008-11-24 22:41:24 -08:00
Jeremy Kemper
ce50ca1baf
Explicitly require AS::Deprecation for the SecretKeyGenerator. Bring in ActiveSupport::TestCase for its tests.
2008-11-24 22:39:11 -08:00
Jeremy Kemper
cb49681710
Skip fcgi dispatcher tests if fcgi lib isn't available
2008-11-24 21:47:26 -08:00
Jeremy Kemper
d40bc307f9
Explicitly require action_view to bring in its i18n load path
2008-11-24 21:47:09 -08:00
Jeremy Kemper
36dcfcf126
Really remove components.
2008-11-24 18:48:00 -08:00
Jeremy Kemper
a5870d43e3
Rename Rails::Info.components to frameworks
2008-11-24 18:47:42 -08:00
Jeremy Kemper
104f3a5776
Add config.preload_frameworks to load all frameworks at startup. Default to false so Rails autoloads itself as it's used.
2008-11-24 18:43:04 -08:00
Jeremy Kemper
d01f75b1f0
Initializer#env relies on StringInquirer autoload. Style fixes.
2008-11-24 18:10:23 -08:00
Jeremy Kemper
536c239966
JSON can't be autoloaded since it includes core extensions
2008-11-24 13:08:25 -08:00
Jeremy Kemper
565fad350e
Ruby 1.9 compat: explicitly require delegate for cookie's DelegateClass
2008-11-24 12:05:17 -08:00
Jeremy Kemper
0f07b537ce
Require builder before fast_xs so we don't tickle its over-eager String#to_xs collision check
2008-11-24 11:39:51 -08:00
Jeremy Kemper
720ffdc42f
Explicitly require Builder in test that uses it
2008-11-24 11:05:54 -08:00
Jeremy Kemper
e06c5bef7f
Revert "Hack builder to look for fast_xs instead of insisting on its own String#to_xs"
...
This reverts commit 5d3712a81e .
2008-11-24 11:05:07 -08:00
Pratik Naik
1cbdd53bd3
Add a rake task to generate dispatchers : rake rails:generate_dispatchers
2008-11-24 19:50:09 +01:00
Pratik Naik
b7568e77d7
Fix typo in 5b5730cc6e
2008-11-24 19:35:09 +01:00
Yaroslav Markin
5b5730cc6e
Don't generate public/dispatch.cgi/fcgi/rb files by default.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-11-24 19:31:58 +01:00
Joshua Peek
835be0cbed
missed ActiveRecord::Migrator
2008-11-24 12:31:16 -06:00
Geoff Garside
61becfe2b9
Test default singleton resource route to ensure it uses GET. This is important if using map.root :resource instead of map.root :resources for some reason.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-24 19:19:56 +01:00
Geoff Garside
eac16d0ee1
Reorder the way in which map.resource routes are added to the set. This prevents the singular named route from hitting :create instead of :show.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-24 19:19:55 +01:00
Joshua Peek
8aeed003f5
prototype and scripty helpers require json
2008-11-24 12:17:07 -06:00
Joshua Peek
a76351093c
helpers require dependencies
2008-11-24 12:17:07 -06:00
Joshua Peek
d6b923adbd
get activerecord tests passing with lazy loading
2008-11-24 12:17:07 -06:00
Joshua Peek
21901e9345
fixtures depends on dependencies
2008-11-24 12:17:07 -06:00
Eloy Duran
823b623fe2
Allow optional arguments and/or block for Object#try like Object#send does. [ #1425 state:resolved]
...
Original suggestion by Pat Nakajima.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-11-24 18:53:48 +01:00
Joshua Peek
fffb1da3f2
require json lib when serialization is loaded
2008-11-24 11:52:29 -06:00
Joshua Peek
703fecb4fc
Add LAZY env flag for testing autoload/lazy load feature
2008-11-24 11:37:57 -06:00
Joshua Peek
368117c041
Autoload more ActiveSupport libs
2008-11-24 11:35:21 -06:00
Joshua Peek
7254d23764
Autoload ActiveRecord files
2008-11-24 11:14:24 -06:00
Joshua Peek
426a86ab1e
prefer autoloaded html scanner
2008-11-24 10:20:41 -06:00
Joshua Peek
f0f07c6427
prefer autoloading Mime::Type
2008-11-24 10:05:15 -06:00
Joshua Peek
5ffd1e0c02
Ensure integration test is load in script/console [ #1452 state:resolved]
2008-11-24 09:58:52 -06:00
David Heinemeier Hansson
42b4407e35
Strip out the ./ part of the test path so the backtrace align perfectly
2008-11-24 15:43:47 +01:00
Manfred Stienstra
1f48c09094
Accept a prefix argument to filter_backtrace_with_cleaning [ #1456 state:committed]
...
Add a prefix argument to filter_backtrace_with_cleaning so it has
the same arity as test/unit's filter_backtrace.
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-24 11:35:55 +01:00
David Heinemeier Hansson
f3f67ce621
Merge branch 'master' of git@github.com:rails/rails
2008-11-24 11:11:08 +01:00
David Heinemeier Hansson
eea5dc3a34
Removed the old .htaccess as it is no longer used
2008-11-24 11:09:06 +01:00
David Heinemeier Hansson
8b14686892
Updated docs to stop talking exclusively about lighttpd and clarify a few other things
2008-11-24 11:05:49 +01:00
Jeremy Kemper
2dd0ec48a5
Autoload HTML::Document and sanitizers
2008-11-23 19:12:00 -08:00
Jeremy Kemper
fb4bb93d43
Drop unneeded drb require
2008-11-23 18:29:38 -08:00
Jeremy Kemper
95072a6846
Fix dangling tzinfo dependency
2008-11-23 16:12:41 -08:00
Jeremy Kemper
6c7463deab
Autoload ActiveSupport::Duration, Gzip, OptionMerger, OrderedHash, OrderedOptions, StringInquirer, TimeWithZone, and TimeZone also
2008-11-23 16:11:32 -08:00
Jeremy Kemper
e44076f2c3
Autoload cache stores
2008-11-23 16:10:41 -08:00
Jeremy Kemper
49752e6ca5
Duration requires BasicObject in case it's autoloaded early
2008-11-23 16:10:20 -08:00
Jeremy Kemper
1250faa858
Lazy-require tzinfo for TimeZone
2008-11-23 16:08:00 -08:00
Jeremy Kemper
0eca8111f2
Autoload ActiveSupport::SecureRandom and ::MessageVerifier
2008-11-23 15:39:28 -08:00
Jeremy Kemper
308876fca2
Lazy-require tempfile for File#atomic_write
2008-11-23 15:31:57 -08:00
Jeremy Kemper
283418a785
Lazy-require DRb for ActiveSupport::Cache::DRbStore
2008-11-23 15:30:21 -08:00
Jeremy Kemper
51d155e697
Lazy-require OpenSSL
2008-11-23 15:29:03 -08:00
Jeremy Kemper
c26cb08998
Lazy-require OpenSSL. Skip entirely if SecureRandom is available.
2008-11-23 15:27:09 -08:00
Jeremy Kemper
9f5ab945b7
Lazy-require XmlSimple. Move CGI require to object conversions where it's actually used.
2008-11-23 15:26:32 -08:00
Jeremy Kemper
e931012287
Require Mocha >= 0.9.3 which includes a MiniTest adapter
2008-11-23 15:05:59 -08:00
Jeremy Kemper
5d3712a81e
Hack builder to look for fast_xs instead of insisting on its own String#to_xs
2008-11-23 15:05:57 -08:00
Jeremy Kemper
6de241be81
Lazy-require builder lib
2008-11-23 15:05:57 -08:00
Joshua Peek
31ce92f7b5
Use autoload instead of explicit requires for ActionController
2008-11-23 16:35:47 -06:00
Jeremy Kemper
6de1060eb5
Changelog for #1448 . Mention updating old translations with storage_units key.
2008-11-23 13:22:46 -08:00
Jeremy Kemper
6d91e7a7d6
Remove explicit tmail requires in favor of autoload
2008-11-23 13:16:39 -08:00
Joshua Peek
d75a234501
simplify console with helpers
2008-11-23 15:15:20 -06:00
Yaroslav Markin
d36158794b
Add i18n for number_to_human_size() helper storage units. Translation key is number.human.storage_units.
...
[#1448 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-11-23 13:11:59 -08:00
Jeremy Kemper
9d4ae40bb4
Move deprecation assertions so TestCase (and Mocha) needn't load on startup
2008-11-23 13:11:07 -08:00
Jeremy Kemper
2db8571edf
Don't hide deeper LoadErrors
2008-11-23 13:10:27 -08:00
Jeremy Kemper
e9aa975cc9
Eliminate thread-local circular reference stack by passing it as an argument instead
2008-11-23 12:36:03 -08:00
Jeremy Kemper
4454ff1bcb
Don't include .rb suffix in core_ext requires
2008-11-23 12:35:20 -08:00
Joshua Peek
bc4d05b244
A back support for legacy TemplateHandler#render API
2008-11-23 13:57:01 -06:00
Joshua Peek
2c01f2b4e9
use autoload instead of explicit requires for ActionView
2008-11-23 13:42:07 -06:00
Joshua Peek
e201fc750b
use autoload instead of explicit requires for ActionMailer
2008-11-23 12:27:25 -06:00
Michael Koziarski
04d2d043ca
Move the cookie store to use the MessageVerifier class.
...
This removes support for ancient cookie-store generated cookies which were double escaped.
2008-11-23 16:42:15 +01:00
Michael Koziarski
f9b1aa7f4c
Don't need _message as it's in the class name already
2008-11-23 16:33:56 +01:00
Michael Koziarski
d460c9a255
Add ActiveSupport::MessageVerifier to aid users who need to store tamper-proof messages in cookies etc.
...
This is particularly useful for things like remember-me tokens in web applications and auto-unsubscribe links in emails.
2008-11-23 15:33:59 +01:00
Michael Koziarski
c4a0143854
Update the generated controller to not include the deprecated :secret option to protect_from_forgery
2008-11-23 14:28:34 +01:00
Michael Koziarski
9fdb15e60f
Change the forgery token implementation to just be a simple random string.
...
This deprecates the use of :secret and :digest which were only needed when we were hashing session ids.
2008-11-23 14:28:34 +01:00
David Heinemeier Hansson
ed7549da28
Merge branch 'master' of git@github.com:rails/rails
2008-11-23 14:09:45 +01:00
David Heinemeier Hansson
db6b3a1f2c
Docfix [ #1444 state:committed]
2008-11-23 13:43:59 +01:00
Sam Pohlenz
5ea9f2cac6
Allow helpers directory to be overridden via ActionController::Base.helpers_dir (Sam Pohlenz) [ #1424 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-23 13:42:53 +01:00
Sam Pohlenz
bdf995bc5d
Allow helpers directory to be overridden via ActionController::Base.helpers_dir (Sam Pohlenz) [ #1424 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-23 13:41:52 +01:00
David Heinemeier Hansson
9e08a3bb1d
Added rake rails:update:application_controller to renamed application.rb to application_controller.rb -- included in rake rails:update so upgrading to 2.3 will automatically trigger it [ #1439 state:committed] (kastner)
2008-11-23 13:39:30 +01:00
Jeremy Kemper
4d2ccbb364
Use a relative require for bundled rack lib
2008-11-22 22:40:32 -08:00
Tom Lea
6b06c9870a
Changed the fallback String#each_char to use valid 1.9 syntax.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-11-22 22:01:01 -08:00
Jeremy Kemper
e7208d382a
Get ActiveSupport::TestCase working with classic Test::Unit and MiniTest. Fix broken Mocha + MiniTest. Assume ruby-core applies patch #771 fixing libraries which extend Test::Unit.
2008-11-22 19:22:45 -08:00
Jeremy Kemper
c79fb32e93
Ruby 1.9 compat: don't shadow local var with block arg
2008-11-22 19:19:13 -08:00
Jeremy Kemper
dc07c0e02b
Fix indentation mismatches
2008-11-22 19:19:13 -08:00
Jeremy Kemper
0e2d18e415
Extract state query method definition and quiet method redefinition warning.
2008-11-22 19:19:13 -08:00
Jeremy Kemper
0492759db3
MiniTest compat: don't shadow @name
2008-11-22 19:19:13 -08:00
Jeremy Kemper
51383c57a2
MiniTest compat: don't check for test/unit's assertion in particular
2008-11-22 19:19:12 -08:00
Jeremy Kemper
a75354fae1
Ruby 1.9 compat: don't use defined? on complex expressions
2008-11-22 19:19:12 -08:00
Jeremy Kemper
f927a60d0f
Require mocha >= 0.9.0 for AS tests
2008-11-22 19:19:12 -08:00
Joshua Peek
708f4c3ae6
Switch script/server to use rack processor
2008-11-22 14:48:32 -06:00
Joshua Peek
cc67272cba
Vendor rack 0.4.0
2008-11-22 14:33:00 -06:00
Joshua Peek
4b36f76e7a
missed lighttpd config
2008-11-22 14:13:23 -06:00
Joshua Peek
40c6a8b970
Drop lighttpd support from script/server
2008-11-22 14:10:50 -06:00
Joshua Peek
0ecf2f6bdb
Kill dead "new_mongrel" handler
2008-11-22 14:00:58 -06:00
Cyril Mougel
2144c0f8ff
Add flush by ensure in script/runner because no flush in production mode [ #803 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-22 13:32:36 -06:00
Joshua Peek
20d6fdd256
write_fragment returns content if caching is disabled [ #846 state:resolved]
2008-11-22 13:19:11 -06:00
Lance Ivy
cd1a9ed991
Add TestResponse#client_error? to check for 4xx status codes [ #851 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-22 13:10:12 -06:00
David Heinemeier Hansson
f42c77f927
Added ActiveSupport::BacktraceCleaner and Rails::BacktraceCleaner for cutting down on backtrace noise (inspired by the Thoughtbot Quiet Backtrace plugin) [DHH]
2008-11-22 18:06:08 +01:00
David Heinemeier Hansson
a026b4c983
Let ApplicationController stay unloaded for as long as possible
2008-11-22 13:24:37 +01:00
David Heinemeier Hansson
e50530ca3a
Reduced the number of literal aliases to the range that has actually seen personal use. With the massive savings in overhead, I was able to fit Array#forty_two
2008-11-21 10:00:22 +01:00
Colin Curtin
1d4554d766
ActionMailer should respect content type when choosing layouts
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-11-21 04:09:14 +05:30
Alexey Mahotkin
84583657f4
Fixed RFC-2045 quoted-printable bug [ #1421 state:committed]
...
http://www.faqs.org/rfcs/rfc2045.html says:
may be
represented by an "=" followed by a two digit
hexadecimal representation of the octet's value. The
digits of the hexadecimal alphabet, for this purpose,
are "0123456789ABCDEF". Uppercase letters must be
used; lowercase letters are not allowed.
ActionMailer, however, used "=%02x" specification.
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-20 23:10:15 +01:00
Jeremy Kemper
ebdbd854a9
Fix straggling references to Test::Unit::TestCase
2008-11-20 13:47:36 -08:00
Jeremy Kemper
b7a5ffd083
Update changelog to reflect move from Test::Unit::TestCase to ActiveSupport::TestCase
2008-11-20 13:47:36 -08:00
Jeremy Kemper
53104c34b1
Require mocha >= 0.9.0 for Active Support tests. Don't manipulate the load path.
2008-11-20 13:47:36 -08:00
Jeremy Kemper
d8a555e137
Mocha 0.9.0 compatibility for test setup/teardown callbacks
2008-11-20 13:47:35 -08:00
Daniel Schierbeck
a5156d9c2c
Ensure only delegations to methods can have an automatic prefix. [ #1235 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-11-21 01:15:49 +05:30
David Heinemeier Hansson
206c5643aa
Merge branch 'master' of git@github.com:rails/rails
2008-11-20 08:52:48 +01:00
Matt Jones
fb1eebac94
alternative resolution to vendor load problem
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-20 08:52:17 +01:00
Jeremy Kemper
20a346170c
Mocha >= 0.9.0 must be available for Action Pack tests
2008-11-19 19:14:52 -08:00
Aaron Batalion
e54c33bfc8
need to make sure the asset type is cached with it in Cache.. name is sufficient, not self
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-11-19 15:56:38 -08:00
Aaron Batalion
d7f4921a9a
Fixed asset host to not cache objects [ #1419 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-19 17:29:09 -06:00
Pratik Naik
dbbaccbcda
Revert "Simplify benchmarking and rescue". Need a different approach.
...
This reverts commit 3be9134d1c .
2008-11-20 04:50:34 +05:30
Pratik Naik
3be9134d1c
Simplify benchmarking and rescue
2008-11-20 04:17:48 +05:30
Jeremy Kemper
549388c244
Reflect default locale change from en-US to en
2008-11-19 12:22:06 -08:00
Jeremy Kemper
7ee9addb6e
Enumerable#none? conforms to Ruby 1.8.7 behavior
2008-11-19 11:51:57 -08:00
Jeremy Kemper
5b7d07f423
Require mocha for tests. Get rid of uses_mocha helper.
2008-11-19 11:08:34 -08:00
Jeremy Kemper
a1ce4008c8
Require mocha before the testcase overrides, otherwise its run method is clobbered
2008-11-19 11:08:19 -08:00
Jeremy Kemper
bedea33043
Eliminate method redefinition warning
2008-11-19 11:07:19 -08:00
Akira Matsuda
baa8ee5eb1
Require active_support/secure_random for Ruby 1.9.
...
[#1326 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-11-19 09:57:09 -08:00
Ken Collins
8e4624be9e
Remove SQL Server cases from tests for latest adapter work to pass rails expected behavior.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-19 18:00:56 +01:00
Pratik Naik
aeae79dc45
Remove deprecated ActionController::Base#assign_default_content_type_and_charset
2008-11-19 22:25:08 +05:30
Pratik Naik
9c3c42d8ea
Remove reset! as a connection#checkout callback
2008-11-19 21:18:07 +05:30
Pratik Naik
51730792ca
Added Object#try. ( Taken from http://ozmm.org/posts/try.html ) [Chris Wanstrath]
2008-11-19 19:36:42 +05:30
David Heinemeier Hansson
51a19ae2bf
Assume that the next version is going to be 2.3 for now
2008-11-19 14:12:38 +01:00
David Heinemeier Hansson
e442448fa3
Changed the default of ActionView#render to assume partials instead of files when not given an options hash [DHH]
2008-11-19 14:06:15 +01:00
David Heinemeier Hansson
130fe74d17
Changed the default of ActionView#render to assume partials instead of files when not given an options hash [DHH]
2008-11-19 14:00:16 +01:00
Pratik Naik
27c03e69e9
Remove deprecated render_component. Please use the plugin from http://github.com/rails/render_component/tree/master
2008-11-19 17:48:57 +05:30
David Heinemeier Hansson
0c9f677e78
Another piece of markup removed from environment.rb
2008-11-19 12:37:04 +01:00
David Heinemeier Hansson
53eba2f218
The docs in environment.rb are not going to be rendered so it doesnt make sense to mark them up
2008-11-19 12:31:34 +01:00
David Heinemeier Hansson
70babd4ebb
Update doc to make more sense
2008-11-19 12:19:11 +01:00
Hiroshi Saito
291d199de1
Let polymorphic_path treat an array contains single name as without array [ #1386 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-19 12:07:12 +01:00
Damian Janowski
f451f0e5cf
Added Enumerable#none? to check that none of the elements match the block [ #1408 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-19 10:48:41 +01:00
Gabe da Silveira
917428bcce
Make optimized named routes respect all reserved options and tie it into UrlRewriter::RESERVED_OPTIONS so it's DRY
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-18 22:47:33 +01:00
Luke Melia
60d6f25517
Fix rendering html partial via inline render when with :js format [ #1399 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-18 15:19:16 -06:00
Michael Koziarski
9c01d3cead
Spam more people, the list is next
2008-11-18 20:52:07 +01:00
Hongli Lai (Phusion)
337c361e26
Register 'checked' as an HTML boolean attribute.
...
This way, 'tag :foo, :type => "checkbox", :checked => false' would output
the expected
<input type="checkbox" />
instead of the old
<input type="checkbox" checked="false" />
The latter would result in a checkbox that's initially checked.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-11-18 11:50:31 -08:00
Michael Koziarski
19e9a1f47d
Remove duplicate distribution of prototype and scriptaculous.
...
This was previously needed by define_javascript_functions which has been removed for a while.
2008-11-18 20:11:55 +01:00
Michael Koziarski
b579184819
Remove mention of long-dead define_javascript_functions
2008-11-18 20:11:55 +01:00
Thomas Fuchs
252ca3e3e7
Update Prototype to 1.6.0.3 and update script.aculo.us to 1.8.2
2008-11-18 19:24:22 +01:00
gbuesing
1955c164b3
TimeZone offset tests: use current_period, to ensure TimeZone#utc_offset is up-to-date
2008-11-18 09:38:12 -06:00
gbuesing
9ad165cb9d
Update bundled TZInfo to 0.3.12
2008-11-18 09:01:57 -06:00
Matt Jones
45ba4ec626
add vendor/ back to load paths; catch errors in constant loading
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-18 14:32:46 +01:00
Sven Fuchs
12118963ac
use :en as a default locale (in favor of :en-US)
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-18 14:23:53 +01:00
David Heinemeier Hansson
d9b92ee11b
Added config.i18n settings gatherer to config/environment, auto-loading of all locales in config/locales/*.rb,yml, and config/locales/en.yml as a sample locale [DHH]
2008-11-18 14:23:13 +01:00
Luke Melia
75fb8dfb99
Prevent assert_template failures when a render :inline is called before rendering a file-based template [ #1383 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-17 22:09:22 -06:00
Eugene Bolshakov
3c9beb3dab
Add helper test generators [ #1199 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-17 21:56:39 -06:00
Pratik Naik
d22fe41cf8
Fix a typo in test helper
2008-11-18 08:40:38 +05:30
Pratik Naik
3319fa6965
Dont require 'application' when running tests
2008-11-18 08:38:01 +05:30
Pratik Naik
8f71d6bcf6
Fix script/console
2008-11-18 08:28:26 +05:30
Jeremy Kemper
5c84151186
Merge branch 'master' of git@github.com:rails/rails
2008-11-17 15:28:17 -08:00
Jeremy Kemper
5a4789e86a
Explicitly require test/unit so tests autorun
2008-11-17 15:18:01 -08:00
Tom Stuart
32cb2345a5
Fix default_scope to work in combination with named scopes
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-17 22:00:14 +01:00
Hongli Lai (Phusion)
3a33ee28e9
Fix compatibility with Ruby 1.8 that also has the Miniunit gem installed.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-11-17 12:38:47 -08:00
Jeremy Kemper
2ace3d9154
Explicitly require AS::Duration
2008-11-17 11:38:24 -08:00
Carlos Paramio
8412200f90
Change usage of defined? to check the rubygems constant existance by a rescue block on boot.rb for Ruby 1.9 compatibility
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-11-17 10:53:18 -08:00
Jeremy Kemper
e3fcf9b668
Use ActiveSupport::TestCase in generated test/test_helper.rb
2008-11-17 10:39:46 -08:00
Jeremy Kemper
435b088f5a
Merge branch 'master' of git@github.com:rails/rails
2008-11-17 10:36:02 -08:00
David Heinemeier Hansson
fcce1f17ea
BACKWARDS INCOMPATIBLE: Renamed application.rb to application_controller.rb and removed all the special casing that was in place to support the former. You must do this rename in your own application when you upgrade to this version [DHH]
2008-11-17 19:27:35 +01:00
Jeremy Kemper
6ff506ffbc
Merge branch 'master' of git@github.com:rails/rails
2008-11-17 10:17:42 -08:00
David Heinemeier Hansson
4b33fae1f5
Fixed RedCloth and BlueCloth shouldn't preload. Instead just assume that they're available if you want to use textilize and markdown and let autoload require them [DHH]
2008-11-17 18:31:36 +01:00
David Heinemeier Hansson
54c1856425
The inflector is meant to work on words not phrases -- dont confuse people with a phrase example
2008-11-16 21:29:48 +01:00
Joshua Peek
e6c51051e4
Ensure shared default_scoping stack is duped before assigning to thread local
2008-11-16 13:52:21 -06:00
Michael Koziarski
8c197fb4ab
Add text/plain to the browser_generated_types array as webkit and gecko can submit them.
...
For more information see:
http://pseudo-flaw.net/content/web-browsers/form-data-encoding-roundup/
2008-11-16 20:24:46 +01:00
Pratik Naik
2530d0eea8
Added default_scope to Base [ #1381 state:committed] (Paweł Kondzior)
2008-11-16 23:36:41 +05:30
Pratik Naik
d9f460a39b
Ensure @@already_loaded_fixtures is initialized before use
2008-11-16 22:21:05 +05:30
David Heinemeier Hansson
ca23287b44
Revert "Added default_scope to Base [ #1381 state:committed] (Paweł Kondzior)" -- won't gel with threads.
...
This reverts commit ff594b2bc9 .
2008-11-16 16:35:52 +01:00
David Heinemeier Hansson
ff594b2bc9
Added default_scope to Base [ #1381 state:committed] (Paweł Kondzior)
2008-11-16 16:01:18 +01:00
Jeremy Kemper
29a31912fc
Lazy-require state machine internals when the module is included
2008-11-15 21:05:03 -08:00
Jeremy Kemper
d7bad6e2eb
Use the Ruby load path for test_helper requires. Fix AM::TestCase.
2008-11-15 20:25:14 -08:00
Jeremy Kemper
9e9dde617f
Require callbacks so AS::TestCase may be required in isolation
2008-11-15 19:07:57 -08:00
Jeremy Kemper
c5448c75ab
Switch to AS::TestCase for assert_deprecated
2008-11-15 13:28:46 -08:00
Jeremy Kemper
5fe543b629
Add create_fixtures method for tests
2008-11-15 12:31:54 -08:00
Jeremy Kemper
160b8a8344
Set up fixtures for AR tests
2008-11-15 12:30:02 -08:00
Jeremy Kemper
0cd9b149e2
Appropriate test case subclasses to get assert_tag and assert_deprecated
2008-11-15 12:26:37 -08:00
Jeremy Kemper
eeea1a26ec
Merge branch 'master' into testing
2008-11-15 12:21:04 -08:00
Mislav Marohnić
4f984c9d0e
auto_link helper: add intelligent ending closing bracket handling. add new tests and reorder new ones for readability
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1353 state:committed]
2008-11-15 18:30:17 +01:00
Mislav Marohnić
c6c5cd5541
refactor autolink helper. change tests to expect HTML-escaped URLs
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-15 18:30:01 +01:00
Will Bryant
789a3f5b03
Moved the * strings out of construct_finder_sql to a new default_select method so it can be overridden by plugins cleanly
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1371 state:resolved]
2008-11-15 18:26:41 +01:00
Matt Jones
d3fd997109
fix assignment to has_one :through associations.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-15 18:20:39 +01:00
David Heinemeier Hansson
31be959de7
Wrong reference
2008-11-15 16:49:20 +01:00
David Heinemeier Hansson
9eaa0a3449
Added lambda merging to OptionMerger (especially useful with named_scope and with_options) [ #740 state:committed] (Paweł Kondzior)
2008-11-15 16:48:14 +01:00
David Heinemeier Hansson
8d8195dc24
Merge branch 'master' of git@github.com:rails/rails
2008-11-15 16:44:58 +01:00
David Heinemeier Hansson
e6b33a8337
Added lambda merging to OptionMerger (especially useful with named_scope and with_options) [ #740 state:commited] (Paweł Kondzior)
2008-11-15 16:44:47 +01:00
David Heinemeier Hansson
f46780a0b4
Fixed that no body charset would be set when there are attachments present [ #740 state:commited] (Paweł Kondzior)
2008-11-15 11:05:44 +01:00
Michael Koziarski
44c3b865ac
Missing changelogs for relative_url_root changes
2008-11-14 16:11:07 +01:00
Michael Koziarski
065cc202ce
Missing changelog for memcache-client changes
2008-11-14 16:11:07 +01:00
Michael Koziarski
e4a345c1dc
Missing changelog for CSRF changes
2008-11-14 16:11:07 +01:00
Michael Koziarski
16ae82db1e
Missing changelog for :only/:except on map.resources
2008-11-14 16:11:07 +01:00
Pratik Naik
ad679a43ec
Update release notes from docrails.
2008-11-14 20:32:33 +05:30
David Heinemeier Hansson
3be853b59d
A few more dependency updates
2008-11-14 14:08:26 +01:00
David Heinemeier Hansson
4d0e6752bf
Link to 2.2.1 gems
2008-11-14 13:52:32 +01:00
Pratik Naik
c70b993a9e
Merge docrails.
2008-11-14 17:47:21 +05:30
Pratik Naik
549b18c928
Rails now requires rubygems 1.3.1 of higher.
2008-11-14 17:09:40 +05:30
David Heinemeier Hansson
c562dfc2a7
Merge branch 'master' of git@github.com:rails/rails
2008-11-14 12:27:08 +01:00
David Heinemeier Hansson
61e43700b8
Prepare for RC2
2008-11-14 12:26:50 +01:00
Tom Stuart
2ecec6052f
Make inheritance of map.resources :only/:except options behave more predictably
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-14 12:26:43 +01:00
hiroshi
94d6716324
Make polymorphic_url compact given array [ #1317 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-14 12:07:52 +01:00
David Heinemeier Hansson
ff4ccb8334
Revert "Move fixtures settings from AR::TestCase to railties test_help" -- it broke all the tests!
...
This reverts commit 9a88ab64bb .
2008-11-14 12:01:26 +01:00
Amos King
db7daa04b8
Fix typo in pool_conections_test [ #1350 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-14 11:54:05 +01:00
Chris Wanstrath
334178722b
Properly check silence_spec_warnings class variable [ #1372 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-14 11:49:30 +01:00
Jeremy Kemper
9a88ab64bb
Move fixtures settings from AR::TestCase to railties test_help
2008-11-13 19:09:23 -08:00
Jeremy Kemper
1304b66492
Remove superfluous require
2008-11-13 19:03:24 -08:00
Jeremy Kemper
d3c36b4f0a
Merge branch 'master' into testing
2008-11-13 19:02:59 -08:00
Jeremy Kemper
98a711f122
Move fixtures settings from AR::TestCase to railties test_help
2008-11-13 19:02:49 -08:00
Hongli Lai (Phusion)
4e9abdd7f1
Tag helper should output an attribute with the value 'false' instead of omitting the attribute, if the associated option is false but not nil.
2008-11-13 21:55:58 +01:00
Tom Stuart
4c09210244
Fix map.resources to always generate named routes if they're needed
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-13 17:49:09 +01:00
Ken Collins
57d795bad4
Make sure any Fixnum returned by a DB sum is type cast to a Float before standard converstion to a BigDecimal [ #8994 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-13 10:45:57 -06:00
gbuesing
f857da4faf
Merge branch 'master' of git@github.com:rails/rails
2008-11-13 09:04:24 -06:00
gbuesing
020a411304
TimeZone: fix base offset for Sri Jayawardenepura. Anchor tests for zone offsets to more current date
2008-11-13 09:04:06 -06:00
Michael Koziarski
f1ad8b48aa
Instead of overriding html_types, base the verification on browser_generated_types.
...
Also Deprecate the old unverifiable types.
[#1145 state:committed]
2008-11-13 11:23:34 +01:00
rick
00c46b5eeb
fix two MimeType failing test cases
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-13 11:23:34 +01:00
Jeff Cohen
fbbcd6f29a
Changed request forgery protection to only worry about HTML-formatted content requests.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-13 11:23:21 +01:00
Phil Ross
02df503d3b
TimeZone: Caracas GMT offset changed to -4:30 [ #1361 state:resolved]
2008-11-12 20:30:00 -06:00
Jeremy Kemper
b17eb65d00
Move fixtures settings from AR::TestCase to railties test_help
2008-11-12 11:33:09 -08:00
Jeremy Kemper
a0e7b99443
Remove deprecated Gem.manage_gems
2008-11-12 11:32:36 -08:00
Jeremy Kemper
02b716a322
Prefer a feature check to a version check
2008-11-12 11:32:15 -08:00
Tom Stuart
44a3009ff0
Add :only/:except options to map.resources
...
This allows people with huge numbers of resource routes to cut down on the memory consumption caused by the generated code.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1215 state:committed]
2008-11-12 12:57:58 +01:00
Jeremy Kemper
5d2b5ba23e
Merge branch 'master' into testing
2008-11-11 10:22:09 -08:00
Joel Chippindale
c65075feb6
Fixed method_missing for ActionMailer so it no longer matches methods where deliver or create are not a suffix [ #1318 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-11 09:46:29 -06:00
Joel Chippindale
a62e9e90d8
Fix for ActionMailer::Base.method_missing so that it raises NoMethodError when no method is found [ #1330 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-11 09:46:29 -06:00
Frederick Cheung
78a18392e1
Remove redundant uniq
2008-11-11 11:22:13 +01:00
Jeremy Kemper
cbb38bbdba
Only track new constant definitions when we're reloading dependencies
2008-11-10 22:21:09 -08:00
Jeremy Kemper
278b6cd952
Eliminate excess Regexp creation due to capture counting
2008-11-10 22:21:09 -08:00
Jeremy Kemper
5db9f9b3ad
Pare down object creation during route building
2008-11-10 22:21:09 -08:00
Joshua Peek
335a315240
Add simple case when DB calculations returns 0 instead of 0.0 [ #1346 state:resolved]
2008-11-10 14:16:43 -06:00
Jeremy Kemper
17ac2a2482
Ruby 1.9 compat: check for minitest's assertion also
2008-11-08 22:49:28 -05:00
Jeremy Kemper
1df0a07f06
lazy-initialize already loaded fixtures map
2008-11-08 22:49:00 -05:00
Jeremy Kemper
d87d3f76d5
Ruby 1.9 compat: rescue Exception since minitest's assertion doesn't subclass StandardError
2008-11-08 22:46:13 -05:00
Jeremy Kemper
8bfd5edbcf
Wrap straggling mocha user with uses_mocha block
2008-11-08 22:43:56 -05:00
Jeremy Kemper
eda9f49d57
Ruby 1.9 compat: CGI switched back to Tempfile
2008-11-08 22:43:29 -05:00
Jeremy Kemper
8a1f913381
Workaround lack of Mocha on 1.9 (hasn't been updated for minitest yet)
2008-11-08 22:35:30 -05:00
Jeremy Kemper
ace9e533dc
Merge branch 'master' into testing
2008-11-08 18:58:29 -05:00
Jeremy Kemper
a6d6a1c9ac
Move sshpublisher require into the rake tasks that use it so ruby 1.9 and macruby don't need the rake gem installed
2008-11-08 18:58:08 -05:00
Pratik Naik
5cc27f2b03
Add some basic controller logging tests
2008-11-08 18:45:19 +05:30
Jeremy Kemper
dd77733f2f
Timeout the connection pool monitor on ruby 1.8 only
2008-11-08 00:27:18 -05:00
Jeremy Kemper
661980692b
Merge branch 'master' into testing
2008-11-07 21:54:29 -05:00
Jeremy Kemper
7c73518ef7
Merge branch 'master' of git@github.com:rails/rails
2008-11-07 21:54:18 -05:00
Jeremy Kemper
c0310bde48
Merge branch 'master' into testing
2008-11-07 21:51:08 -05:00
Jeremy Kemper
0be5bc3f59
Work around ruby 1.9 segfault
2008-11-07 21:50:39 -05:00
Ken Collins
a7f920f674
If average value from DB is 0, make sure to convert it to a 0.0 float before calling #to_d on it [ #1346 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-07 20:39:06 -06:00
Jeremy Kemper
425382d95f
Don't worry about attribute ordering
2008-11-07 21:21:10 -05:00
Jeremy Kemper
07fe3370f8
Check whether last arg is a Hash instead of duck-typing against []
2008-11-07 21:20:26 -05:00
Jeremy Kemper
aaa2abf73f
Use delete if the rhs is nil
2008-11-07 21:19:02 -05:00
Jeremy Kemper
0994d11f26
Merge branch 'master' into testing
2008-11-07 19:55:29 -05:00
Jeremy Kemper
1767c4b2da
Merge branch 'master' of git@github.com:rails/rails
2008-11-07 19:49:15 -05:00
Jeremy Kemper
c77e6ace66
Check whether last arg is a Hash instead of duck-typing against []
2008-11-07 17:46:03 -05:00
Jeremy Kemper
99648c9672
Don't worry about attribute ordering
2008-11-07 17:45:10 -05:00
Jeremy Kemper
110c044e20
Use delete if the rhs is nil
2008-11-07 17:44:31 -05:00
Pratik Naik
d20955f889
Don't leave open dangling connections in development mode. [ #1335 state:resolved]
2008-11-08 04:04:32 +05:30
Nick Sieger
529c271699
Simplify dispatcher callbacks to eliminate unnecessary stale thread purging. [Nick Sieger, Pratik Naik]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-11-08 03:49:54 +05:30
Jeremy Kemper
582aa2ead5
Set up fixtures in app's test_help
2008-11-07 16:23:22 -05:00
Jeremy Kemper
1d803e5189
Update AR tests
2008-11-07 16:22:56 -05:00
Jeremy Kemper
15c0774920
undef abstract methods instead of raising NotImplementedError. Still need the definitions for rdoc though.
2008-11-07 16:22:28 -05:00
Jeremy Kemper
4af46c4ba1
Update AR integration tests for TestCase changes
2008-11-07 15:51:50 -05:00
Jeremy Kemper
c82e8e1f48
Move controller assertions from base TestCase to AC:: and AV::TestCase
2008-11-07 15:42:34 -05:00
Jeremy Kemper
ebf14baa0e
Silence parens warning
2008-11-07 15:41:27 -05:00
Jeremy Kemper
b0ee1bdf26
Remove fixtures from Test::Unit::TestCase. Mix in AR::TestFixtures instead.
2008-11-07 15:40:56 -05:00
Rich Manalang
d3ec1d3c22
auto_link view helper was failing on URLs with colons after a query param
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1341 state:committed]
2008-11-07 19:33:18 +00:00
Jeremy Kemper
d355921709
Remove controller assertions from Test::Unit::TestCase. Use ActionController::TestCase.
2008-11-07 13:27:06 -05:00
Jeremy Kemper
00f72cf99d
Set AS::TestCase::Assertion to the underlying test exception for either miniunit or test/unit
2008-11-07 13:26:28 -05:00
Jeremy Kemper
ae9581e0f3
Extract test method declaration
2008-11-07 13:25:40 -05:00
Jeremy Kemper
728606df91
Just rescue exception rather than checking for both miniunit and test/unit
2008-11-07 13:00:13 -05:00
Jeremy Kemper
f12a2b4820
Subclass AS::TestCase to get custom assertions
2008-11-07 12:59:29 -05:00
Jeremy Kemper
70c2fcab09
Safer but hacky minitest autorun override
2008-11-07 12:58:42 -05:00
Jeremy Kemper
18099b0fd5
Rework testing extensions to reflect the recent miniunit upheaval
2008-11-07 12:45:48 -05:00
Tekin Suleyman
32a5cfcd7f
Added tests for HABTM associations with counter_sql
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1102 state:committed]
2008-11-07 07:50:30 +00:00
Tekin Suleyman
26978e3ce8
Added :counter_sql as a valid key for habtm associations
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-07 07:50:23 +00:00
Michael Koziarski
9d4337ea13
Revert commit which breaks all the tests.
...
This reverts commit 8adb79b9b5 .
Conflicts:
activerecord/CHANGELOG
2008-11-07 07:31:59 +00:00
Jeremy Kemper
7b28a55a2b
Remove direct TestCase mixins. Add miniunit compatibility.
2008-11-07 01:16:06 -05:00
Jeremy Kemper
983dc80787
Don't shadow local with black arg
2008-11-07 01:08:59 -05:00
Jeremy Kemper
66d4b55899
Fix indentation mismatch
2008-11-07 01:08:21 -05:00
Jeremy Kemper
b5291ed0f1
Mark utf-8 encoding
2008-11-07 01:01:04 -05:00
Joshua Peek
77697e0335
Fix memory leak issue in ActiveRecord scoped_methods
2008-11-06 17:10:16 -06:00
Luca Guidi
4ccbc5dffb
Increment the version of our modified memcache_client code to prevent users with the gem installed not seeing our changes.
...
The changes will be submitted upstream.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1239 state:committed]
2008-11-06 19:59:02 +00:00
Aliaksey Kandratsenka
099f10679e
Don't eval recognize_optimized use __FILE__ and __LINE__ in the optimised recognition code.
...
It produces meaningless line numbers. This also easily produces line numbers greater than recognition_optimization.rb have, which causes rcov to trash memory outside of it's coverage counting arrays.
[#1319 state:committed]
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-06 19:52:44 +00:00
Michael Koziarski
af5b304a40
Fix stupid typo
2008-11-06 18:52:02 +00:00
Grant Hollingworth
732c724df6
Turn on STARTTLS if it is available in Net::SMTP (added in Ruby 1.8.7) and the SMTP server supports it [ #1336 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-06 13:07:16 +01:00
David Heinemeier Hansson
6406a87eed
Fixed the sanitize helper to avoid double escaping already properly escaped entities [ #683 state:committed]
2008-11-06 13:03:19 +01:00
David Heinemeier Hansson
a358d87e16
Fixed the sanitize helper to avoid double escaping already properly escaped entities [ #683 state:committed]
2008-11-06 13:02:32 +01:00
David Heinemeier Hansson
077773257b
Stop logging SHOW FIELDS and SET SQL_AUTO_IS_NULL=0 for the MysqlAdapter as they only clutter up the log and offer no value [DHH]
2008-11-06 12:59:17 +01:00
David Heinemeier Hansson
8adb79b9b5
Stop logging SHOW FIELDS and SET SQL_AUTO_IS_NULL=0 for the MysqlAdapter as they only clutter up the log and offer no value [DHH]
2008-11-06 10:00:15 +01:00
David Heinemeier Hansson
55707da1a1
Dont bother logging the parameters hash if there are no parameters
2008-11-06 09:59:11 +01:00
Pratik Naik
0832bc63f4
Make sure ActiveRecord::Base.connected? doesn't raise an exception for defined connections
2008-11-06 01:29:09 +05:30
Pratik Naik
396d599e24
Update guides from docrails
2008-11-06 01:10:30 +05:30
Wes Oldenbeuving
32089cbcc9
Ensure ActiveRecord::ConnectionPool.connected? handles undefined connections. [ #936 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-11-06 00:24:09 +05:30
Vladimir Dobriakov
5fad229e43
Fixed that FormTagHelper generates illegal html if name contains e.g. square brackets [ #1238 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-04 18:24:52 +01:00
Bernardo de Pádua
b2cd318c2e
Fix regression bug that made date_select and datetime_select raise a Null Pointer Exception when a nil date/datetime was passed and only month and year were displayed [ #1289 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-04 18:15:54 +01:00
David Heinemeier Hansson
a909eecbbd
Dont log the _method attribute either. Its already available in the header
2008-11-04 18:14:29 +01:00
David Heinemeier Hansson
b29f95ed9a
Dont log the _method attribute either. Its already available in the header
2008-11-04 18:12:32 +01:00
Hongli Lai (Phusion)
fb2325e358
Reimplement Jeremy's PostgreSQL automatic transaction state introspection code.
...
- Fixed compatibility with the old 'postgres' driver which doesn't support
transaction state introspection.
- Added unit tests for it.
2008-11-03 20:56:28 +01:00
Hongli Lai (Phusion)
e916aa7ea1
Rename ActiveRecord::Base#transaction's :force option to :nest. Improve documentation for nested transactions.
2008-11-03 20:56:21 +01:00
Hongli Lai (Phusion)
885c11b8f9
Make SQLite3 pass the unit tests for savepoints.
2008-11-03 20:56:14 +01:00
Hongli Lai (Phusion)
e981eaaf34
Fix a stale typo in the PostgreSQL adapter. Fix a stale mock expection in transaction_test.
2008-11-03 20:56:07 +01:00
Hongli Lai (Phusion)
e383835e73
Revert "PostgreSQL: introduce transaction_active? rather than tracking activity ourselves"
...
This commit conflicts with savepoint support.
This reverts commit 045713ee24 .
Conflicts:
activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
2008-11-03 20:56:00 +01:00
Hongli Lai (Phusion)
f48703e8c6
Fix the final MySQL unit test failure that's related to savepoint support.
2008-11-03 20:55:53 +01:00
Hongli Lai (Phusion)
47b594cc5a
Improve documentation for DatabaseStatements#transactions and AbstractAdapter#transactional_fixtures, especially with regard to support for nested transactions.
2008-11-03 20:55:47 +01:00
Jonathan Viney
3f4a8b6d0a
Fix assert_queries failures by ignoring savepoint sql.
2008-11-03 20:55:40 +01:00
Jonathan Viney
b1b204abbb
Fix what looks like a Mysql bug with transactions, savepoints, and create table.
2008-11-03 20:55:33 +01:00
Jonathan Viney
b3420f5a2e
Implement savepoints.
2008-11-03 20:55:26 +01:00
Pratik Naik
18bf7b421d
Remove unused debug_routes
2008-11-02 23:23:19 +05:30
Pratik Naik
934f98e4cf
Dont dup params twice when filter_parameters is present
2008-11-02 23:19:44 +05:30
Pratik Naik
aba1d77f38
Check first for git repository before using git branch
2008-11-02 19:36:56 +05:30
Pratik Naik
be1beb1a2d
Dont document internals
2008-11-02 18:36:14 +05:30
Pratik Naik
dc37fdc480
Merge docrails. Remove unnecessary files.
2008-11-02 18:13:54 +05:30
Michael Koziarski
8a53e258e5
Backwards compatibility fixes for relative_url_root
...
* Make the old deprecated relative_url_root still set the value as it's still used by mongrel
* Set the default from the ENV value when the file is required, not at runtime.
2008-11-02 13:12:48 +01:00
Pratik Naik
b047929c14
Merge with docrails
2008-11-02 04:02:40 +05:30
Tom Lea
5a02f0bccf
Cleaned up route optimisation guard condition generation code as it was getting a little messy.
...
Add additional condition to handle the case where default_url_options is only defined in the controller, not the view.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-01 19:06:25 +01:00
Matt Jones
01433af6a5
Make refresh_specs more resilient. Always add vendor/gems to gem search path. Use Gem.clear_paths to ensure we get a current searcher.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-01 17:35:56 +01:00
David Heinemeier Hansson
62ffc6e4db
Simplified the logging format for parameters (don't include controller, action, and format as duplicates) [DHH]
2008-11-01 15:46:30 +01:00
David Heinemeier Hansson
fbe387ea25
Merge branch 'master' of git@github.com:rails/rails
2008-11-01 15:04:28 +01:00
Luca Guidi
5229fc4cc0
Make sure habtm use class variable to list association valid keys
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1310 state:committed]
2008-11-01 15:04:08 +01:00
Luca Guidi
3f6653f9fd
Make sure habtm use class variable to list association valid keys
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1310 state:committed]
2008-11-01 12:25:29 +01:00
David Heinemeier Hansson
5110a8e05b
Remove the logging of the Session ID when the session store is CookieStore [DHH]
2008-11-01 12:16:15 +01:00
David Heinemeier Hansson
aea7e8c2f3
Accidently nixed a doc header
2008-11-01 12:05:55 +01:00
David Heinemeier Hansson
cbeac93310
Added render :js for people who want to render inline JavaScript replies without using RJS [DHH]
2008-11-01 12:03:49 +01:00
Jeffrey Hardy
408c722757
Really silence spec warnings when running GemDependency tests [ #1308 state:resolved]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-10-31 18:45:36 +01:00
David Heinemeier Hansson
c50667e961
Merge branch 'master' of git@github.com:rails/rails
2008-10-31 18:41:45 +01:00
David Heinemeier Hansson
e466ae13e9
Fixed the option merging in Array#to_xml [ #1126 state:resolved]
2008-10-31 18:41:25 +01:00
Joshua Peek
fc215de52f
Revert "config.load_paths should be frozen [ #728 state:resolved]"
...
This reverts commit 2dcdcf1552 .
2008-10-30 16:28:23 -05:00
Joshua Peek
4df5e1ae8f
It is not necessary to store QueryCache in a thread local since the cache is local to the connection object which is managed by the connection pool
2008-10-30 16:27:13 -05:00
Joshua Peek
2dcdcf1552
config.load_paths should be frozen [ #728 state:resolved]
2008-10-30 15:52:12 -05:00
Joshua Peek
0c84b6f9ed
Use database name in query cache thread local key [ #1283 state:resolved]
2008-10-30 15:48:03 -05:00
Joshua Peek
2092687bcb
Ensure content type gets reset after render_to_string [ #1182 state:resolved]
2008-10-30 15:26:29 -05:00
David Heinemeier Hansson
7857e42103
Merge branch 'master' of git@github.com:rails/rails
2008-10-30 21:11:46 +01:00
Seth Fitzsimmons
47b4fa4a62
Fixed regex in redirect_to to fully support URI schemes [ #1247 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-10-30 21:07:50 +01:00
Joshua Peek
ec38c84ce1
Dup local assigns for partial collections so nil values doesn't get overwritten [ #1250 state:resolved]
2008-10-30 15:07:47 -05:00
Tarmo Tänav
ef53d91516
Don't rely on string CoreExtensions in StringInquirer since it is sometimes expected to work before the core extension are loaded
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-10-30 17:48:32 +01:00
Jordi Bunster
a9e8168432
Ensure indices don't flip order in schema.rb [ #1266 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-10-30 13:03:42 +01:00
Mathias Meyer
7418d367f0
Fixed plugin generator so that generated unit tests would subclass ActiveSupport::TestCase, also introduced a helper script to reduce the needed require statements. [ #1137 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-10-30 12:57:52 +01:00
David Heinemeier Hansson
dffc2e2b64
Fixed that ActiveResource#post would post an empty string when it shouldn't be posting anything (Paolo Angelini) [ #525 state:committed]
2008-10-30 12:47:23 +01:00
David Heinemeier Hansson
ea2545fd8d
Update the default deprecation message to not promise that theres more info at the Rails site [ #776 state:resolved]
2008-10-30 12:42:23 +01:00
David Heinemeier Hansson
a4b4463fca
Merge branch 'master' of git@github.com:rails/rails
2008-10-30 12:15:58 +01:00
Christopher Currie
f8f22dac8e
Update non-gems distributions to use sqlite3 as the default, matching the "rails" command default [ #1270 status:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-10-30 12:15:42 +01:00
Luca Guidi
47007c75af
Update prototype to 1.6.0.3
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-10-30 12:14:26 +01:00
Luca Guidi
a01f9f0723
Update prototype to 1.6.0.3
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-10-30 12:01:30 +01:00
David Heinemeier Hansson
8f0f078637
Make #destroy write 1 line into log (instead of 3) (Dmitry Sokurenko) [ #689 status:committed]
2008-10-29 10:53:33 +01:00
David Heinemeier Hansson
4dbfe18b37
Proper API for reloading translations
2008-10-29 10:51:56 +01:00
Ryan Bates
4ad5aa9a39
Ensure @content_for_* is checked before yielding to block in render :layout [ #8994 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-10-28 17:31:33 -05:00
Michael Koziarski
4684e76aef
Remove reload call from vendored gem. Breaks a bunch of stuff as Dispatcher isn't always defined.
...
This call will be moved into Dispatcher in a bit.
2008-10-28 21:55:59 +01:00
David Heinemeier Hansson
1b0afb31df
A few more style changes
2008-10-28 19:38:26 +01:00
David Heinemeier Hansson
d5b0ba6632
Make I18n::Backend::Simple reload its translations in development mode [DHH]
2008-10-28 19:28:51 +01:00
David Heinemeier Hansson
a61c4dfa70
Follow style conventions
2008-10-28 18:35:12 +01:00
David Heinemeier Hansson
1df157cd38
Merge branch 'master' of git@github.com:rails/rails
2008-10-28 17:10:52 +01:00
Joshua Peek
ac50ee0edf
Track rendered templates in stack so the current template can always be accessed. Added ActionView::Base#template to access the template object.
2008-10-28 11:06:08 -05:00
David Heinemeier Hansson
3e54a9a689
A little less hokus pokus
2008-10-28 16:51:08 +01:00
Joshua Peek
0f651aec4e
Thread Safety: Ensure recognize_optimized is immediately written instead of lazily
2008-10-27 12:34:54 -05:00
David Heinemeier Hansson
c94ba8150a
Fixed that serialized strings should never be type-casted (i.e. turning "Yes" to a boolean)(Andreas Korth) [ #857 state:committed]
2008-10-27 17:16:45 +01:00
Michael Koziarski
9e2bb2caff
Remove reference to fformat to restore support for postgres gem.
2008-10-26 20:04:09 +01:00
Erik Andrejko
ef9b6b5cba
modified current_page? to ignore extra parameters unless specified in options
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#805 state:committed]
2008-10-26 19:14:45 +01:00
David Heinemeier Hansson
2c7abe1b56
Fixed bug with asset timestamping when using relative_url_root (Joe Goldwasser) [ #1265 status:committed]
2008-10-26 16:50:18 +01:00
Adam Majer
932dffc559
Fix binary data corruption bug in PostgreSQL adaptor
...
1. Move the binary escape/unescape from column to the driver - we should store binary data AR just like most other adaptors
2. check to make sure we only unescape bytea data
PGresult.ftype( column ) == 17
that is passed to us in escaped format
PGresult.fformat( column ) == 0
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1063 state:committed]
2008-10-25 12:54:48 +02:00
Mike Gunderloy
5c97d4ff29
"raise NoMethodError" raises NoMethodError. Raise it with NoMethodError.new instead.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-25 14:52:44 +05:30
Pratik Naik
5cf932344a
Fix typos in release notes
2008-10-25 04:34:09 +05:30
Pratik Naik
559178b80d
Update guides and release notes
2008-10-25 03:43:38 +05:30
Ken Miller
8a77c4abfa
Fixed issue where block is not called on the very first invocation of a find_or_create_by_ automatic finder.
...
[#1224 state:committed]
2008-10-24 21:35:05 +02:00
Pratik Naik
a17fc20eb1
Fix a typo
2008-10-24 18:05:52 +05:30
Pratik Naik
f8079b815b
Add some more info to the release notes
2008-10-24 18:00:01 +05:30
David Heinemeier Hansson
d224e6ccb1
Update CHANGELOGs with the last few fixes, set date for today
2008-10-24 13:08:47 +02:00
Jeffrey Hardy
3bcadc9290
Fix incorrect closing CDATA delimiter. Add tests for CDATA nodes.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-10-23 19:16:26 -07:00
Jeffrey Hardy
1a18227261
Fix that HTML::Node.parse would blow up on unclosed CDATA sections.
...
If an unclosed CDATA section is encountered and parsing is strict, an
exception will be raised. Otherwise, we consider the remainder of the line to
be the section contents. This is consistent with HTML::Tokenizer#scan_tag.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-10-23 19:16:12 -07:00
Jeremy Kemper
838cb1aa50
Skip collection ids reader optimization if using :finder_sql
2008-10-23 18:53:44 -07:00
David Heinemeier Hansson
5366e61458
Proper update call for gem server
2008-10-23 20:29:25 +02:00
David Heinemeier Hansson
ca7e4d71c2
Should be 2.2.0 as well
2008-10-23 20:23:01 +02:00
David Heinemeier Hansson
eec6e0cbbd
Push to new gem server
2008-10-23 20:18:11 +02:00
David Heinemeier Hansson
57c31a380e
Prepare for Rails 2.2.0 [RC1]
2008-10-23 20:14:20 +02:00
Pratik Naik
1a0e7390fc
Fix a typo in fxn's name
2008-10-23 19:26:52 +05:30
Pratik Naik
a8ba6773a7
Add release notes
2008-10-23 19:19:23 +05:30
Pratik Naik
896058b485
Merge with docrails
2008-10-22 23:14:00 +05:30
Pratik Naik
a03e2b356c
Merge with docrails. Also add a rake task to generate guides in your rails application :
...
rake doc:guides
The rake task will generate guides inside doc/guides directory of your application. Open index.html to browse.
2008-10-21 18:33:40 +01:00
David Heinemeier Hansson
18542c9e00
Dont try to auto-set the etag based on the body if any freshness headers have already been set [DHH/José Valim]
2008-10-21 16:58:12 +02:00
Pratik Naik
a5cdb7a813
Remove stuff that was deprecated in 2-1-stable
2008-10-21 11:34:56 +01:00
David Heinemeier Hansson
6fae0a0ec0
No use case handy for justifying fresh? any more
2008-10-21 10:20:30 +02:00
David Heinemeier Hansson
d85a7aecbb
Merge branch 'master' of git@github.com:rails/rails
2008-10-21 02:55:30 +02:00
David Heinemeier Hansson
448e7e7c04
Let fresh_when actually do the head(:not_modified). Cleaner and we get the filter halting for free then.
2008-10-21 02:54:55 +02:00
Pratik Naik
326036de46
Fix script/generate warning
2008-10-21 01:47:44 +01:00
David Heinemeier Hansson
68d84e2593
Merge branch 'master' of git@github.com:rails/rails
2008-10-21 02:30:57 +02:00
David Heinemeier Hansson
9acb88e666
Added stale?/fresh? and fresh_when methods to provide a layer of abstraction above request.fresh? and friends [DHH]
2008-10-21 02:30:13 +02:00
Matt Jones
326030a1e8
config.gem: Fix typo in unpack, skip dependencies on unloaded gems, and silence spec warnings on refresh. [ #1128 ]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-20 21:45:01 +01:00
Tim Harper
fcb45e5ec3
Ensure ActionView::Helpers::AssetTagHelper::AssetTag::Cache is cleared before loading so changes to asset files are picked up by the broswer [ #1233 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-10-20 13:21:59 -05:00
Geoff Garside
1082cba441
Bump active_support/vendor.rb tzinfo version number [ #1237 state:resolved]
2008-10-20 09:13:45 -05:00
gbuesing
c79f1d281f
TimeWithZone#freeze: preload instance variables so that we can actually freeze
2008-10-19 22:33:26 -05:00
gbuesing
93e1bff82a
Bundle TzInfo version 0.3.11
2008-10-19 22:06:32 -05:00
Pratik Naik
39e1911463
Expose default value of database connection pool in generated database.yml
2008-10-19 19:54:35 +01:00
Michael Koziarski
ba80ff74a9
Sanitize the URLs passed to redirect_to to prevent a potential response splitting attack.
...
CGI.rb and mongrel don't do any sanitization of the contents of HTTP headers, so care needs to be taken.
2008-10-19 15:24:18 +02:00
Daniel Schierbeck
de0ed534f6
Simplified the implementation of the :prefix option.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#984 state:committed]
2008-10-19 13:42:57 +02:00
Daniel Schierbeck
32a58d2afc
Added documentation of the new :prefix option.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-10-19 13:42:52 +02:00
Daniel Schierbeck
0cb382cb6f
Moved test object instantiation to a setup method.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-10-19 13:42:52 +02:00
Daniel Schierbeck
ab2b1570fd
Made the :prefix option on Module#delegate accept a custom prefix.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-10-19 13:42:52 +02:00
Daniel Schierbeck
731c63f8eb
Added :prefix option to Module#delegate.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-10-19 13:42:52 +02:00
Michael Koziarski
6d1d48de6a
Memoize the require and construction of the StringInquirer
2008-10-19 13:26:36 +02:00
Pratik Naik
550fbccedd
Fix test warnings
2008-10-17 23:57:54 +02:00
Pratik Naik
ffbd7dd8ee
CHANGELOG entry for the previous commit ( 18e7bf2865)
2008-10-17 23:48:41 +02:00
Pratik Naik
18e7bf2865
Fix Brasilia timezone. [ #1180 state:resolved]
2008-10-17 23:43:26 +02:00
Pratik Naik
5384ba3081
Don't create test/performance/test_helper.rb. Just require the needed files from test directly. [ #1135 state:resolved]
2008-10-17 22:58:37 +02:00
Doug Barth
47be090d37
Skip tests that depend on memcached if not running.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-10-17 18:09:38 +02:00
Doug Barth
4b63c2700f
Bring MemCacheStore and CompressedMemCacheStore inline with expected counter manipulation semantics.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-10-17 18:09:27 +02:00
Doug Barth
c3d6205a4b
Fix cache counter semantics for MemoryCache, FileStoreCache, and (presumably) the DRbStore.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-10-17 18:09:26 +02:00
Pratik Naik
95c609357e
Ensure association proxy responds to private class methods defined in associated class. [ #1083 ]
2008-10-16 23:17:49 +02:00
Pratik Naik
9cb5400871
Merge docrails
2008-10-16 22:13:06 +02:00
Ian White
517bc500ed
Allow class methods to be sent (via #send) to association proxy (fix for bug introduced by 691aa20) [ #1083 ]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-16 10:41:48 +02:00
Michael Koziarski
09c1718198
Remove the class_path from the collisions test.
...
The class_path is often taken already in situations like Admin namespaces etc.
2008-10-14 21:59:55 +02:00
Michael Koziarski
3e9fc279e5
Avoid warnings by undefining the old method transliterate.
2008-10-14 21:24:34 +02:00
Michael Koziarski
e0993c6c37
Reverse the order of the iconv arguments to remain compatible with older rubies / iconvs.
...
[#1195 state:resolved]
2008-10-14 21:24:19 +02:00
Joshua Peek
9ab83b1cd1
Don't include the path when checking class collisions [ #545 state:resolved]
2008-10-13 21:43:58 -05:00
gbuesing
c51db4d7ab
Enhance testing for fractional days and weeks. Update changelog.
2008-10-13 20:18:56 -05:00
Tom Lea
a6e5d29e08
Added deprecated warning messages to Float#months and Float#years deprications.
2008-10-13 20:00:10 -05:00
Tom Lea
d599b80009
Deprecated Float#years and Float#months, moved Numeric#years and Numeric#months into Integer.
2008-10-13 20:00:09 -05:00
Tom Lea
27c70ff386
Time#advance recognizes fractional days and weeks [ #970 state:resolved]
2008-10-13 20:00:09 -05:00
David Heinemeier Hansson
1abdc8752d
Added inline builder yield to atom_feed_helper tags where appropriate (Sam Ruby) [ #8994 status:committed]
2008-10-13 19:52:37 +02:00
Pratik Naik
691aa20280
Ensure methods called on association proxies respect access control. [ #1083 state:resolved] [Adam Milligan, Pratik]
2008-10-13 19:02:34 +02:00
Matthew M. Boedicker
42cbd710bb
Add support for xml processing instructions in atom_feed_helper [ #926 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-13 18:46:32 +02:00
Eloy Duran
b47c76b1df
Make sure named routes with parameters can be used in tests before a request has been done. [ #1208 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-13 18:38:48 +02:00
Matt Jones
1b44bbff42
Initialize silence_spec_warnings
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1128 state:resolved]
2008-10-13 17:27:31 +02:00
Matt Jones
9f15870946
Make VendorGemSourceIndex handle broken/missing specs generated by previous versions.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-10-13 17:27:25 +02:00
Dan Barry
0d4dbb3dfa
test nested hash with float
...
[#652 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-10-12 14:24:05 -07:00
Michael Koziarski
cb45ee344d
Remove the functionality introduce in 28d3390
...
There are several situations it doesn't cater for, and the inconsistency isn't worth blocking 2.2.
2008-10-10 17:04:46 +02:00
Will Bryant
4c05055487
explicitly including child associations that are also included in the parent association definition should not result in double records in the collection/double loads ( #1110 )
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1110 state:committed]
2008-10-10 16:58:39 +02:00
Hongli Lai (Phusion)
28393e6e9c
Add documentation for AbstractAdapter#sanitize_limit, and make its code more readable.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1068 status:committed]
2008-10-09 18:11:10 +02:00
Matt Jones
aa4a7c3530
Fix script/console --sandbox warning. [ #1194 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-09 01:35:21 +01:00
Tarmo Tänav
d69b4b7bea
Made i18n simple backend able to store false values (and not confuse them with nil or lack of value)
...
Implemented support.array.skip_last_comma i18n key for
Array#to_sentence, this also tests the ability to store false.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-09 01:19:02 +01:00
Matt Jones
0dea211f44
Fix definition of find_name
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1128 state:committed]
2008-10-08 17:36:53 +02:00
Matt Jones
2d644fd136
Mark gem as not loaded when spec not found
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-10-08 17:36:52 +02:00
Tom Stuart
e28ad77bba
Allow use of :path_prefix and :name_prefix outside of namespaced routes. [ #1188 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-08 14:56:52 +01:00
Michael Koziarski
aec391621b
Make sure last_modified! works with <= rather than just equality.
2008-10-07 21:09:07 +02:00
Michael Koziarski
5556db22c5
Reduce memory usage slightly in String#parameterize
...
[#1034 state:committed]
2008-10-07 21:01:43 +02:00
Michael Koziarski
a4629e707d
Extract transliteration code to a seperate method.
...
Use iconv by default, but only when the transliteration is well behaved. When it isn't, fallback to mb_chars
2008-10-07 21:01:38 +02:00
Cody Fauser
f2c10f2756
Add ActiveResource::Base#to_xml and ActiveResource::Base#to_json methods. [ #1011 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-07 17:48:02 +01:00
Andrew Kaspick
dce6ade4cd
Ensure select_tag#name attribute uses [] when :multiple is true. [ #1146 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-07 15:17:22 +01:00
Tarmo Tänav
51b986619d
Implement submit_to_remote as a wrapper around a more generic button_to_remote
...
Removed the "return false" from submit_to_remote onclick end as
button input elements have no default behavior to cancel.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-07 00:12:20 +01:00
madlep
8e50f0f96e
Fix image_tag behavior on windows. [ #1085 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-06 23:43:41 +01:00
Manfred Stienstra
efb9ef65cc
Fix a typo in ActiveSupport::Multibyte::NORMALIZATION_FORMS. [ #1179 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-06 19:04:45 +01:00
Jeremy Kemper
5bc91b0592
Mark utf-8 source encoding
2008-10-06 10:56:56 -07:00
Eugene Pimenov
8603813ac6
Fix memoize_all for methods with punctuation [ #1175 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-10-05 17:25:58 -05:00
Chris Cherry
1c75b4fd42
Fix deprecated ActionController::Base.relative_url_root call in mongrel command
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-10-05 17:25:57 -05:00
Pratik Naik
a2932784bb
Merge docrails
2008-10-05 22:16:26 +01:00
Matthew Moore
4df45d8609
ActiveResource can load array of strings, like serialize :bar, Array
...
Signed-off-by: rick <technoweenie@gmail.com >
[#1055 state:resolved]
2008-10-05 10:29:13 -07:00
Matt Jones
2bf58aa782
Fix a number of errors in the config.gem mechanism.
...
* Rails::GemDependency was missing definitions for hash and eql?, causing Array#uniq to not work.
* If several versions of a gem are unpacked in vendor, now chooses the highest if no version is specified.
* streamlined add_load_path. Now sets up Rubygems correctly to allow 'gem' to find frozen gems, with
gems frozen to vendor/gems and specifications in vendor/gems/<gem-name>/.specification
* Rails::GemDependency#specification would return a spec for the highest installed version, even for
frozen gems and/or previously loaded lower versions. See in part ticket #1123 .
* removed vendor from default_load_paths - it was causing autoloading to append Gems::Gems::<gem-dir> to
constant names
* added additional tests for loading frozen gems.
* incorporates the fix from #1107 for vendor rails
* defers to freeze:gems for handling the Rails framework. gems:unpack WILL NOT place a copy of Rails
in vendor/gems. Should close #1123 completely.
* incorporates, via using the gem loader for frozen gems, fixes corresponding to #227 , #324 , #362 , #527 , and #742 .
* gem plugins now work the same whether frozen or not. Correctness of the behavior is a matter for another ticket...
Signed-off-by: rick <technoweenie@gmail.com >
2008-10-05 10:16:17 -07:00
Pratik Naik
4f53db0096
Move controller ivar copying to a separate method
2008-10-05 14:01:00 +01:00
Pratik Naik
259a7a844b
Add tests for ActiveSupport::Rescuable. Use ActiveSupport::Rescuable in ActionController::Base.
2008-10-04 22:13:50 +01:00
Norbert Crombach
964dfc1557
First draft of ActiveSupport::Rescuable
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-04 20:28:08 +01:00
Pratik Naik
9599948fbc
Ensure Model.sum and Model.avg typecast appropriately. [ #1066 state:resolved]
...
Model.sum delegates typecasting to the column being summed. If that's not feasible, returns a string.
Model.avg always returns big decimal.
2008-10-04 20:13:44 +01:00
Michael Koziarski
1dfebd4f0d
1.8 compatibility for random_number method on SecureRandom.
...
1.9 has its own version.
2008-10-04 21:11:30 +02:00
Michael Koziarski
923eb9569c
Fix mismatched assertions.
2008-10-04 21:11:30 +02:00
Pratik Naik
5e3517ea7b
Ensure rescue_from handlers are respected inside tests. [ #835 state:resolved]
...
Note : If you're not using rescue_from, you should overrider rescue_action_without_handler() method
and not rescue_action(). Afterwards, you can set request.remote_addr to a non "0.0.0.0" value for testing the
overridden behavior.
2008-10-04 18:43:46 +01:00
Pratik Naik
4918e6de98
Remove HasManyAssociationStrategy and move the logic to ActiveRecord::Reflection::ThroughReflection.
2008-10-04 17:49:39 +01:00
Pratik Naik
25ca21ae21
Introduce ActiveRecord::Reflection::ThroughReflection to simplify hm:t reflection logic
2008-10-04 17:49:39 +01:00
Zach Dennis
95e1cf4812
Fix has_many :through when the source is a belongs_to association. [ #323 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-04 17:49:39 +01:00
Lawrence Pit
7659fb6a2b
Try reloading model on class mismatch [ #229 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-04 17:49:38 +01:00
Aliaksey Kandratsenka
b437a7d34e
Return processing lock to dispatcher, the finer grained lock was incompatible with the reloading in development mode.
...
This commit also adds ActionController::Dispatcher#dispatch_unlocking -- non-locking version of dispatch.
It's named anologously to POSIX {getc,getchar,...}_unlocked functions.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1170 state:committed]
2008-10-04 18:25:08 +02:00
Aliaksey Kandratsenka
f550c86257
Fix performance bug in AttibuteMethods#respond_to? in handling of private methods
...
We have hit dramatic increase in tests time after upgrading rails.
Profiling revealed this particular place. After this fix our test times returned
back to norm.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1173 state:committed]
2008-10-04 17:48:13 +02:00
Aliaksey Kandratsenka
6080b73b1c
call clear_active_connections! in :after_dispatch to give pooled connections back
...
This fixes connection pool exhaustion for web servers which create new thread per connection (e.g. Webrick).
integration.rb changes are required to keep test transaction active for several requests.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1171 state:committed]
2008-10-04 17:48:13 +02:00
Aliaksey Kandratsenka
834361145a
made ConnectionPool#checkout more robust by trying to loot dead threads when pool is empty
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1169 state:committed]
2008-10-04 17:48:13 +02:00
Aliaksey Kandratsenka
21eb18a70c
Fix race in ConnectionPool#checkout
...
After releasing monitor some connection(s) may appear in pool before monitor is re-aquired.
When this happens we'll wait for connection which is already available.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-10-04 17:48:13 +02:00
Aliaksey Kandratsenka
4cb3d27443
don't quote decimal values for mysql. It doesn't make sense and breaks in newer versions of mysql
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1168 state:committed]
2008-10-04 17:48:13 +02:00
madlep
2def5b6314
Fixed load path for actionmailer and activesupport tests to always load from local lib files.
...
[#983 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-10-04 07:57:18 -07:00
Antonio Cangiano
f0e90740d0
Add IMB DB support to Rails application generator. [ #1136 state:resolved]
...
Usage : rails app_name -d ibm_db
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-04 13:54:27 +01:00
Luca Guidi
1bc267d216
Make sure recreate MySQL test database with the proper encoding and collation [ #1165 state:resolved]
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1165 state:committed]
2008-10-03 22:08:55 +02:00
Michael Koziarski
7553a23c0a
Remove AS for oracle compatibility
2008-10-03 21:35:01 +02:00
madlep
00e2ba76b2
added nicer failure reporting to #assert_difference to tell you the expression that failed rather than just the expected and actual values
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1161 state:committed]
2008-10-03 21:31:56 +02:00
Nick Sieger
395369bc2b
Provide alternate implementation of Object#subclasses_of for JRuby
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1144 state:committed]
2008-10-03 21:28:47 +02:00
Eloy Duran
8d337e9ec2
Dynamic finders should use the ActiveRecord::Base::find method instead of ::find_initial, :find_last, and ::find_all.
...
This is so when people override ActiveRecord::Base::find, the new ::find method will also be invoked by the dynamic finders.
Associations for instance do go through ::find, so this makes it more consistent.
Also removed the unnecessary deprecation silence blocks.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1162 state:committed]
2008-10-03 21:28:11 +02:00
David Masover
e69b506abd
Call controller_path instance method so it can be easily overridden [ #1141 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-09-30 12:07:21 -05:00
Michael Koziarski
0eefa7058a
Fix etag! and last_modified! to work as advertised.
...
Add tests too.
2008-09-30 17:00:38 +02:00
Michael Koziarski
0b46503254
Remove unneeded interning.
2008-09-30 11:34:05 +02:00
Will Bryant
35d731ef0a
fix eager loading's :condition sanitizing expanding against the wrong table
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-29 17:49:44 +02:00
Will Bryant
8233f8314b
wrote a test showing eager loading's misbehavior (sanitizing against the wrong table) when the association has a :conditions hash
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-29 17:49:44 +02:00
Andrew Kaspick
8c105ee0c8
Add options to field_set_tag
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1116 state:committed]
2008-09-29 17:47:29 +02:00
Joshua Peek
28bf2fa038
Protect body ivar from being clobbered by the mailer template assigns
2008-09-28 12:31:45 -05:00
Tarmo Tänav
ea609b265f
Ignore all exceptions for validates_acceptance_of columns fetch so it can run even without a database connection
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-26 20:09:39 +02:00
Adam Milligan
4d9a7ab5f5
Changed ActiveRecord attributes to respect access control.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1084 state:committed]
2008-09-24 19:40:07 +02:00
Michael Koziarski
a78ec93036
Partially revert 185fe2e9cc
...
We shouldn't quote the unpack command's requirement as it's passed through GemRunner which takes care of it for us.
2008-09-24 18:46:45 +02:00
Michael Koziarski
025736de8e
Use ActiveSupport::SecureRandom instead of the strange fallback code.
2008-09-24 16:24:02 +02:00
Hongli Lai (Phusion)
72b772ae9b
Refactor configure_dependency_for_has_many to use a few more methods.
...
Add an additional conditions option to make it slightly easier for certain plugins.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1087 state:committed]
2008-09-24 13:27:39 +02:00
Pivotal Labs
487758b3b8
Allowed passing arrays-of-strings to :join everywhere. Merge duplicate join strings to avoid table aliasing problems.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1077 state:committed]
2008-09-24 13:26:06 +02:00
Hongli Lai (Phusion)
70b8ea4fa6
Make AssociationCollection start transactions in the correct database.
...
AssociationCollection now starts transactions by calling
AssociationCollection#transaction instead of @owner.transaction or
@reflection.klass.transaction.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1081 state:committed]
2008-09-23 20:32:01 +02:00
adam
2e75bd0808
slice now returns indifferent hash if called on one
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1096 state:committed]
2008-09-23 14:04:20 +02:00
adam
c452e49e76
Adds failed test case for slicing hash with indifferent access with symbol keys
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-23 14:04:13 +02:00
Adam Cigánek
a4f2ba8fb3
Modified ActiveSupport::Inflector#parameterize with code from slugalizer ( http://github.com/henrik/slugalizer )
...
Handles trailing and leading slashes, and squashes repeated separators into a single character.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1034 state:committed]
2008-09-23 08:08:21 +02:00
Michael Koziarski
961e2b8610
Changelog entry for manfred's multibyte changes
2008-09-22 21:52:21 +02:00
Michael Koziarski
638bd19c7f
Merge branch 'patches' into multibyte
2008-09-22 21:35:35 +02:00
Michael Koziarski
5f86451a4c
Bump the Version constants to align with the *next* release rather than the previous release.
...
This allows people tracking non-release gems or git submodules to use the constants.
2008-09-22 21:32:12 +02:00
Martin Rehfeld
10380a22a6
Fixed AssetTag cache with with relative_url_root [ #1022 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-09-22 13:23:23 -05:00
Joshua Peek
900fd6eca9
Refactor AssetTagHelper and fix remaining threadsafe issues.
2008-09-22 13:12:32 -05:00
Jan De Poorter
050e58441b
Association#first and last should not load the association if not needed. [ #1091 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-09-22 18:22:30 +01:00
Hongli Lai (Phusion
46939a9b5a
Add Model#delete instance method, similar to Model.delete class method. [ #1086 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-09-21 22:53:44 +01:00
Manfred Stienstra
5795c509a7
Set encoding of the multibyte test helpers file to UTF-8 so the strings can be read by Ruby 1.9.
2008-09-21 18:31:15 +02:00
Manfred Stienstra
1585a7ed02
Change all calls to String#chars to String#mb_chars.
2008-09-21 18:01:15 +02:00
Manfred Stienstra
00a4286551
Change call to String#chars in inflector to String#mb_chars.
2008-09-21 17:51:01 +02:00
Manfred Stienstra
44e44b42d9
Deprecated String#chars in favor of String#mb_chars.
2008-09-21 17:47:19 +02:00
Manfred Stienstra
3c9eedec3c
Move multibyte test helpers to a separate file and make the conformance tests run again.
2008-09-21 17:37:38 +02:00
Manfred Stienstra
85c05b5394
Add tests for u_unpack to make sure it raises an EncodingError on invalid UTF-8 strings.
2008-09-21 17:30:45 +02:00
Manfred Stienstra
52f8c04e1e
Fix a test that assumes .mb_chars to always return an instance of the proxy_class.
2008-09-21 17:30:16 +02:00
Manfred Stienstra
809af7f558
Non-string results from forwarded methods should be returned vertabim.
2008-09-21 17:29:22 +02:00
Manfred Stienstra
b8eec5ac33
Remove special 1.9 version of excerpt helper.
2008-09-21 17:28:46 +02:00
Manfred Stienstra
bfc73852b1
Improve documentation.
2008-09-21 17:28:05 +02:00
Manfred Stienstra
7329990d86
Change all calls to String#chars to String#mb_chars. Remove a exception for Ruby <= 1.9.
2008-09-21 17:27:25 +02:00
Manfred Stienstra
8abef4fd0d
All methods which normally return a string now return a proxy instance.
2008-09-21 17:25:36 +02:00
Manfred Stienstra
520c3f33c3
Change all calls to String#chars to String#mb_chars.
2008-09-21 17:23:37 +02:00
Manfred Stienstra
0211722088
Move with_kcode helper to abstract_unit. Add tests for multibyte string extensions.
2008-09-21 17:22:55 +02:00
Manfred Stienstra
042fd97127
Add a test for ActiveSupport::Multibyte::Chars.consumes?.
2008-09-21 17:22:26 +02:00
Manfred Stienstra
22f75d539d
Simplify ActiveSupport::Multibyte and make it run on Ruby 1.9.
...
* Unicode methods are now defined directly on Chars instead of a handler
* Updated Unicode database to Unicode 5.1.0
* Improved documentation
2008-09-21 17:21:30 +02:00
Claudio Poli
5f83e1844c
Fixed missing template paths on exception [ #1082 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-09-20 22:57:45 -05:00
Adeh DeSandies
de96a8666d
applied patch to fix the associations with blocks in modules bug from an old trac ticket
2008-09-20 13:46:09 -07:00
rick
22e830f883
Merge branch 'master' of git@github.com:rails/rails
2008-09-20 13:00:20 -07:00
Sven Fuchs
a3b7fa78bf
I18n: Introduce I18n.load_path in favor of I18n.load_translations and change Simple backend to load translations lazily. [ #1048 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-09-20 19:26:16 +01:00
Sven Fuchs
8cb7d46043
I18n: move old-style interpolation syntax deprecation to Active Record. [ #1044 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-09-20 19:13:50 +01:00
Nathaniel Talbott
9d7f186f74
Fixed an error triggered by a reload followed by a foreign key assignment.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-20 14:16:43 +02:00
Carlos Brando
79f55de9c5
Fixed Time#end_of_quarter to not blow up on May 31st [ #313 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-09-19 09:06:35 -05:00
Michael Koziarski
2d27b82d4c
Remove the country_select helper.
...
We're in no position to mediate disputes on this matter, and the previous change to use ISO 3166 has offended just as many people as the ad-hoc list did.
If you want the old list back you can install the plugin:
ruby script/plugin install git://github.com/rails/country_select.git
2008-09-18 21:30:52 +02:00
Duff OMelia
e7cb8c844a
Ensure old buffers get properly cleared to avoid leaking memory
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-09-18 08:51:19 -05:00
Edgar J. Suarez
790ebf8eab
HTTP Accept header
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-18 11:15:48 +02:00
Pelle Braendgaard
7ecb9689b0
Added support for http_only cookies in cookie_store Added unit tests for secure and http_only cookies in cookie_store
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1046 state:committed]
2008-09-17 13:20:16 +02:00
Philip Hallstrom
c47525a583
make db:migrate:redo rake task accept an optional VERSION to target that specific migration to redo
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-17 11:14:21 +02:00
Michael Koziarski
4db7e8de11
Update the documentation to reflect the change handling :group earlier
2008-09-16 18:50:36 +02:00
Michael Koziarski
4dae3649f0
Enhance the test "some string" method to support creating 'pending' tests.
...
If no block is provided to the test method, a default test will be generated which simply flunks. This makes it easy for you to generate a list of what you intend to do, then flesh it out with actual tests.
2008-09-16 16:50:14 +02:00
miloops
dc8bf7515d
When counting grouped records the target should be loaded to return a valid groups count result.
...
Without this change count_records will group for the count in the query and return erroneous results.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#937 state:committed]
2008-09-15 18:32:05 +02:00
gbuesing
157141b294
TimeWithZone #wday, #yday and #to_date avoid trip through #method_missing
2008-09-14 23:07:48 -05:00
gbuesing
cce7ae5466
Add thorough tests for Time-object #past?, #future? and #today. Fix TimeWithZone #today? to use #time instead of #utc for date comparison. Update changelog. [ #720 state:resolved]
2008-09-14 22:56:32 -05:00
Clemens Kofler
bfa12d7a02
Introduce convenience methods past?, today? and future? for Date and Time classes to facilitate Date/Time comparisons.
2008-09-14 21:21:19 -05:00
Frederick Cheung
f636c6fda0
stop AR's debug.log filling with warnings about not being able to load fixture classes
...
[#1045 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-14 18:57:39 -07:00
Frederick Cheung
d51a39ff50
Deal with MySQL's quirky handling of defaults and blob/text columns
...
[#1043 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-14 17:11:22 -07:00
gbuesing
d95943b276
Multiparameter attributes skip time zone conversion for time-only columns [ #1030 state:resolved]
2008-09-14 18:16:50 -05:00
miloops
9c4730d01e
Base.skip_time_zone_conversion_for_attributes uses class_inheritable_accessor, so that subclasses don't overwrite Base [ #346 state:resolved]
2008-09-14 17:18:17 -05:00
Michael Koziarski
d28c724b40
Make sure the permissions check file is closed before being unlinked.
...
[#1035 state:committed]
2008-09-14 09:44:29 +02:00
Pratik Naik
a17027d13a
Merge docrails
2008-09-13 20:28:01 +01:00
Mislav Marohnić
96055414d6
Ensure Hash#except is allowed on a frozen hash. References #382
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-09-13 20:05:17 +01:00
Rich Cavanaugh
113de01eaf
Allow for the dirty tracking to work with the aliased name of aliased attributes.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#812 state:committed]
2008-09-13 11:41:14 +02:00
Jon Leighton
fcf31cb752
Support for updating a belongs to association from the foreign key (without saving and reloading the record)
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#142 state:committed]
2008-09-13 11:08:29 +02:00
miloops
646b5bfa61
Use select and change test so new tests can work on postgres.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-12 12:27:03 +02:00
miloops
a37c5ae961
Improve test coverage when using the group option in find, has_many or has_and_belongs_to_many.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-11 22:51:57 +02:00
Michael Koziarski
095ad690f3
Remove the .to_s fix in validates_uniqueness_of, as Chars get quoted correctly.
2008-09-11 22:51:57 +02:00
Manfred Stienstra
babbc1580d
Fix ActiveRecord::Base.quote_bound_value for ActiveSupper::Multibyte::Chars values.
...
- Adds String#acts_like_string?
- Adds Chars#acts_like_string?
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1029 state:committed]
2008-09-11 22:51:26 +02:00
wmoxam
923f4ecad2
Fixes validates_uniquness_of problem with case insensitive string containing newline characters
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-11 17:40:14 +02:00
miloops
c98cb8ffc2
Add --debugger option to script/console.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1025 state:committed]
2008-09-11 17:12:00 +02:00
Michael Koziarski
1ddde91303
Flesh out the parameterize method to support non-ascii text and underscores.
2008-09-11 17:10:17 +02:00
Jamis Buck
46bac29de7
Add the Asia/Colombo definition from the tzinfo gem
2008-09-11 08:33:39 -06:00
Michael Koziarski
9460d45988
Add missing assert_deprecated calls to prevent spam during test runs
2008-09-11 11:21:22 +02:00
Sven Fuchs
e826c99201
add activerecord tests to make sure the deprecated %s and %d interpolation syntax still works
...
[#1016 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-10 19:28:36 -07:00
Sven Fuchs
31dcd78111
add activerecord tests for deprecation of %s and %d in error messages (and translations in general)
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-10 19:28:36 -07:00
Sven Fuchs
79c8b104d6
change activerecord validation tests to not use the deprecated interpolation syntax any more
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-10 19:28:36 -07:00
Joshua Peek
70a4f6c2dd
Switched computed public paths cache over to a simple hash w/ mutex
2008-09-10 19:05:53 -05:00
Joshua Peek
2ba9ca95f9
Removed monitor from MemoryStore and created a seperate threadsafe store called SynchronizedMemoryStore
2008-09-10 18:56:03 -05:00
rsl
6ce13429cb
fixed association preloading to use = instead of IN when there's only one record
...
[#1013 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-10 14:11:00 -07:00
Jamis Buck
5bbca48c22
Fix Sri Jayawardenepura time zone to map to Asia/Colombo
2008-09-10 13:32:10 -06:00
Jeremy Kemper
c19c0e7872
Disable warnings in AP tests
2008-09-10 11:03:32 -07:00
Pratik Naik
9994f0d902
Revert "Add :accessible option to Associations for allowing mass assignments using hash. [ #474 state:resolved]"
...
This reverts commit e0750d6a5c .
Conflicts:
activerecord/CHANGELOG
activerecord/lib/active_record/associations.rb
activerecord/lib/active_record/associations/association_collection.rb
2008-09-10 18:50:01 +01:00
Rob Anderton
b518b6c0d3
Expanded documentation for new composed_of options
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#892 state:committed]
2008-09-10 18:28:57 +02:00
Rob Anderton
2cee51d5c1
Added :constructor and :converter options to composed_of and deprecated the conversion block
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-10 18:28:47 +02:00
Tarmo Tänav
7c9851dbb6
Support :limit on update_all so that has_many with :limit can be safely updated
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-10 13:41:49 +02:00
Tarmo Tänav
14d1560e85
Fixed test_find_last_by_one_attribute_caches_dynamic_finder for postgresql 8.3
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-10 13:40:45 +02:00
Sven Fuchs
a18ed6d563
Added ActionController::Translation module delegating to I18n #translate/#t and #localize/#l [status:committed #1008 ]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-09-10 00:39:54 -05:00
David Heinemeier Hansson
c55565b032
Merge branch 'master' of git@github.com:rails/rails
2008-09-10 00:37:04 -05:00
David Heinemeier Hansson
90366a1521
Added Inflector#parameterize for easy slug generation ("Donald E. Knuth".parameterize => "donald-e-knuth") #713 [Matt Darby]
2008-09-10 00:36:37 -05:00
David Heinemeier Hansson
b8e8be83e9
Added Inflector#parameterize for easy slug generation ("Donald E. Knuth".parameterize => "donald-e-knuth") #713 [Matt Darby]
2008-09-10 00:26:50 -05:00
Alastair Brunton
b141624abb
Added image_submit_tag confirm option [status:committed #784 ]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-09-10 00:13:35 -05:00
Jose Fernandez
184cf27b12
The FormTagHelper#submit_tag helper will now pass along the original value of the submit button to the params if the :disable_with option is used [status:committed #633 ]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-09-10 00:02:23 -05:00
David Heinemeier Hansson
6dc9173a63
Missing doc updates
2008-09-09 23:59:54 -05:00
Antonio Cangiano
854cf3d721
Fix for SQLite's db creation warnings [status:committed #614 ]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-09-09 23:56:37 -05:00
miloops
567392bff3
Added find_last_by dynamic finder [status:committed #762 ]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-09-09 23:44:52 -05:00
U-ESCAPEE\Mack
f3f7d166d8
Fixed problem causes by leftover backup templates ending in tilde [state:committed #969 ]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-09-09 23:29:29 -05:00
David Heinemeier Hansson
704fc3785e
No local variable in the global namespace plz
2008-09-09 23:13:37 -05:00
David Heinemeier Hansson
23a0e2c4a9
Fixed that REXML fix would break on earlier versions of ruby (Frederick Cheung) [state:resolved #987 ]
2008-09-09 23:07:34 -05:00
David Heinemeier Hansson
cc17863709
Revert "Remove the Version check as it's not always available."
...
This reverts commit 6e2851d426 .
2008-09-09 23:05:09 -05:00
David Heinemeier Hansson
c5b65b4905
Only separate loggings with a comma when there are actually two statements
2008-09-09 22:42:49 -05:00
David Heinemeier Hansson
6233628ba0
Stopped logging template compiles as it only clogs up the log
2008-09-09 22:10:39 -05:00
David Heinemeier Hansson
dc8b21dc3c
Dont reference the class being tested when it can be assumed
2008-09-09 17:59:34 -05:00
David Heinemeier Hansson
6228220c9b
Revert "Revert "Add layout functionality to mailers.""
...
This reverts commit 36c6aa01ee .
2008-09-09 17:25:09 -05:00
David Heinemeier Hansson
36c6aa01ee
Revert "Add layout functionality to mailers."
...
This reverts commit e9a8e0053b .
2008-09-09 17:20:55 -05:00
Hongli Lai (Phusion)
1398db0128
Add special AssociationReflection methods for creating association objects, and modify the code base to use those methods instead of creating association objects directly. This allows plugins to hook into association object creation behavior.
...
[#986 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-09 13:13:12 -07:00
Hongli Lai (Phusion)
1692940441
Make the options that has_many, belongs_to and other association generation methods can accept, configurable.
...
[#985 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-09 12:50:32 -07:00
Michael Koziarski
07913788f9
Interpolation requires double quotes
2008-09-09 21:16:06 +02:00
Akira Matsuda
5f7c42413b
Ruby 1.9 compat: remove instance variables and global variables from block parameters
...
[#1000 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-09 10:35:53 -07:00
Akira Matsuda
8e68ec4dcc
Ruby 1.9 compat: use String#lines instead of to_a in Ruby 1.9
...
[#1001 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-09 10:35:24 -07:00
Akira Matsuda
07eb9ffd15
Ruby 1.9 compat: remove constants from block parameters
...
[#1002 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-09 10:07:59 -07:00
Jeremy Kemper
d5893a517f
Merge branch 'master' of git@github.com:rails/rails
2008-09-09 09:49:33 -07:00
Michael Koziarski
6e2851d426
Remove the Version check as it's not always available.
2008-09-09 10:38:07 +02:00
Jeremy Kemper
dc0411fad7
Check for uninitialized instance variables
2008-09-08 19:57:32 -07:00
Jeremy Kemper
8b4461c1a4
Check whether memoized ivar is initialized
2008-09-08 19:43:52 -07:00
Jeremy Kemper
fd71a1a354
Remove recognized_optimized method before redefining it
2008-09-08 19:42:20 -07:00
Jeremy Kemper
3c658512a1
Use defined? check since @view_paths may be uninitialized
2008-09-08 19:41:57 -07:00
Jeremy Kemper
1b94d5dc65
Fix indentation mismatch
2008-09-08 18:10:23 -07:00
Jeremy Kemper
dc0aed1151
Don't shadow arg with block var
2008-09-08 18:08:48 -07:00
Jeremy Kemper
621f48edb2
BigDecimal to_s and yaml housekeeping
2008-09-08 18:06:58 -07:00
Jeremy Kemper
4f6875296f
Revert "Revert "Raise UnknownAttributeError when unknown attributes are supplied via mass assignment""
...
This reverts commit 41efd73887 .
2008-09-08 09:45:26 -07:00
Matt Jones
7e6cda15f8
Ensure routing optimizations are cleared when new routes are added [ #981 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-09-07 10:21:34 -05:00
Jeremy Kemper
41efd73887
Revert "Raise UnknownAttributeError when unknown attributes are supplied via mass assignment"
...
This reverts commit 108db00aa9 .
2008-09-06 21:01:45 -07:00
Jeremy Kemper
15b1b2b778
Ruby 1.9 compat: use method_defined? instead of instance_methods.include? Don't encourage args abuse by flattening.
2008-09-06 18:45:52 -07:00
David Heinemeier Hansson
227ee2ecb4
Use a more sensible resolution on the new millisecond benchmarks
2008-09-05 14:58:34 +02:00
David Heinemeier Hansson
de0e7507de
Changed all benchmarking reports to be in milliseconds
2008-09-05 14:22:57 +02:00
David Heinemeier Hansson
cf0467c642
Use copy instead of export for release
2008-09-05 14:22:56 +02:00
Jeremy Kemper
1156bbc06c
Merge branch 'master' of git@github.com:rails/rails
2008-09-04 17:20:24 +02:00
Jeremy Kemper
cd498e2588
Rescue spurious failures in case dummy postgresql user or schema already exists
2008-09-04 17:20:07 +02:00
Michael Koziarski
ca5ffd10b9
Handle connection timeouts with a slightly nicer error message.
2008-09-04 17:02:04 +02:00
Jeremy Kemper
17628ecfce
Deprecate %d and %s in message interpolation, but only in the bundled i18n lib.
2008-09-04 16:46:12 +02:00
Nick Sieger
0d9e238cc9
Remove flawed execute("ROLLBACK") approach; #reset! defaults to nothing
...
Will need community help to fill out what #reset! should do for each adapter
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-04 15:45:00 +02:00
Nick Sieger
a3f12f575d
Default connection allow_concurrency to false (for PostgreSQL)
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-04 15:44:05 +02:00
Michael Koziarski
2c62baf4bf
Handle the case where there is no ivar set.
...
This happens on jruby due to a bug, but also on historically marshalled data.
2008-09-04 15:09:30 +02:00
Nick Sieger
7ba2872615
Deprecate verification_timeout and verify before reset
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-04 14:36:09 +02:00
Jeremy Kemper
f54be2cb31
Fix transaction exception test
2008-09-04 13:24:55 +02:00
Jeremy Kemper
039d78a7d8
still need to track whether we're the toplevel transaction
2008-09-04 13:17:00 +02:00
Jeremy Kemper
045713ee24
PostgreSQL: introduce transaction_active? rather than tracking activity ourselves
2008-09-04 12:17:56 +02:00
Tarmo Tänav
671bbd962e
Don't run 32bit dependant assertions in 64bit environments
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-04 10:11:06 +02:00
Pratik Naik
6ef35461dc
Merge docrails
2008-09-03 17:58:47 +01:00
Adam Keys
10fe6a6d89
Add each_with_object from 1.9 for a more convenient alternative to inject.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#962 state:committed]
2008-09-03 16:21:53 +02:00
Nigel Ramsay
b36d000975
Inline help text was incorrectly telling user to uncomment line to use default local time. User should comment the line to use default local time.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#960 state:committed]
2008-09-03 09:04:42 +02:00
Clemens Kofler
d3ccfe414d
Whitespace.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:55 +02:00
Clemens Kofler
288e947ae1
Some performance goodness for inheritable attributes.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:23 +02:00
Clemens Kofler
4d092ba208
Some performance goodness for AR.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:23 +02:00
Clemens Kofler
a377c9853c
Some performance goodness for AM Validations.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:23 +02:00
Clemens Kofler
b42f53ca1f
Some performance goodness for AM StateMatchine.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:23 +02:00
Clemens Kofler
948ed34600
Some performance goodness for routing.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:23 +02:00
Clemens Kofler
ba3ecf53b4
Some performance goodness for AR associations.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:22 +02:00
Clemens Kofler
1646e8c364
More symbols for send and respond_to?.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:22 +02:00
Clemens Kofler
a978701f86
More symbols for send and respond_to?.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:22 +02:00
Clemens Kofler
abebdf52a3
Use symbols for send and respond_to?.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:22 +02:00
Clemens Kofler
2e240f0eac
Removed unnecessary Symbol#to_proc from Asset Tag Helper.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:22 +02:00
Jonathan del Strother
6cfb70023a
Don't set Content-Length on 304 responses
...
Commit 8aad8c claimed to do this, but it checks for the 304 status too early, before handle_conditional_get! has overridden it.
[#958 state:resolved]
Signed-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv >
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-02 22:57:40 +02:00
Jeremy Kemper
6f932b4790
Database connections are now pooled, one pool per #establish_connection call.
...
Pools start out empty and grow as necessary to a maximum size (default is 5,
configure size with key 'pool' in your database configuration). If no
connections are available, a thread will wait up to a 'wait_timeout' time
(default is 5 seconds).
Connections are verified and reset when checked out from the pool (usually
upon first access to ActiveRecord::Base.connection), and returned back to the
pool after each request.
If you would like to use connection pools outside of ActionPack, there is an
ActiveRecord::Base.connection_pool method that gives you access to the pool,
and you can manually checkout/checkin connections, or supply a block to
ActiveRecord::Base.connection_pool.with_connection which takes care of the
checkout/checkin for you.
[#936 state:resolved]
2008-09-02 18:32:54 +02:00
Michael Koziarski
ebfa43c423
Merge rexml-expansion-fix gem into activesupport.
...
Addresses the security issue documented at:
* http://www.ruby-lang.org/en/news/2008/08/23/dos-vulnerability-in-rexml/
2008-09-02 16:22:20 +02:00
Iain Hecker
76797b4439
translates when a message symbol has been set on builtin validations
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-31 13:24:08 -07:00
Jeremy Kemper
a1eb4e11c2
Get rid of 'Object#send!'. It was originally added because it's in Ruby 1.9, but it has since been removed from 1.9.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
Conflicts:
actionpack/test/controller/layout_test.rb
2008-08-31 13:20:15 -07:00
Pratik Naik
e9a8e0053b
Add layout functionality to mailers.
...
Mailer layouts behaves just like controller layouts, except layout names need to
have '_mailer' postfix for them to be automatically picked up.
2008-08-31 19:17:42 +01:00
Luke Melia
7ce03db778
Fixes optimised named routes generating question mark followed by nothing when provided an empty hash as the last argument.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#481 state:committed]
2008-08-31 19:42:01 +02:00
Joshua Peek
086c3520c4
Moved layout exemption logic into the view
2008-08-31 11:34:46 -05:00
Joshua Peek
8eec694598
Prefix ActionView::Base private methods with an underscore
2008-08-31 10:50:43 -05:00
Pratik Naik
56c2b02f59
Fix AM tests and add tests for rendering logging
2008-08-31 16:29:21 +01:00
Pratik Naik
cdda7defa0
Add lost log messages about template rendering
2008-08-31 15:41:02 +01:00
Pratik Naik
a13d335461
Move layout rendering logic to ActionView::Base
2008-08-31 15:23:45 +01:00
Jeremy Kemper
c50223b76f
Fix tests that assumed implicit order by id
2008-08-30 22:47:28 -07:00
Pratik Naik
a59a3db1f3
Move copying ivar logic from ActionController::Base to ActionView::Base
2008-08-31 03:48:09 +01:00
miloops
6183e55f71
Use reflection primary_key instead of id for when selecting association ids.
...
[#906 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-30 17:39:30 -07:00
miloops
367a55e1b8
Allow prototype functions to receive position parameter as a symbol.
...
[#887 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-30 16:35:25 -07:00
Pratik Naik
cb25c4e584
Remove unused use_full_path argument
2008-08-31 00:18:10 +01:00
Jeremy Kemper
f7d9e09eee
Merge branch 'master' of git@github.com:rails/rails
2008-08-30 15:49:56 -07:00
miloops
b163d83b8b
Performance: Better query for ASSOCIATION_ids. Select only ids if the association hasn't been loaded.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-30 15:24:09 -07:00
Pratik Naik
4fb75392aa
Add test to make sure RJS block inside controller is executed in view context
2008-08-30 21:47:35 +01:00
Pratik Naik
e12abb6e8a
Dont pass controller partial layout option to view
2008-08-30 20:18:54 +01:00
Pratik Naik
afea4c9b0e
Remove double layout check
2008-08-30 19:35:29 +01:00
Pratik Naik
83c6ba1889
Add support for shallow nesting of routes. [ #838 state:resolved]
...
Adds :shallow option to resource route definition. If true, paths for nested
resources which reference a specific member (ie. those with an :id parameter)
will not use the parent path prefix or name prefix.
Example :
map.resources :users, :shallow => true do |user|
user.resources :posts
end
* GET /users/1/posts (maps to PostsController#index action as usual)
named route "user_posts" is added as usual.
* GET /posts/2 (maps to PostsController#show action as if it were not nested)
Additionally, named route "post" is added too.
2008-08-30 15:20:20 +01:00
Sven Fuchs
be4ae1f526
I18n: applied Luca Guidi's patch for better #interpolate performance
...
[#943 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-30 02:02:33 -07:00
Nathaniel Bibler
efa6620a2a
Added optional rake doc:app TITLE environment parameter
...
[#939 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-29 21:04:04 -07:00
Rasik Pandey
16b9a554db
Format related patches to support serializing data out in the correct format with correct http request headers per http method type [ #450 state:resolved]
...
Signed-off-by: Tarmo Tänav <tarmo@itech.ee >
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-29 18:45:39 -07:00
miloops
11eb29f60a
Make assert_select_rjs code more readable, make use of unused constants and use more simple Regexps.
...
[#540 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-29 17:52:26 -07:00
Tarmo Tänav
6450d6ca76
Added button_to_remote helper
...
Ticket originally from http://dev.rubyonrails.org/ticket/3641
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-29 16:22:01 -07:00
Jeremy Kemper
5a6e20b607
Fix test to not assume which thread finishes first
2008-08-29 15:59:56 -07:00
Hongli Lai (Phusion)
204a8cce88
Move some core extension methods into a module under the ActiveSupport::CoreExtensions namespace, instead of extending core classes directly. This is more friendly for API reference generators.
...
[#915 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-29 15:15:40 -07:00
Tom Stuart
7f179f8540
Make NamedScope#size behave identically to AssociationCollection#size. [ #933 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-29 22:18:49 +01:00
Joshua Peek
c0361344d9
1.9: methods need to be coerced into strings
2008-08-29 15:43:07 -05:00
James Mead
3cf773b187
ActionMailer should respond_to? to methods handled by method_missing [ #700 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-29 15:09:47 -05:00
Michael Koziarski
99492bad88
Use a set for the named scope methods not a big regexp.
2008-08-29 21:12:37 +02:00
Nick Sieger
300754509b
Minor tweak to retrieve_connection_pool -- recurse instead of loop
2008-08-29 14:12:13 -05:00
Nick Sieger
113cc4e1c4
Remove some synchronization that's probably overkill, assuming one doesn't establish connections frequently
2008-08-29 14:12:13 -05:00
Nick Sieger
c1b949869c
Remove call to active_record.allow_concurrency since it's deprecated
2008-08-29 14:12:13 -05:00
Nick Sieger
8e5e02bdad
Collapse connection pool class hierarchy; YAGNI.
...
- Add connection checkin and checkout callbacks to adapter to allow
adapter-specific customization of behavior (e.g., JRuby w/ JNDI)
2008-08-29 14:12:12 -05:00
Nick Sieger
d07a6b1a4a
Make clear_active_connections! also return stale connections back to the pool
...
- also clean up some cruft remaining from per-thread connection cache
2008-08-29 14:12:12 -05:00
Nick Sieger
212134dce1
Remove CachedConnectionPerThread per-thread pooling mechanism in favor of a fixed pool with default maximum of 5 connections
2008-08-29 14:12:12 -05:00
Nick Sieger
ca6d71753f
Deprecate allow_concurrency and make it have no effect
2008-08-29 14:12:12 -05:00
Nick Sieger
a96b7d4c33
Add connection reset and verification upon each connection checkout
2008-08-29 14:12:12 -05:00
Nick Sieger
d7d2d73d88
Fix typo: was using brackets instead of parens. Must need more sleep.
2008-08-29 14:12:11 -05:00
Nick Sieger
1712e37c90
Favor existing connections over new ones if available
2008-08-29 14:12:11 -05:00
Nick Sieger
817a07b451
More doco and class/method renames. Now have a strategy for integration with ActionPack.
2008-08-29 14:12:11 -05:00
Nick Sieger
3ce64d4f16
Fix checkin method, add a couple more tests
2008-08-29 14:12:11 -05:00
Nick Sieger
fe575dd4a9
Nearing the finish line. Initial fixed-size connection pool implemented, more docs
2008-08-29 14:12:11 -05:00
Nick Sieger
82fcd9d85f
Clean up the code, get rid of reserve/release, add some more docs
2008-08-29 14:12:10 -05:00
Nick Sieger
029952edf4
Extract a base class for connection pools, start to flesh out reserve/release API
2008-08-29 14:12:10 -05:00
Nick Sieger
51349ec873
Add readme stating intentions of the work
2008-08-29 14:12:10 -05:00
Nick Sieger
72d959d9b5
Split connection handler into single- and multiple-thread versions.
2008-08-29 14:12:10 -05:00
Nick Sieger
ff97e9d029
Connection handling methods extracted out into separate ConnectionHandler class
...
- delegating methods left behind
2008-08-29 14:12:10 -05:00
Nick Sieger
3151d96663
Revert "Change all databases.rake adapter 'when' statements to use regexes."
...
This reverts commit 3d2512d38d2e28b3ea669139f7c7b0307522aa72.
2008-08-29 14:12:09 -05:00
Nick
37b0b36918
Fix failure to retain value of allow_concurrency
...
- Also carry allow_concurrency value through to connection adapter
(for postgresql)
2008-08-29 14:12:09 -05:00
Nick
cab76ce6ac
Add synchronization to connection pool also
2008-08-29 14:12:09 -05:00
Nick
50cd4bdc99
Introduce synchronization around connection pool access
...
- use new active support Module#synchronize
- allow_concurrency now switches between a null monitor and a
regular monitor (defaulting to null monitor to avoid overhead)
2008-08-29 14:12:09 -05:00
Nick
b185d157fe
Module#synchronize: Add testcase to ensure that singleton methods can be wrapped
2008-08-29 14:12:09 -05:00
Nick
9dc4f66110
Add method punctuation handling to #synchronize
2008-08-29 14:12:09 -05:00
Nick
3eb68248e0
Adds Module#synchronize for easier method-level synchronization.
2008-08-29 14:12:08 -05:00
Nick
5879b15f23
Rename defined_connections to connection_pools
...
- Distinguis meaning of "active_connections" to always mean connections
associated with the current thread
2008-08-29 14:12:08 -05:00
Nick
6edaa26717
Initial conversion to connection pool
...
So far so good, tests still run clean. Next steps: synchronize connection pool access
and modification, and change allow_concurrency to simply switch a real lock for a
null lock.
2008-08-29 14:12:08 -05:00
Nick
1a81f156bd
Change all databases.rake adapter 'when' statements to use regexes.
...
This is more friendly to JRuby/JDBC adapters (with names like 'jdbcmysql')
and leaves the door open to alternate implementations of adapters in the
future.
2008-08-29 14:12:08 -05:00
Tom Lea
db26b47b9f
Ensure that calling content_tag_for in a helper doesn't cause duplicate output.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#871 state:committed]
2008-08-29 20:52:01 +02:00
Tim Haines
d0b949d873
Improve assert_select_rjs failure messages for show, hide, toggle, and remove
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#931 state:committed]
2008-08-29 20:51:47 +02:00
Joshua Peek
a200c67611
Merge RenderTest and NewRenderTest
2008-08-29 13:26:28 -05:00
Eugene Pimenov
743f0e7114
Make case insensitive validates_uniqueness_of use unicode aware downcase method.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-29 20:24:20 +02:00
Nick Sieger
a9086b3daa
Make query-cache thread-local
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-29 10:21:39 -05:00
Michael Koziarski
6769d824f9
Fix parentheses warnings
2008-08-29 15:27:34 +02:00
Jan De Poorter
db116a2ed6
Fix NamedScope regex so methods containing "an" get delegated to proxy_found. [ #901 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-29 14:06:37 +01:00
Pratik Naik
6577942b61
Deprecate render_component.
...
Please install render_component plugin from http://github.com/rails/render_component/tree/master
if your application uses this functionality.
2008-08-29 13:43:30 +01:00
Jeremy Kemper
85070b5e56
Date#freeze bug doesn't affect Ruby 1.9
2008-08-28 22:36:10 -07:00
Jeremy Kemper
c94f6ea2f3
Date#freeze bug doesn't affect Ruby 1.9
2008-08-28 22:27:55 -07:00
Jeremy Kemper
766fb54c8f
Fix indentation
2008-08-28 12:35:47 -07:00
Jeremy Kemper
082c377954
Missed changelog update for #501
2008-08-28 12:32:38 -07:00
Brennan Dunn
9cc8c0a0a1
Routes may be restricted to lists of HTTP methods instead of a single method or :any.
...
[#407 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-28 12:29:49 -07:00
Brennan Dunn
7bdd5b768e
Accept an array of method symbols for collection/member actions of resources
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-28 12:23:39 -07:00
Andrew White
db22c89543
Merge scoped :joins together instead of overwriting them. May expose scoping bugs in your code!
...
[#501 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-28 12:07:15 -07:00
Ernie Miller
44af2efa2c
Refactored AssociationCollection#count for uniformity and Ruby 1.8.7 support.
...
[#831 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-28 11:58:25 -07:00
Jeremy Kemper
ce4d13861d
Merge branch 'master' of git@github.com:rails/rails
2008-08-28 11:47:06 -07:00
Joshua Peek
acbf2b74aa
Deprecated implicit local assignments when rendering partials
2008-08-28 10:37:46 -05:00
Michael Koziarski
8b6870cfae
Prevent deprecation warning in the tests
2008-08-28 12:47:18 +02:00
Bradford Folkens
293f99700d
Reinstate Range#step default argument.
...
[#595 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-27 23:48:54 -07:00
Tarmo Tänav
96c6fe0842
Implement count limit/offset support for has_many associations
...
[#348 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-27 23:32:21 -07:00
Tarmo Tänav
13671cc565
Alias included associations if needed when doing a count
...
[#302 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-27 23:29:29 -07:00
Tom Lea
ad562c58ea
Dirty: treat two changes resulting in the original value as being unchanged.
...
[#798 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-27 23:13:41 -07:00
Ken Collins
f277e1d8fd
Added TextHelper#current_cycle to return the current cycle for better design options.
...
[#417 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-27 23:06:20 -07:00
Michael S. Klishin
e42a235dd1
Request#remote_ip handles the uncommon case that REMOTE_ADDR is a comma-separated list.
...
[#523 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-27 23:03:11 -07:00
Lars Kanis
c2068d14d2
PostgreSQL: fix quote_string for certain old pg drivers. [ #94 state:resolved]
2008-08-27 22:51:10 -07:00
Jeremy Kemper
a444c78212
respond_to? passes along splat args to avoid introducing the second arg if it was omitted
2008-08-27 21:32:51 -07:00
Tim Haines
82778351a8
Add TestUploadFile.content_type= to match Request.UploadedFile
...
[#920 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-27 18:50:29 -07:00
Jeremy Kemper
657898c821
Merge commit 'sven/i18n'
...
Conflicts:
activesupport/lib/active_support.rb
2008-08-27 12:31:07 -07:00
Joshua Peek
87fafe4074
Moved Logger extensions into core_ext
2008-08-27 11:33:18 -05:00
Luca Guidi
ce65a05c5b
Fix Ruby's Time marshaling bug in pre-1.9 versions of Ruby: utc instances are now correctly unmarshaled with a utc zone instead of the system local zone [ #900 state:resolved]
2008-08-27 08:57:36 -05:00
Michael Koziarski
b7cd4ded93
Formally deprecate the old secret key generator
2008-08-27 15:18:07 +02:00
Hongli Lai (Phusion
b3411ff59e
Deprecate Rails::SecretKeyGenerator in favor of ActiveSupport::SecureRandom.
...
SecureRandom has a few minor security enhancements and can be used as a drop-in replacement
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#913 state:committed]
2008-08-27 15:08:16 +02:00
Marko Seppae
cba83ede5d
I18n: remove #populate from Simple backend as well
2008-08-27 12:00:14 +02:00
pivotal
9dbde4f5cb
Fix two has_one :through errors
...
* Set the association target on assignment;
* Reset target to nil on reset, rather than empty array.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#895 state:committed]
2008-08-27 11:22:15 +02:00
Marko Seppae
2d03a4c668
i18n: fixed failing tests after removing #populate and #store_translations
2008-08-27 10:37:01 +02:00
Marko Seppae
0fcd5b5466
I18n: removed call to #populate from main library files
2008-08-27 10:36:00 +02:00
Marko Seppae
44de71ba94
I18n: removed #populate and #store_translations from api
2008-08-27 10:16:25 +02:00
Joshua Peek
6ec07e0737
Store application and other context specific helper modules in ActionView::Base#helpers
2008-08-26 16:17:58 -05:00
Joshua Peek
cd91a8d3ad
defined? has no bounds
2008-08-26 15:21:06 -05:00
Joshua Peek
9853134b4f
Require missing libraries and check for defined ActionController constant so ActionView can be used standalone
2008-08-26 15:13:28 -05:00
Joshua Peek
8756dd75b2
Performance: reduce garbage created by ActiveRecord::Calculations#column_alias_for
2008-08-26 14:24:52 -05:00
rick
0aef9d1a26
Merge branch 'master' of git@github.com:rails/rails
2008-08-26 11:53:33 -07:00
Joshua Peek
229eedfda8
Cache JavaScriptGenerator's helper module set on the template
2008-08-26 12:17:55 -05:00
Hongli Lai (Phusion
c111522d5b
The 'rails' command was broken by the last commit. Fix that.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-26 16:28:41 +02:00
Hongli Lai (Phusion
f9f1ab4e3d
When an unexpected exception is caught, tell the administrator to read the log file for more information about the error. This should make things less confusing for developers who are new to Rails.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-26 14:30:19 +02:00
Tarmo Tänav
eec5eb2e44
Fix yet another implicit order dependant test
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-26 13:16:55 +02:00
Tarmo Tänav
3dfecfe773
Print the queries that were executed if assert_queries fails
2008-08-26 12:45:04 +02:00
Michael Koziarski
bb557b44e9
Be more careful
2008-08-26 12:21:48 +02:00
Michael Koziarski
86bf279b89
Re enable CI for postgresql
2008-08-26 12:14:07 +02:00
Tarmo Tänav
ce3c76de7c
Just look at sql_type when testing that the correct database-specific type was used
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-26 12:11:01 +02:00
Jeremy Kemper
e06878c22b
Merge branch 'master' of git@github.com:rails/rails
2008-08-26 03:04:14 -07:00
Tarmo Tänav
00d2165f74
Back to fetching all versions in ruby instead of letting SQL do it as it's difficult to get all databases to convert the text value to a number with the same SQL
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-26 03:00:36 -07:00
Jeremy Kemper
ab1e82b8f7
Include people and readers fixtures to fix test isolation error
2008-08-26 02:38:48 -07:00
Jeremy Kemper
0c7bbc72fc
fix tests relying on implicit ordering
2008-08-26 02:17:36 -07:00
Jeremy Kemper
b319e69ecb
PostgreSQL: pg driver expects nil instead of empty string for missing user/pass
2008-08-26 01:54:14 -07:00
Jeremy Kemper
d2d739fd06
Merge branch 'master' of git@github.com:rails/rails
2008-08-26 01:50:32 -07:00
Tarmo Tänav
973c0ef26d
Create mysql binary_fields table with latin1 character set as with utf8 all the limits would have to be divided by 3 to get the expected text types
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-26 01:49:19 -07:00
Jeremy Kemper
11612bf956
Merge branch 'master' of git@github.com:rails/rails
2008-08-26 00:55:25 -07:00
Tarmo Tänav
fa795ccfad
Include mysql older than 5.1.23 in the 5.1 series in the list of those that can't handle NULL defaults
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-26 00:53:19 -07:00
Chad Woolley
289e3b9072
use double quotes
2008-08-26 09:40:19 +02:00
Jeremy Kemper
52e15abbed
um.. yeah
2008-08-26 00:10:16 -07:00
Jeremy Kemper
6d66ddaa34
typo
2008-08-26 00:02:30 -07:00
Jeremy Kemper
842d55cb16
fix another ordering failure
2008-08-26 00:02:22 -07:00
Jeremy Kemper
ca48da6300
fix tests relying on implicit ordering
2008-08-25 23:53:31 -07:00
Josh Susser
1092c181b5
add dynamic finder bang version to raise RecordNotFound
...
[#905 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-25 23:33:16 -07:00
Josh Susser
143f5fbb21
refactor dynamic finder name matching into its own class
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-25 23:32:20 -07:00
Jeremy Kemper
3beed9cdb7
ensure tests load sibling Active Support instead of a gem
2008-08-25 23:32:03 -07:00
Tarmo Tänav
77b003fb61
Use DECIMAL instead of INTEGER when casting as mysql doesn't work with just "INTEGER" and other databases don't like "UNSIGNED" which mysql requires
...
And don't mask exceptions.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-25 23:23:34 -07:00
Tarmo Tänav
3d2ac918b9
Cache migrated versions list in Migrator and use it to fetch the latest migrated version name [ #845 state:resolved]
...
Also optimized Migrator#current_version class method to fetch
only the latest version number and not all of them.
With this change no matter how many migrations there are the
schema_migrations table is only SELECTed from once.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-25 22:03:47 -07:00
Jeremy Kemper
4bcd64c9e9
Ruby 1.9 compat: switch profile_options to superclass_delegating_accessor
2008-08-25 22:01:02 -07:00
Tarmo Tänav
a445cdd884
Load the first and not the last has_one result when doing join-based eager loading
...
This matters when the has_one is defined with an order in which case
there is an expectation that the first one will be loaded.
[#904 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-25 21:23:35 -07:00
Frederick Cheung
2dbda11945
Implement old-skool eagerloading for has_one :through
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-25 21:23:15 -07:00
Jeremy Kemper
172606e21f
Harmonize framework require strategy. Don't add self to load path since Rails initializer and RubyGems handle it.
2008-08-25 21:22:34 -07:00
Frederick Cheung
b7a37b742c
Fix preloading of has_one through associations
...
[#903 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-25 20:49:55 -07:00
Joshua Peek
f2d8d13c64
Performance: Cache modules that extend the view context for JavaScriptGenerator
2008-08-25 21:50:26 -05:00
Joshua Peek
ba0d621695
Include all helpers into ActionView::Helper
2008-08-25 21:50:26 -05:00
Jeremy Kemper
e5cad34916
strip trailing whitespace
2008-08-25 18:16:58 -07:00
Jeremy Kemper
1c54ca4f75
Ruby 1.9 compat: fix test error masked by old String#each behavior
2008-08-25 18:16:21 -07:00
Jeremy Kemper
5e1ceb153c
Work around frozen Date memoization
2008-08-25 17:05:50 -07:00
Joshua Peek
a916c2e3d3
The view context always responds to controller, check if controller available instead
2008-08-25 15:37:19 -05:00
Joshua Peek
fe2640549b
Base path may be nil if template is at the root of the view path
2008-08-25 15:36:11 -05:00
Sven Fuchs
49859b0bb1
I18n: fix activerecord i18n test for classy backend
2008-08-25 11:48:03 +02:00
Sven Fuchs
43a0012e50
Merge branch 'i18n' of git@github.com:svenfuchs/rails into i18n
2008-08-25 11:43:44 +02:00
Sven Fuchs
d0a4d9b73a
Update translations for pluralization key change from 'many' to 'other'
2008-08-25 11:41:51 +02:00
Sven Fuchs
84d8957e04
Update translations for pluralization key change from 'many' to 'other'
2008-08-25 11:25:59 +02:00
Sven Fuchs
a61e87aeb9
update i18n gem
2008-08-25 11:20:24 +02:00
Sven Fuchs
e464f9b6b9
Merge commit 'rails/master' into i18n
2008-08-25 11:11:08 +02:00
Sven Fuchs
90a9637d41
I18n: add aliases #t and #l to TranslationHelper#translate and #localize
2008-08-25 11:06:18 +02:00
Chad Woolley
fb20d6f09d
properly reference geminstaller config under ci dir
2008-08-25 10:34:01 +02:00
Jeremy Kemper
8a4d7233aa
Update translations for pluralization key change from 'other' to 'many'
2008-08-24 11:10:15 -07:00
Jeremy Kemper
950ea33242
Fix test to assign the module instead of a new instance
2008-08-24 11:08:49 -07:00
Jeremy Kemper
3c52c4c12b
Merge branch 'master' of git@github.com:rails/rails
2008-08-24 11:08:25 -07:00
Chad Woolley
337b043c93
Include the CI configuration and setup instructions.
...
This should make it easy to set up your own copy of the CI environment, and easier for us to keep ours running.
2008-08-24 16:27:20 +02:00
Michael Koziarski
33ed19f428
Merge branch 'patches'
2008-08-24 14:34:47 +02:00
Xavier Noria
e02f0dcc24
Rollback the transaction when a before_* callback returns false.
...
Previously this would have committed the transaction but not carried out save or destroy operation.
[#891 state:committed]
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-24 14:34:24 +02:00
Michael Koziarski
eb2b81c766
Reverse the priority of the mysql commands in dbconsole
2008-08-24 13:20:23 +02:00
Jeremy Kemper
bb3dd6ad2e
Ruby 1.9 compat: update bundled i18n lib
2008-08-23 21:51:06 -07:00
Jeremy Kemper
53e2e8ef2b
Merge branch 'master' into i18n
2008-08-23 21:41:18 -07:00
Jeremy Kemper
c471f13db6
Ruby 1.9 compat: Hash is now flattenable, so explicitly exclude it
2008-08-23 21:26:14 -07:00
Jeremy Kemper
2efdeb7a95
Ruby 1.9 compat: set source encoding
2008-08-23 16:06:54 -07:00
Jeremy Kemper
92a7239a3d
Ruby 1.9: silence some warnings for block args shadowing local vars
2008-08-23 16:03:00 -07:00
Jeremy Kemper
e7127be365
Ruby 1.9: constantize takes advantage of new inherit arg to const_get and const_defined?
2008-08-23 15:59:59 -07:00
Sven Fuchs
d6989aa0e1
I18n: use :other instead of :many as default key for pluralization to better conform w/ cldr pluralization rules
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-23 21:23:00 +02:00
Tarmo Tänav
b1f3c6e6ec
Generate belongs_to association when generating a model
2008-08-23 21:54:43 +03:00
Tarmo Tänav
9223a91911
Generate belongs_to associations automatically for 'references' types [ #640 state:resolved]
2008-08-23 20:58:44 +03:00
Sven Fuchs
23fb26a0dc
I18n: use :other instead of :many as default key for pluralization to better conform w/ cldr pluralization rules
2008-08-23 19:43:57 +02:00
Peter Wagenet
a652c300ac
New inflectors will overwrite defaults [ #337 state:resolved]
...
Signed-off-by: Tarmo Tänav <tarmo@itech.ee >
2008-08-23 20:43:22 +03:00
Tarmo Tänav
74c3c701f7
Don't set "NULL" as a constraint on nullable columns [ #398 state:resolved]
...
This is already the default and adding it breaks SQL standards compatibility.
2008-08-23 19:51:09 +03:00
Tarmo Tänav
5232d81281
Pass class through to DeprecatedConstantProxy target
...
This is needed because include_all_modules_from checks
calls "class" on every constant and sometimes it can
hit deprecated constants which aren't even Modules,
but while checking for it deprecation warnings are shown.
2008-08-23 19:12:14 +03:00
Tarmo Tänav
cf28109158
Always require activesupport, even if its constant already exists
...
This is needed because the existance of the ActiveSupport
constant by itself does not guarantee that the whole library
has been loaded.
Also load the StringInquirer in the Rails#env method as
the it might be called inside the initializer block
before activesupport itself has been loaded.
2008-08-23 18:05:52 +03:00
Tarmo Tänav
b5c4c7daf8
Clear prefix_parameters cache when setting prefix
2008-08-23 17:43:52 +03:00
Josh Susser
e48e77e022
coerce blank strings to nil values for boolean and integer fields
...
[#860 state:resolved]
2008-08-22 16:26:40 -07:00
Tarmo Tänav
707ee0e269
Made migrations transactional for PostgreSQL [ #834 state:resolved]
...
Patch originally from http://dev.rubyonrails.org/ticket/5470
2008-08-22 14:46:25 -07:00
Jeremy Kemper
9dac5547ad
Merge branch 'master' into i18n
2008-08-22 13:01:53 -07:00
Jeremy Kemper
a6e05b18d6
Merge commit 'sven/i18n' into i18n
2008-08-22 12:44:14 -07:00
Joshua Peek
c0dd0cee46
Removed old deprecation test because the warning was removed in 1129a24
2008-08-22 13:43:34 -05:00
Ryan Bates
9a5ffaa01e
Ensure :partial => @collection and :collection => @collection behaves same. [ #884 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-22 18:15:53 +01:00
Chris Lloyd
4e4277b9e0
Fixed that rake doc:plugins to uses UTF-8. [ #573 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-22 13:36:47 +01:00
Amos King
381210daa0
camelize(:lower) should always downcase first character. [ #696 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-22 13:31:13 +01:00
Tom Ward
89d1c77dd0
Initializer to sort files before eager loading. [ #859 state:resolved]
...
Changed Rails::Initializer to sort files before eager loading them. This ensures that
any files in a parent directory will be loaded before files in a subdirectory of the
'same' name. i.e. zoo.rb will be loaded before zoo/reptile_house.rb
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-22 13:06:34 +01:00
Patrick Reagan
683ff235e6
Ensure t.timestamps respects options. [ #828 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-22 12:48:00 +01:00
Tarmo Tänav
52ac9d0444
Fixed ordering in test_find_in_association_with_custom_finder_sql_and_multiple_interpolations
2008-08-22 10:39:45 +03:00
Tarmo Tänav
d3b894563a
Properly quote CREATE DATABASE parameters in postgresql [ #771 state:resolved]
2008-08-22 10:37:09 +03:00
Jeremy Kemper
ab33b27947
Merge branch 'master' of git@github.com:rails/rails
2008-08-21 22:13:45 -07:00
Jeremy Kemper
6e3d2a7996
Revert "Performance: freeze cached rows instead of duping"
...
This reverts commit cd8e653d5b .
2008-08-21 21:40:49 -07:00
Jeremy Kemper
a5eb297424
Revert "coerce blank strings to nil values for boolean and integer fields"
...
This reverts commit aee14630d4 .
[#860 state:incomplete]
2008-08-21 21:34:37 -07:00
Joshua Peek
0096f55869
Removed template_public? because it will always be true since the default template is never a partial
2008-08-21 21:34:03 -05:00
Joshua Peek
ba516b40f5
Tidy up pick partial template logic
2008-08-21 21:25:33 -05:00
Adrian Mugnolo
893fb5bb63
Add ActiveResource::Base.find(:last). [ #754 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-22 03:06:57 +01:00
Ryan Bates
1129a24caf
Cleanup around partial rendering
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-21 21:03:33 -05:00
Jeremy Kemper
e6a66cbd05
update rack tests for default response content_type and charset
2008-08-21 18:16:16 -07:00
Jeremy Kemper
b99442933d
deprecate Base#assign_default_content_type_and_charset
2008-08-21 18:14:32 -07:00
Jeremy Kemper
f8f077945f
Move default content type and charset from Base to Response. Handle charset = nil.
2008-08-21 18:11:09 -07:00
Jeremy Kemper
aab2f0b353
Merge branch 'master' of git@github.com:rails/rails
2008-08-21 17:50:06 -07:00
Tarmo Tänav
98fb161dbb
Allow polymorphic_url helper to take url options. [ #880 state:resolved]
...
All *_polymorphic_url, *_polymorphic_path helpers can now accept
an options hash which will be passed on to the named route
making it possible to generate polymorphic routes with additional
url parameters.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 20:26:00 +01:00
Frederick Cheung
654c41255d
Mark Class as not being duplicable. [ #829 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 18:40:20 +01:00
S. Brent Faulkner
bbedb6a624
remember created records and select a random one instead of relying on sequential id values starting at 1
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-21 19:33:26 +02:00
Josh Susser
aee14630d4
coerce blank strings to nil values for boolean and integer fields
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-21 19:33:25 +02:00
Sven Fuchs
aad429a46e
Merge branch 'master' into i18n
2008-08-21 19:04:39 +02:00
Iain Hecker
cf6840773b
Custom error messages scope improved
2008-08-21 18:40:44 +02:00
Peter Wagenet
8622787f87
Don't interpret decimals as table names in ActiveRecord::Associations::ClassMethods#references_eager_loaded_tables? [ #532 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 17:21:17 +01:00
Tom Lea
3724dafe71
Fix incorrect signature for NamedScope#respond_to? [ #852 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 16:39:27 +01:00
Miles Georgi
0d74e72e6d
Fix postgres bug when change_column is called with invalid parameters. [ #861 state:resolved]
...
Signed-off-by: Tarmo Tänav <tarmo@itech.ee >
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 16:22:14 +01:00
Philip Hallstrom
49c0e1e594
Fix generated WHERE IN query for named scopes. [ #583 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 16:11:28 +01:00
Xavier Noria
a970f916fb
Fix has_many#count_records. [ #865 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 15:48:04 +01:00
Jakub Kuźma
ea40f71431
Fix that has_one natural assignment to already associated record. [ #854 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 15:21:21 +01:00
Darragh Curran
7e4ea5f4a2
Allow overriding id for feed and entry with atom_feed_builder. [ #485 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 13:37:26 +01:00
Ryan Bates
2415652660
Support find_all on named scopes. [ #730 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 12:37:19 +01:00
Joshua Peek
6be8251ec8
Simplified and renamed CallbackChain union method to replace_or_append!
2008-08-21 00:51:06 -05:00
Joshua Peek
f388725bd6
Partial revert of 2681685 premature TypeArray abstraction
2008-08-21 00:28:25 -05:00
Miles Georgi
09343166ac
PostgreSQL: fix transaction bug that can occur if you call change_column with invalid parameters
...
[#861 state:resolved]
2008-08-20 13:25:49 -07:00
Joshua Peek
47cd8b81cc
Switched integration test runner to use Rack processor instead of CGI
2008-08-20 13:37:18 -05:00
Joshua Peek
a74dbe6c52
Improve test coverage for integration tests cookie header
2008-08-20 13:22:36 -05:00
Sven Fuchs
c324ef2785
Merge branch 'iain' into i18n
2008-08-20 18:44:41 +02:00
Sven Fuchs
950b9792ba
fixing actionpack yml translations
2008-08-20 18:44:18 +02:00
Iain Hecker
7ee01c8c54
Changed locale file to yml for actionpack, but still broken
2008-08-20 18:04:36 +02:00
Iain Hecker
72366398b2
Removed en-US ruby locale in favor of yaml
2008-08-20 18:01:13 +02:00
Iain Hecker
c1e0d8aa48
Locale file changed to yaml
2008-08-20 18:01:12 +02:00
Iain Hecker
febe2ea977
Locale file changed to yaml
2008-08-20 18:01:12 +02:00
Iain Hecker
fc0358ae16
Added :value as interpolation variable available to error messages
2008-08-20 17:57:53 +02:00
Sven Fuchs
e43cdb93f0
fix activerecord i18n_test to work with backend classes
2008-08-20 17:57:46 +02:00
Iain Hecker
12d7872071
Introduced AR::Base.human_name to validations
2008-08-20 17:53:04 +02:00
Iain Hecker
81e14fada1
Added Base.human_name method
2008-08-20 17:53:04 +02:00
Sven Fuchs
a2d67403ac
remove warning in i18n gem
2008-08-20 17:52:54 +02:00
Sven Fuchs
a6a62004c9
add human_name and value to ar validation #generate_message
2008-08-20 17:51:42 +02:00
Iain Hecker
e2b191681e
Added :value as interpolation variable available to error messages
2008-08-20 17:41:43 +02:00
Iain Hecker
c531248938
Introduced AR::Base.human_name to validations
2008-08-20 17:39:43 +02:00
Iain Hecker
ae8a35d8f6
Added Base.human_name method
2008-08-20 17:39:43 +02:00
Joshua Peek
3a2ff17af6
Don't shadow query string method
2008-08-19 20:24:34 -05:00
Joshua Peek
6f530de944
Test coverage for integration testing with parameters
2008-08-19 20:15:51 -05:00
Joshua Peek
5de340e79f
Ensure objects cached with MemoryStore are immutable
2008-08-19 19:20:10 -05:00
Ryan Bates
a8ece12fe2
Return nil instead of a space when passing an empty collection or nil to 'render :partial' [ #791 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-19 19:09:04 -05:00
Joshua Peek
71c4ff07ab
Delegate xhr helper method to integration session
2008-08-19 18:53:46 -05:00
Joshua Peek
5df8ff1d6b
Touch file with git revision when freezing edge
2008-08-19 17:16:35 -05:00
Jamis Buck
6e4ea66dc0
Make AbstractRequest.if_modified_sense return nil if the header could not be parsed
2008-08-19 16:07:17 -06:00
Joshua Peek
bd7edcf286
Removed config.ru template from app generator
2008-08-19 16:46:15 -05:00
Joshua Peek
977317da55
hack around CGI session close
2008-08-19 16:29:02 -05:00
Sven Fuchs
c379582064
switch to class and instance instead of a module for the simple backend
2008-08-19 14:25:51 +02:00
Joshua Peek
e9ae2b2f4c
Added rack logger middleware that tails the environment log
2008-08-19 00:18:26 -05:00
Joshua Peek
96ab01e8f2
Maintain a seperate buffer for each thread
2008-08-18 23:36:13 -05:00
Joshua Peek
c1a8690d58
Consistently use the framework's configured logger and avoid reverting to RAILS_DEFAULT_LOGGER unless necessary.
2008-08-18 23:36:13 -05:00
Joshua Peek
a4da8175a2
Replace MemoryStore mutex with a monitor to avoid issues with nested calls
2008-08-18 20:17:08 -05:00
Jeremy Kemper
cd8e653d5b
Performance: freeze cached rows instead of duping
2008-08-18 17:34:38 -07:00
Jeremy Kemper
7fbe226de5
Ruby 1.9 and GC::Profiler updates
2008-08-18 16:41:08 -07:00
Ryan Bates
38c7d73e73
pass yielded arguments to block for ActionView::Base#render with :layout [ #847 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-17 19:29:24 -05:00
Joshua Peek
dbb0abfb7e
More integration test coverage
2008-08-17 19:18:18 -05:00
Joshua Peek
f245658495
Use Response status accessor instead of the Status header
2008-08-17 19:13:49 -05:00
Joshua Peek
b8e930aa01
Merge RackProcess#normalize_headers logic into AbstractResponse#prepare!
2008-08-17 19:09:38 -05:00
Joshua Peek
894f9ccc53
Use RackRequest as a mock instead of StubCGI into RequestTest
2008-08-17 19:04:01 -05:00
Tarmo Tänav
96607996ea
Test for eager loading of STI subclasses from htm associations
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-16 22:26:11 +01:00
Nathan Witmer
8cfdcdb35d
Updated has_and_belongs_to_many association to fix :finder_sql interpolation. [ #848 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-16 22:23:48 +01:00
Tarmo Tänav
2b69a636c4
Fixed STI type condition for eager loading of associations
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-16 20:41:19 +01:00
Ryan Bates
8f4d3957a6
Don't raise exception when comparing ActiveRecord::Reflection. [ #842 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-16 20:21:36 +01:00
Tarmo Tänav
b3c9d53b34
Use type_condition method for hmt STI condition
2008-08-15 15:57:33 -07:00
Tarmo Tänav
e3523f1d33
Fixed validates_uniqueness_of with decimal columns
...
Only use special case-sensitive comparison operators for text columns in
validates_uniqueness_of as mysql can fail at decimal comparisons with
the BINARY operator.
2008-08-15 15:44:11 -07:00
David Heinemeier Hansson
aad7cac6ad
Fixed problems with the logger used if the logging string included %'s [ #840 state:resolved] (Jamis Buck)
2008-08-15 09:27:07 -05:00
Jeremy Kemper
8aad8cb390
Set cache control to require revalidation if cache freshness response headers are set. Don't set Content-Length header if 304 status.
2008-08-14 21:45:14 -07:00
Jeremy Kemper
f1f4e84a7e
Fix asset file paths with dangling queries in mtime check
2008-08-14 12:28:02 -07:00
Iain Hecker
ffeab4e0c1
Cleaned up ActiveRecord i18n scoping
2008-08-14 10:48:33 +02:00
Joshua Peek
8cb14ee120
Ensure results returned by a memoized method are immutable
2008-08-13 21:30:46 -05:00
Joshua Peek
b8b30985d5
Marshal FileStore values
2008-08-13 20:57:26 -05:00
Jeremy Kemper
c7e09a8fb2
TestRequest#recycle! uses unmemoize_all to reset cached request method, accepts, etc.
2008-08-13 17:26:27 -07:00
Jeremy Kemper
3fc9a67c04
memoize_ and unmemoize_all
2008-08-13 17:26:27 -07:00
S. Brent Faulkner
3284fbb866
Use current umask when testing the expected file mode [ #823 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-13 19:19:00 -05:00
Joshua Peek
3b9324e62f
Fix rendering partials at the top level [ #795 state:resolved]
2008-08-13 19:15:35 -05:00
Joshua Peek
04248c6208
Ensure templates are rendered if all the parts are already processed
2008-08-13 19:04:56 -05:00
Josh Susser
2561be005b
Refactor Filter predicate methods to use inheritance. [ #815 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-13 21:48:37 +01:00
Eloy Duran
1ee9e3fa5c
Fix ActiveRecord::NamedScope::Scope#respond_to? [ #818 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-13 13:04:42 +01:00
Sven Fuchs
d0ee883e7c
fixing unit tests for active_record validations_i18n
2008-08-13 14:02:26 +02:00
Sven Fuchs
e3ecc3375f
provide more useful feedback on missing translations for validation error messages
2008-08-13 13:52:07 +02:00
Sven Fuchs
906e79396b
fix bug in I18n::Backend::Simple (A default array of non-existant keys returns the default array)
2008-08-13 13:43:02 +02:00
Jeffrey Hardy
282b420213
Account for the possibility of a nil options argument to CompressedMemCacheStore#read/#write
2008-08-13 04:19:31 -07:00
Sven Fuchs
78677cf6af
update activesupport/vendor i18n gem
2008-08-13 11:42:02 +02:00
Sven Fuchs
aae9f91659
fix validations_i18n tests for changed locale file format
2008-08-13 10:00:54 +02:00
Sven Fuchs
f26380b775
switch to using I18n.load_translations instead of requiring plain ruby files
2008-08-13 09:53:25 +02:00
Sven Fuchs
bfa143fd4d
fix require path in vendor.rb for fixed vendor/gem dir structure
2008-08-13 09:44:46 +02:00
Tarmo Tänav
a5aad2e81f
Fixed Time/Date object serialization
...
Time/Date objects used to be converted to_s instead of to_uaml
which made them unserializable.
2008-08-12 20:29:07 -07:00
Jeremy Kemper
1b127fcdea
Set asset-cached file ctime and mtime to the max mtime of the combined files. Allows for consistent ETag generation without having a shared filesystem.
2008-08-12 20:18:03 -07:00
Jeremy Kemper
45b79d933c
Merge branch 'conditional-get'
2008-08-12 17:03:17 -07:00
Jeremy Kemper
08b0cf07db
Update changelog for conditional GET utility methods
2008-08-12 17:03:06 -07:00
Tom Lea
992fda16ed
Serialized attributes will now always be saved even with partial_updates turned on.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#788 state:committed]
2008-08-12 18:15:50 +02:00
Trevor Turk
81c12d1f63
move logging of protected attribute removal into log_protected_attribute_removal method
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#804 status:committed]
2008-08-12 09:52:06 +02:00
Michalis Polakis
c7375d74d9
Alias subquery used in calculations, to provide better compatibility with databases such as MonetDB
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
Signed-off-by: Tom Ward <tom@popdog.net >
[#796 state:committed]
2008-08-11 16:48:45 +02:00
Sven Fuchs
572f73fae6
update i18n gem and clean up dir structure within i18n-0.0.1
2008-08-10 21:44:35 +02:00
Sven Fuchs
bdf783b5a8
update i18n usage for pluralization hashes (api change)
2008-08-10 21:29:02 +02:00
Matthew Rudy Jacobs
eb4668b26a
rake db:fixtures:load and db:fixtures:identify now accept a FIXTURES_PATH option eg. "rake db:fixtures:load FIXTURES_PATH=spec/fixtures"
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#792 state:committed]
2008-08-09 18:36:40 +02:00
Stefan Kaes
b2630502a0
Fixed autolink regexp compatibility for ruby 1.9 [ #783 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-09 10:48:56 -05:00
Cameron Yule
2faf35cea9
Added tests for partial collection counters [ #766 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-09 10:48:56 -05:00
miloops
ea0d036e31
mail_to should use decodeURIcomponent instead of unescape to be utf friendly.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-08 15:31:02 +02:00
Ernie Miller
7f6e7ba1f7
Fixed AssociationCollection#<< resulting in unexpected values in @target when :uniq => true
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-08 15:19:08 +02:00
Jeremy Kemper
ba2d61dd81
Update tests for request memoization
2008-08-08 02:31:12 -07:00
Jeremy Kemper
c24a7cdd23
Don't shadow host method
2008-08-08 02:29:37 -07:00
Daniel Rodríguez Troitiño
06e4eb49ea
Added file name information for errors and exceptions in script/runnner
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-08 10:48:52 +02:00
James Rosen
14cf9a8991
dryed up resources; fixed small formatting issue in resources rdoc
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-08 10:47:26 +02:00
Ryan Bates
1db7c9cf4a
fixing "test_any_should_not_load_results" so it doesn't depend on latest version of Mocha
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-08 10:33:29 +02:00
Jeremy Kemper
b7529ed1cc
Simplifying usage of ETags and Last-Modified and conditional GET requests
2008-08-07 23:43:12 -07:00
Jeremy Kemper
e43d1c226d
Inherit these from AbstractRequest instead
2008-08-07 23:34:36 -07:00
Jeremy Kemper
6c70c02c83
Freeze memoized results when instance is frozen instead of immediately so you can memoize mutable objects
2008-08-07 23:31:43 -07:00
Jeremy Kemper
a8057669ff
Fixed memoize with punctuation and freezing memoized methods with arguments
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-07 14:55:14 -05:00
Clemens Kofler
105093f907
Refactor DateHelper to use DateTimeSelector presenter pattern
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-07 13:13:47 -05:00
Joshua Peek
be0d235a3b
Optimize memoized method if there are no arguments
2008-08-06 20:21:15 -05:00
Joshua Peek
b2504f8ba0
Tidy up ActionMailer rendering logic to take advantage of view path cache instead of using file system lookups
2008-08-06 20:11:21 -05:00
Jeremy Kemper
ed8a882e47
JRuby: improve constantize performance. [ #410 state:resolved]
2008-08-06 17:31:57 -07:00
Joshua Peek
f5bcbde1e3
Make sure ActionView is loaded inorder to build view paths
2008-08-06 17:40:03 -05:00
Joshua Peek
c6b7d0f344
Ensure file atomic write uses the cache directory as its tmp folder
2008-08-06 17:25:32 -05:00
Jeremy Kemper
165120a606
Be more careful about deducing action_methods
2008-08-06 15:23:57 -07:00
Joshua Peek
fbc6129acd
Treat single C operations in MemoryStore as atomic
2008-08-06 17:03:42 -05:00
Joshua Peek
dfc83566b3
Make FileStore use atomic writes
2008-08-06 14:54:18 -05:00
Joshua Peek
e5b1ab7cc3
MemoryStore is the only "unsafe" store. Make it threadsafe by default.
2008-08-06 14:54:18 -05:00
Joshua Peek
73056500f8
Make File.atomic_write copy the original permissions or use the directories default.
2008-08-06 14:54:18 -05:00
Nik Wakelin
0809747845
Added MigrationProxy to defer loading of Migration classes until they are actually required by the migrator
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#747 state:resolved]
2008-08-06 12:46:52 +02:00
Jeremy Kemper
29a06f10e8
Strip newlines from cookie session data
2008-08-05 19:28:52 -07:00
Jeremy Kemper
69e9cbb99a
Ensure public superclass methods don't shadow public controller methods. Case in point, ruby-debug's Kernel#start shadowing a controller's start action.
2008-08-05 17:35:08 -07:00
Jeffrey Hardy
8d72b82b8d
Make assert_template failure message more friendly
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-05 16:29:56 -05:00
Clemens Kofler
dc66469e64
Fixed i18n bulk translate issues in NumberHelper
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-04 22:26:14 -05:00
Joshua Peek
177a35e711
Added config.threadsafe! to toggle allow concurrency settings and disable the dependency loader
2008-08-04 22:19:41 -05:00
Jeremy Kemper
ddd552504b
Expose Routing::Segment::SAFE_PCHAR list of path characters that don't need escaping
2008-08-04 18:37:53 -07:00
Ben Sandofsky
61842d97c5
Make requiring gems optional.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#743 state:resolved]
2008-08-04 14:53:21 +02:00
Tarmo Tänav
82343859d5
Added missing fixtures for tests which fail to run independently if run after schema reset
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-04 11:50:15 +02:00
Joshua Peek
cb21db1a33
Treat ActionMailer template_root as a view path set internally to avoid inheritance and dupping issues
2008-07-31 20:11:52 -05:00
Jeremy Kemper
909a7f430b
Ensure mailer view path is loaded when it's assigned. Path#[] raises if it isn't loaded.
2008-07-31 17:51:43 -07:00
Jeremy Kemper
ad4553587e
List available actions in UnknownAction exception message
2008-07-31 17:50:53 -07:00
Jeremy Kemper
46a458206f
Merge branch 'master' of git@github.com:rails/rails
2008-07-31 16:35:58 -07:00
Jeremy Kemper
a540725f0d
load_application_classes requires files relative to the load path and without .rb extension, including .rb files in subdirectories
2008-07-31 16:35:17 -07:00
Tarmo Tänav
0b9bfbdebf
Use "/usr/bin/env ruby" instead of "/usr/local/bin/ruby"
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-31 16:39:48 -05:00
Tarmo Tänav
656f0e7c6c
Fix file permissions
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-31 16:36:23 -05:00
Tarmo Tänav
f7eaab96d3
validates_uniqueness_of uses database case sensitivity support instead of using ruby
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-07-31 21:33:11 +02:00
miloops
f3da46effa
In javascript helpers option[:type] = :synchronous should work as described in docs.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-07-31 21:28:12 +02:00
Tarmo Tänav
cb68b21a52
Fixed negative default integer parsing for Postgresql 8.3.3
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-07-31 20:58:42 +02:00
Joshua Peek
030d5854ad
Turn cache_classes on by default [ #645 state:resolved]
2008-07-31 13:42:28 -05:00
Tarmo Tänav
68b207b087
Cast value to string in validates_uniqueness_of if the column is of text type
...
This fixes an error for postgresql where "text_column = 100" fails in version 8.3
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-07-31 20:28:39 +02:00
Tarmo Tänav
896a3b9ab8
Fixed test_joins_with_namespaced_model_should_use_correct_type for postgresql
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-07-31 19:02:32 +02:00
miloops
fb5cc19707
Fix HasManyThroughAssociationsTest tests. [ #733 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-31 17:01:22 +01:00
Pratik Naik
108db00aa9
Raise UnknownAttributeError when unknown attributes are supplied via mass assignment
2008-07-31 15:56:46 +01:00
Michael Koziarski
f64bd2ca85
Ensure dbconsole includes the -p parameter to mysql as intended
2008-07-31 09:46:40 +02:00
miloops
2617d0dc5c
Performance: grouping helpers should use yield instead of block as argument. [ #723 state:resolved]
2008-07-30 01:52:16 -07:00
José Valim
c4038764d2
Initializer requires ERB explicitly instead of assuming Action Pack loaded it. [ #722 state:resolved]
2008-07-30 01:49:49 -07:00
miloops
eaab895f83
Prototype helpers should generate Element.insert instead of Insertion.new, which has been deprecated in Prototype 1.6.
2008-07-30 01:42:32 -07:00
José Valim
c8e80f6389
Initializer skips prepare_dispatcher if Action Controller isn't in use. [ #721 state:resolved]
2008-07-30 01:41:51 -07:00
Joshua Peek
a065b764e5
Reapply 'cab168ac' because it was accidentally patched over in '10d9fe4b'
2008-07-29 22:04:07 -05:00
Clemens Kofler
fea7771d22
Updated NumberHelper: Full i18n support (except number_to_phone), consolidated API (almost all methods now support :precision, :delimiter and :separator). Added deprecation notices for old API. Added tests for new options [ #716 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-29 21:47:02 -05:00
Michael Koziarski
d9452d3ab3
Remove incomplete non-blocking logger functionality
2008-07-29 20:01:25 +02:00
Michael Koziarski
a24398b647
Guard the logger's internal buffer to prevent major breakage on genuinely threaded environments
2008-07-29 19:49:38 +02:00
Jan De Poorter
7aaf1689dd
Fix that label_tag doesn't take a symbol for a name. [ #719 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-29 12:39:21 +01:00
Jeremy Kemper
2cf161a384
Once is enough, mmk
2008-07-28 13:54:10 -07:00
Jeremy Kemper
ae6105ef01
Don't rememoize if already frozen
2008-07-28 13:54:10 -07:00
Jeremy Kemper
eb256718c3
Remove send! usage, relic of reverted 1.9 behavior
2008-07-28 13:54:10 -07:00
Jeremy Kemper
50bbc87f85
MacRuby: BasicObject unavailable
2008-07-28 13:54:10 -07:00
Joshua Peek
19db0b7324
Added back ActionController::Base.allow_concurrency flag and moved lock down to controller processing.
2008-07-28 14:31:40 -05:00
Joshua Peek
a5db148825
Prepare Route#generate and Route#recognize early. Also refactor segments a bit to try to make immutable.
2008-07-28 13:41:42 -05:00
Joshua Peek
e0513e33c4
Routing whitespace cleanup
2008-07-28 13:38:20 -05:00
Pratik Naik
6e75455125
Merge docrails changes
2008-07-28 12:33:24 +01:00
Clemens Kofler
10d9fe4bf3
Refactored TextHelper#truncate, highlight, excerpt, word_wrap and auto_link to accept options hash [ #705 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-27 16:49:19 -05:00
Clemens Kofler
f7abf0c9db
error_message_on takes an options hash instead of ordered parameters [ #704 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-27 16:34:20 -05:00
Joshua Peek
490178c930
Revert "Ensure adapater specific code is loaded on ActiveRecord::Base.establish_connection"
...
This reverts commit 8b858782fa .
2008-07-27 16:06:51 -05:00
George Ogata
e8fc894f66
Make observers define #after_find in the model only if needed.
...
[#676 state:resolved]
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-07-26 16:26:08 +02:00
Joshua Peek
f48b9ab5c2
ActionController::Base.relative_url_root falls back to ENV['RAILS_RELATIVE_URL_ROOT']
2008-07-24 14:06:22 -05:00
Sam Granieri
11fdcf88c2
Check for ActionMailer and ActionController before attempting to eager load their view paths
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-24 13:51:54 -05:00
Joshua Peek
a87462afcb
AbstractRequest.relative_url_root is no longer automatically configured by a HTTP header. It can now be set in your configuration environment with config.action_controller.relative_url_root
2008-07-24 13:41:51 -05:00
Joshua Peek
3fd9036fc5
Added config.dependency_loading to enable or disable the dependency loader after initialization
2008-07-24 11:58:26 -05:00
Joshua Peek
55adaa2efc
Fixed bc5896e, and added test case for the caching bug it originally introduced.
2008-07-23 13:47:30 -05:00
Joshua Peek
e0db925be0
Revert 'bc5896e'
2008-07-23 11:23:25 -05:00
Joshua Peek
97a954bf1d
Load view path cache after plugins and gems.
2008-07-23 10:41:28 -05:00
Joshua Peek
db1bac796e
Just file?
2008-07-23 10:24:47 -05:00
Jan De Poorter
93e10f9911
Ensure NamedScope#any? uses COUNT query wherever possible. [ #680 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-23 12:02:17 +01:00
Joshua Peek
2681685450
Extract ActiveSupport::TypedArray class to ensure an array is all of the same type [ #673 state:resolved]
2008-07-22 11:12:16 -05:00
Joshua Peek
bc5896e708
Memoize ActionView::Base pick_template and find_partial_path for rendering duration
2008-07-22 10:27:32 -05:00
Joshua Peek
8a87d8a6c2
Improved Memoizable test coverage and added support for multiple arguments
2008-07-22 10:26:44 -05:00
Joshua Peek
8b858782fa
Ensure adapater specific code is loaded on ActiveRecord::Base.establish_connection
2008-07-21 22:41:38 -05:00
Miles Georgi
92f944818e
Make script/plugin work with svn+ssh urls. [ #662 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-22 01:43:23 +01:00
Daniel Guettler
c67713a2fe
Use klass.sti_name to make sure associations take store_full_sti_class into account. [ #671 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-22 01:24:47 +01:00
Joshua Peek
89ec72c281
Added configurable eager load paths. Defaults to app/models, app/controllers, and app/helpers
2008-07-21 13:43:23 -05:00
Joshua Peek
3bd34b6ffe
Preload application classes. Uses same strategy as phusion passenger.
2008-07-21 13:43:23 -05:00
Clemens Kofler
0f43de644e
Refactored NumberHelper API to accept arguments as an options hash [ #666 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-21 13:05:27 -05:00
Clemens Kofler
ff9f6fcc75
Refactor DateHelper and improve test coverage [ #665 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-21 12:57:15 -05:00
Michael Koziarski
5bec5848b2
If it doesn't overflow, it won't have a .start method. So don't run the second assertion either
2008-07-20 21:25:31 +02:00
Michael Koziarski
006cbb8fde
Handle the case where 64bit time_t won't overflow.
2008-07-20 21:23:18 +02:00
Joshua Peek
da85251f85
Refactor ActiveSupport::Dependencies injector so it would be possible to disable it
2008-07-19 17:32:22 -05:00
Joshua Peek
598b4546fd
Fixed spelling mistake in deprecation warning [ #381 state:resolved]
2008-07-19 15:43:39 -05:00
Joshua Peek
55bfe6be52
Ensure ActionView::PathSet::Path is not initialized with a precompiled path
2008-07-19 15:27:55 -05:00
Kevin Glowacz
1b4b1aa725
Fixed index and auto index for nested fields_for [ #327 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-19 15:10:12 -05:00
David Heinemeier Hansson
706425e154
Update Prototype to 1.6.0.2 (Patrick Joyce) [ #599 status:committed]
2008-07-19 13:56:38 -05:00
Clemens Kofler
c98692abcf
Removed handling of string parameter in link_to to have all URL generation done by url_for
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-19 13:06:43 -05:00
Clemens Kofler
938caf4e6b
Removed unused option from FormHelper#fields_for [ #641 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-19 12:40:30 -05:00
Joshua Peek
e23156e87b
Only create a path for ActionMailer template root instead of a path set. Better fix than 7461227
2008-07-19 12:35:42 -05:00
Joshua Peek
7461227352
Ruby 1.9: Call join on template_root instead of to_s
2008-07-19 12:23:08 -05:00
Joshua Peek
e0d7bace4e
Prefer Mongrel over Thin [ #658 state:resolved]
2008-07-19 11:42:27 -05:00
Joshua Peek
576cae0043
Stub out timestamped_migrations in generator tests
2008-07-19 11:34:32 -05:00
Joshua Peek
3fdd1acab6
Dropped SQLite 2 from default test runner
2008-07-19 11:30:15 -05:00
Joshua Peek
b74b97fef5
Update uses_mocha in ActionMailer and ActiveResource
2008-07-19 11:14:12 -05:00
Joshua Peek
8c2e839e5a
Fix some warnings in i18n lib
2008-07-19 11:04:23 -05:00
Joshua Peek
d84d99a8f7
Undefine old run method
2008-07-19 10:52:30 -05:00
Tom Ward
f205939348
Ensure checked value is a string when validating case-sensitive uniqueness [ #361 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-19 16:14:39 +01:00
Joshua Peek
cab168ac9b
Ruby 1.9: Fixed regexp warning by replacing nested repeat operator + and ? with '*'
2008-07-19 00:46:02 -05:00
Joshua Peek
108ed4a566
Ruby 1.9: Strip encoding from ERB source since you can not change character encoding during a method
2008-07-19 00:24:02 -05:00
Joshua Peek
c609be4596
Ruby 1.9: Ensure Memoizable#freeze is only overriden once to avoid an endless loop
2008-07-18 23:30:36 -05:00
Tom Ward
d39485078e
Raise ArgumentError if an invalid method is specified as part of a route's conditions. Also raise an error if HEAD is specified as the method, as rails routes all HEAD requests through the equivalent GET, though doesn't return the response body [ #182 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-18 20:19:03 -05:00
Tom Ward
c3d1fda555
Set the response content type to that of found template if not explicitly set elsewhere [ #444 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-18 20:14:12 -05:00
Joshua Peek
d2ccb852d4
Removed lagacy TemplateHandler#render API. Left in a legacy TemplateHandler and Compilable stub so plugins will not have to change anything.
2008-07-18 16:00:20 -05:00
Joshua Peek
ef6f6625c9
Changed ActiveSupport::Memoizable API to extend since it mainly adds the memoize class method
2008-07-18 15:32:28 -05:00
Joshua Peek
e1f23da53c
Allow memoized methods to be reloaded and allow multiple symbols
2008-07-18 11:19:38 -05:00
Jeremy Kemper
7430c4168f
Decrease default benchmark runs from 10 to 4
2008-07-17 23:18:21 -07:00
Jeremy Kemper
57a2780f14
etag! and last_modified! conditional GET helpers
2008-07-17 23:18:10 -07:00
Joachim Garth
a1fcbd971d
Make sure association preloading works with full STI class name [ #465 state:Resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-18 03:44:44 +01:00
Jeremy Kemper
1e0f94a77c
Introduce simple internationalization support
2008-07-17 14:56:12 -07:00
Jeremy Kemper
8f9702db5c
Merge branch 'master' of git@github.com:rails/rails
2008-07-17 14:43:08 -07:00
Joshua Peek
7359597004
Wrap AssetTagHelper's computed public path cache in a threadsafe store
2008-07-17 16:03:48 -05:00
Joshua Peek
0eef4e554d
Allow ActiveSupport::Cache logger to be silenced
2008-07-17 16:00:59 -05:00
Joshua Peek
94cf6675d5
Cleanup ActiveSupport::Cache::ThreadSafety module and add test coverage
2008-07-17 15:29:30 -05:00
Jeremy Kemper
636e6b7138
Merge branch 'master' into i18n-merge
...
Conflicts:
actionpack/lib/action_view/helpers/form_options_helper.rb
activerecord/lib/active_record/validations.rb
2008-07-17 11:52:56 -07:00
Pratik Naik
99930d499e
Fix symbol cookie test
2008-07-17 18:19:09 +01:00
MatthewRudy
7e8aee7e6c
Add extra tests to ensure Hash#slice works with an array as a key. #613
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-17 15:34:51 +01:00
Pratik Naik
b3a2ee7b87
Revert "Hash#slice supports an array of keys [ #613 state:resolved]"
...
This reverts commit 396f9df891 .
2008-07-17 15:28:02 +01:00
Nik Wakelin
bbab639136
Set config.active_record.timestamped_migrations = false to have migrations with numeric prefix instead of UTC timestamp. [ #446 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-17 02:54:45 +01:00
Joshua Peek
d8a72b32c5
Revert "Run callbacks from object's metaclass"
2008-07-16 20:23:44 -05:00
Lawrence Pit
40dbebba28
Allow deep merging of hash values for nested with_options. [ #490 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-17 01:59:08 +01:00
Joshua Peek
cd63015570
All 2xx requests are considered successful [ #217 state:resolved]
2008-07-16 19:49:46 -05:00
Ripta Pasay
f7fdbae770
Use fully-qualified controller name when logging. [ #600 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-17 01:33:44 +01:00
Josh Owens
396f9df891
Hash#slice supports an array of keys [ #613 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-16 19:31:37 -05:00
Joshua Peek
7ae2105d57
MemCacheStore#decrement should use data instance variable not local variable [ #521 state:resolved]
2008-07-16 18:46:04 -05:00
David Heinemeier Hansson
73ade4fe10
Resolved conflict
2008-07-16 17:45:28 -05:00
David Heinemeier Hansson
8fe01de2e8
Fixed that AssetTagHelper#compute_public_path shouldn't cache the asset_host along with the source or per-request proc's won't run [DHH]
2008-07-16 17:39:14 -05:00
rick
0a6d75dedd
merge with local tweaks
2008-07-16 14:20:15 -07:00
Sven Fuchs
842917dea0
moving country helpers from form_options_helper to form_country_helper again
2008-07-16 11:30:57 -07:00
Sven Fuchs
428b77debd
fixing another timezone dependent test
2008-07-16 11:07:08 -07:00
Pratik Naik
90c930f45c
Allow Dispatcher exceptions to be handled in application.rb using rescue_from
2008-07-16 18:54:08 +01:00
Sven Fuchs
0ac342fbe5
make i18n date/time tests timezone independent
2008-07-16 10:51:48 -07:00
Stefan Kaes
c64d749abd
Fixed template recompile logic [ #630 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-16 08:26:23 -05:00
Pratik Naik
0432d15164
Merge with docrails.
2008-07-16 13:01:23 +01:00
Joshua Peek
f7d08acd5e
Add some useful comments to rackup config
2008-07-15 23:32:31 -05:00
Pratik Naik
8b933517ea
Add config.ru to rails app generator
2008-07-16 05:20:29 +01:00
Pratik Naik
2a7aca8ec3
Improve rack/cgi tests
2008-07-16 05:07:34 +01:00
Pratik Naik
1d002f6bcb
Make RackRequest#request_method respect _method
2008-07-16 05:02:29 +01:00
Joshua Peek
fea5b6fd41
ActionMailer and ActionView can share the same view path cache
2008-07-15 22:58:42 -05:00
Joshua Peek
83e29b9773
Removed config.action_view.cache_template_loading, use config.cache_classes instead
2008-07-15 22:58:42 -05:00
Pratik Naik
5cc3ea6969
RackResponse should not contain Status header
2008-07-16 04:17:28 +01:00
Pratik Naik
3343eb428c
Tests for rack response content type
2008-07-16 04:09:41 +01:00
Joshua Peek
be078ee162
Run callbacks from object's metaclass [ #575 state:resolved]
2008-07-15 22:01:02 -05:00
Joshua Peek
f4f6e57e8c
Added Object#metaclass
2008-07-15 22:01:02 -05:00
Sven Fuchs
2e74ddbd73
missed to remove a call to to_s while resolving conflicts in validations.rb
2008-07-16 04:35:00 +02:00
Pratik Naik
89eec91e67
Add tests for CgiRequest#content_type
2008-07-16 03:31:45 +01:00
Pratik Naik
0f8206104e
RackRequest#content_type should return Mime::Type
2008-07-16 03:18:35 +01:00
Sven Fuchs
fbe1823117
add i18n lib files
2008-07-16 04:16:08 +02:00
Sven Fuchs
731fca8cf6
remove i18n lib subproject
2008-07-16 04:15:31 +02:00
Joshua Peek
8b306bf24c
Improved test coverage for fragment cache helper
2008-07-15 20:54:17 -05:00
Jeremy Kemper
ecc0543525
JavaScriptGenerator should only sets output_buffer for the duration of the update block
2008-07-15 18:42:22 -07:00
Sven Fuchs
931f366ffc
merge forward to current rails/master
2008-07-16 03:41:11 +02:00
Sven Fuchs
8691e25540
reverting changes to form_options_helper for merge
2008-07-16 03:28:44 +02:00
Stefan Kaes
fbef982e4b
Observers not longer add an after_find method to the observed class.
...
[#625 state:resolved]
2008-07-15 16:48:16 -07:00
David Lowenfels
c7acfbb25d
requiring rubygems version 1.1.1
2008-07-15 16:28:41 -07:00
miloops
459e5817a5
update_counters should update nil values.
...
This allows counter columns with default null instead of requiring default 0.
[#493 state:resolved]
2008-07-15 16:21:11 -07:00
Jeremy Kemper
1edb5c85b5
Give more info on missing gems and abort instead of printing a warning. App can begin in incomplete state otherwise.
2008-07-15 15:50:37 -07:00
Pratik Naik
b337ab0221
Move performance test helper settings to railties
2008-07-15 21:07:25 +01:00
Joshua Peek
aca246ab25
Get buffer for fragment cache from template's @output_buffer
2008-07-15 14:43:52 -05:00
Jonathan Viney
4f72feb84c
Move the transaction counter to the connection object rather than maintaining it on the current Thread.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#533 state:resolved]
2008-07-15 21:25:12 +02:00
Michael Koziarski
24a8ae4e08
Try to get more useful errors out of the test_line_offset failures
2008-07-15 20:39:36 +02:00
Jeremy Kemper
3c282f3a0a
Ruby 1.9 compat: only eval with block.binding in 1.9, uses more memory than eval with block
2008-07-15 10:42:50 -07:00
Jeremy Kemper
4d76bad387
Ruby 1.9 compat: account for different String#hash
2008-07-15 10:40:33 -07:00
松田 明
bb33432b0f
Ruby 1.9 compat: call Proc#binding explicitly. [ #623 state:resolved]
2008-07-15 10:39:02 -07:00
Adrian Mugnolo
fc89a95193
Add in_groups to ActiveSupport::CoreExtensions::Array::Grouping. [ #579 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-15 15:04:26 +01:00
Tarmo Tänav
c1531ae00d
SQLite: rename_column raises if the column doesn't exist.
...
[#622 state:resolved]
2008-07-14 22:58:22 -07:00
Tarmo Tänav
8c91b767c0
Fixed postgresql limited eager loading for the case where scoped :order was present
2008-07-14 22:44:58 -07:00
gbuesing
3451045658
Fix TimeWithZone unmarshaling: coerce unmarshaled Time instances to utc, because Ruby's marshaling of Time instances doesn't respect the zone
2008-07-14 23:16:39 -05:00
Joshua Peek
7f0346237e
Append a "_" to memoized instance variables
2008-07-14 20:25:09 -05:00
Tarmo Tänav
911c2c3813
Some performance tweaks to ActiveSupport::Memoizable
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-14 20:23:23 -05:00
Joshua Peek
001c8beb4d
memorize typo
2008-07-14 20:02:59 -05:00
Joshua Peek
dd41f66af5
Include Memoizable in ActionView::Template
2008-07-14 19:51:43 -05:00
Joshua Peek
8a9934a9d9
Added Memoizable mixin for caching simple lazy loaded attributes
2008-07-14 19:50:32 -05:00
Tarmo Tänav
d27dd860c7
Use sub instead of gsub
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-14 18:02:59 -05:00
Joshua Peek
9dc258d614
Eager load Partial variable_name and counter_name. Tidy up render_partial_collection.
2008-07-14 17:40:58 -05:00
Tiago Macedo
76df9fa068
Fix integer quoting issues in association preload. [ #602 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 23:34:19 +01:00
Gabe da Silveira
cd9b24286a
Add assert_sql helper method to check for specific SQL output in Active Record test suite. [ #325 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 23:22:39 +01:00
Jeremy Kemper
2d6562d51b
Move dead recompile_template? also
2008-07-14 13:51:59 -07:00
Jeremy Kemper
3fbefecc9c
Remove dead code from merge
2008-07-14 13:47:51 -07:00
Tarmo Tänav
07578ac855
Fixed mysql change_column_default to not make the column always nullable.
...
Also added change_column_null to both mysql and sqlite to keep the api features closer to postgresql.
[#617 state:resolved]
2008-07-14 12:42:01 -07:00
Tarmo Tänav
8f72bc92e2
Fixed test_rename_nonexistent_column for PostgreSQL
...
Also fixed ability to run migration_test.rb alone
[#616 state:resolved]
2008-07-14 12:22:27 -07:00
Jeremy Kemper
c760dbfd31
PostgreSQL: don't dump :limit => 4 for integers
2008-07-14 11:59:46 -07:00
Jeremy Kemper
4e323f6ef0
Fix bad merge
2008-07-14 11:50:07 -07:00
Jeremy Kemper
cdf0f1aa2e
Faster and clearer value_to_boolean
2008-07-14 11:41:56 -07:00
Jeremy Kemper
269c6c6bcf
Cache Module#parent_name
2008-07-14 10:46:16 -07:00
Jeremy Kemper
ae9356ae9e
Cache template loading for performance tests
2008-07-14 10:46:16 -07:00
Jeremy Kemper
425de8db6a
Use instance_method(...) to check whether the method exists
2008-07-14 10:46:15 -07:00
Jeremy Kemper
2167f95d85
Restore the more readable before_ and after_filters methods since they aren't called frequently
2008-07-14 10:11:53 -07:00
David Heinemeier Hansson
3037022789
Fixed that create database statements would always include "DEFAULT NULL" (Nick Sieger) [ #334 status:committed]
2008-07-14 10:12:54 -05:00
Sebastian A. Espindola
0176e6adb3
Added db:charset support to PostgreSQL. [ #556 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 04:11:52 +01:00
Tim Pope
5c08607082
Make script/plugin install <plugin> -r <revision> option work with git based plugins. [ #257 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 03:47:22 +01:00
David Dollar
e0750d6a5c
Add :accessible option to Associations for allowing mass assignments using hash. [ #474 state:resolved]
...
Allows nested Hashes (i.e. from nested forms) to hydrate the appropriate
ActiveRecord models.
class Post < ActiveRecord::Base
belongs_to :author, :accessible => true
has_many :comments, :accessible => true
end
post = Post.create({
:title => 'Accessible Attributes',
:author => { :name => 'David Dollar' },
:comments => [
{ :body => 'First Post!' },
{ :body => 'Nested Hashes are great!' }
]
})
post.comments << { :body => 'Another Comment' }
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 02:53:21 +01:00
Jason Dew
c6f397c5ce
Add block syntax to HasManyAssociation#build. [ #502 state:resolve]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 02:24:12 +01:00
Rhett Sutphin
d72c66532f
Make fixture accessors work when fixture name is not same as the table name. [ #124 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 02:01:52 +01:00
Jacek Becela
697ee1a50d
Enable loading fixtures from arbitrary locations. [ #586 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 01:32:01 +01:00
Pratik Naik
9783e66cad
Slightly faster DateTime#to_json. [ #598 state:resolved] [Alex Zepeda]
2008-07-14 01:02:07 +01:00
rsl
95812d5eaf
Ensure :index works with fields_for select methods. [ #518 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 00:55:57 +01:00
Tapajós
0d241f4434
Use full path in database tasks so commands will work outside of Rails root [ #612 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-13 14:19:03 -05:00
Joshua Peek
68fe898189
Check first render format and extension. Fixes failing ActionMailer test.
2008-07-13 14:05:21 -05:00
Joshua Peek
26bc867151
Small tweak to e0fef66
2008-07-13 14:00:40 -05:00
Joshua Peek
e0fef66149
Made ActionView::Base#first_render a little more private. And added _last_render to track the most recent render. Will fix #609 as a side effect. [ #609 state:resolved]
2008-07-13 13:26:48 -05:00
Joshua Peek
99cc85bc09
Set config.action_view.warn_cache_misses = true to receive a warning if you perform an action that results in an expensive disk operation that could be cached
2008-07-12 15:31:50 -05:00
Joshua Peek
73b34e9f75
Refactor template preloading. New abstractions include Renderable mixins and a refactored Template class.
2008-07-12 14:33:46 -05:00
Joshua Peek
30204c4e66
Set global ActionController::Base.view_paths for test cases
2008-07-12 14:11:51 -05:00
Joshua Peek
65fb2e76f2
Removed a few implementation specific view path tests
2008-07-12 12:17:10 -05:00
Joshua Peek
b603de0882
Improve test coverage and create fixtures for RenderPartialWithRecordIdentificationTests
2008-07-12 12:17:10 -05:00
Daniel Guettler
f90eb81c65
Ensure script/generate finds generators from symlinked plugins. [ #449 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-12 17:51:48 +01:00
Michael Koziarski
e53f5fe696
Restore support for partial matches in assert_redirected_to
...
If both the actual redirection and the asserted redirection are hashes, succeed if the asserted redirection is a strict subset of the actual redirection.
2008-07-12 11:42:41 +02:00
Johan Sørensen
50b5c6845e
Ensure mail_to label is obfuscated for javascript encoding. [ #294 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-12 01:04:18 +01:00
Micah Wedemeyer
5e2e1ed9ff
Ensure MysqlAdapter allows SSL connection when only sslca is supplied. [ #253 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-11 23:52:41 +01:00
Joshua Peek
6ebdd0e32b
Changed ActionView::TemplateHandler#render API method signature to render(template, local_assigns = {})
2008-07-11 15:40:41 -05:00
Michael Koziarski
292501c7e0
Use require_dependency 'application' not require in the console bootstraps to avoid requiring application.rb twice
2008-07-11 22:27:36 +02:00
Michael Koziarski
6b9f8adb3e
Whitespace
2008-07-11 19:23:21 +02:00
Joshua Peek
c00baf496e
Added tests to show that 2d372d7 breaks old generator behavior ( #545 state:resolved)
2008-07-11 12:09:25 -05:00
Joshua Peek
f522a89d64
Revert "Fixed generator collisions for nested controller modules."
...
This reverts commit 2d372d7049 .
2008-07-11 12:05:02 -05:00
Joshua Peek
04a87af5b7
Ensure use_accept_header is enabled for test_action_cache_conditional_options
2008-07-11 11:51:35 -05:00
Joshua Peek
d106f2d08a
Ensure use_accept_header is enabled for test_action_cache_conditional_options
2008-07-11 11:49:22 -05:00
Joshua Peek
15b2175426
Fixed teardown method typo (plus whitespace)
2008-07-11 11:44:24 -05:00
Joshua Peek
68289693f7
Check for response in builder template since ActionMailer does not have one
2008-07-11 11:14:59 -05:00
Joshua Peek
7d5c447d9c
Stubba is included in Mocha already
2008-07-11 11:12:53 -05:00
Clemens Kofler
feb08984ea
Added notes to Routing documentation and routes.rb regarding defaults routes opening the whole application for GET requests
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-07-10 09:29:27 +02:00
Jeremy Kemper
d37e641336
Move accept header parsing shortcut to Mime::Type.parse
2008-07-09 11:30:18 -07:00
Jeremy Kemper
0ce7fe5308
Don't repeatedly convert only/except options
2008-07-09 10:42:30 -07:00
Cheah Chu Yeow
ce4a1bb853
Remove some Symbol#to_proc usage in runtime code. [ #484 state:resolved]
2008-07-09 10:42:30 -07:00
Jeremy Kemper
11252e35b1
Boolean type casting creates fewer objects
2008-07-09 10:42:30 -07:00
Jeremy Kemper
f82bd31cb0
Request#accepts special-cases a single mime type
2008-07-09 10:42:30 -07:00
Jeremy Kemper
a6d0ae28e3
Fix teardown method name typo
2008-07-09 10:42:30 -07:00
Jeremy Kemper
ee6bbcb6ae
Put a newline rather than a semicolon at the end of RJS source to avoid parse errors with embedded heredocs
2008-07-09 10:42:29 -07:00
Jeremy Kemper
7dc10478e5
Use ActionController::Base.logger to report template compilation errors since there is no AV::Base.logger
2008-07-09 10:42:29 -07:00
Jeremy Kemper
4354aa36fb
Rendering default template for missing actions works with non-word characters in action name
2008-07-09 10:42:29 -07:00
Jeremy Kemper
350faf14e8
Pass caller to concat deprecation warning
2008-07-09 10:42:29 -07:00
Michael Koziarski
4ce9931f4f
Reenable the use of the Accept header to give people a chance to update their applications and provide feedback.
2008-07-09 18:36:15 +02:00
David Heinemeier Hansson
6b61e95dc8
Changed PrototypeHelper#submit_to_remote to PrototypeHelper#button_to_remote to stay consistent with link_to_remote (submit_to_remote still works as an alias) (clemens) [ #8994 status:closed]
2008-07-09 09:13:24 -05:00
Daniel Guettler
84af99e78d
Ensure NamedScope#build/create/create!/new works as expected when named scope has hash conditions. [Daniel Guettler, Pratik Naik] [ #419 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-09 14:09:17 +01:00
Chris Cherry
124d1016fa
Allow Infinity (1.0/0.0) to pass validates_numericality_of. [ #354 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-09 13:15:07 +01:00
Cheah Chu Yeow
96708af6a5
Ensure url_for(nil) falls back to url_for({}). [ #472 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-09 13:02:14 +01:00
Hongli Lai (Phusion
2b4eb586ef
Plugin locator: sort directory listing because we can't assume that the OS will do it for us. This fixes some unit test failures.
2008-07-09 13:34:36 +02:00
Luca Guidi
dc77359c16
Removed unnecessary or condition in #error_messages_for
2008-07-08 17:41:18 +02:00
Damian Janowski
91320f2a80
Add :recursive option to javascript_include_tag and stylesheet_link_tag to be used along with :all. [ #480 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-08 13:50:59 +01:00
Luca Guidi
cf5d6ab9a8
Added localize helper method
2008-07-08 12:37:49 +02:00
Luca Guidi
2949918b4c
Make sure object name is translated in #error_messages_for
2008-07-08 11:53:19 +02:00
rick
a14cedc779
Merge branch 'master' of git@github.com:rails/rails
2008-07-07 22:24:18 -07:00
Luca Guidi
826c3db421
Updated ActiveRecord::Errors#default_error_messages deprecation warning according to i18n changes
2008-07-07 22:46:16 +02:00
Michael Koziarski
2f4aaed7b3
Disable the Accept header by default
...
The accept header is poorly implemented by browsers and causes strange errors when used on public sites where crawlers make requests too. You should use formatted urls (e.g. /people/1.xml) to support API clients. Alternatively to re-enable it you need to set:
config.action_controller.use_accept_header = true
A special case remains for ajax requests which will have a javascript format for the base resource (/people/1) if the X-Requested-With header is present. This lets ajax pages still use format.js despite there being no params[:format]
2008-07-07 07:31:49 +02:00
rick
e939f60b6c
Merge branch 'assert_redirected_to_fix'
2008-07-06 13:58:07 -07:00
rick
74596233f1
fix ordering of assert_equal in assert_redirected_to. boy, that sure would be easier with rspec or bacon :)
2008-07-06 13:53:15 -07:00
Sven Fuchs
84816ae981
align with changes in i18n
2008-07-06 21:20:02 +02:00
Brad Greenlee
afa0c7f728
Add support for :primary_key option to has_one as well as has_many so that a key other than the default primary key can be used for the association
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-07-06 20:25:10 +02:00
Andre Arko
3351d29970
Add has_many :primary_key option to allow setting the primary key on a has many association
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-07-06 20:25:10 +02:00
Sven Fuchs
c9ed2c9bd2
add a translation helper
2008-07-06 19:00:55 +02:00
Joshua Peek
1d8623b42f
Added local assign keys to compiled method name so two threads evaluating the same template with different locals don't step on top of each other
2008-07-06 01:13:15 -05:00
Joshua Peek
7b9e8ae273
Synchronize template compiling
2008-07-06 00:00:45 -05:00
Joshua Peek
9828aecd2a
Lookup compiled methods in CompiledTemplates instance methods set instead of using a "methods_names" hash
2008-07-05 23:54:11 -05:00
Joshua Peek
ce5d958f8f
Do not stat template files in production mode before rendering. You will no longer be able to modify templates in production mode without restarting the server
2008-07-05 18:35:52 -05:00
Joshua Peek
f22ae15a8e
Use the inline template's hash as a method key instead of relying on a counter
2008-07-05 17:49:49 -05:00
Joshua Peek
5a3bc6f12f
Removed unused template_args variable
2008-07-05 17:40:39 -05:00
Joshua Peek
27f382641c
Deprecated TemplateHandler line offset
2008-07-05 17:31:57 -05:00
Joshua Peek
cd6fe83152
Ensure all complied method names are cleaned up in the error backtrace
2008-07-05 16:34:51 -05:00
Joshua Peek
39ba2da82b
Moved complied method name logic into Renderable
2008-07-05 16:27:43 -05:00
Joshua Peek
1dcc59121b
Renamed Renderer to Renderable
2008-07-05 12:05:50 -05:00
Sven Fuchs
a865d19516
reverting changes to ActionMailer
2008-07-04 22:45:53 +02:00
Sven Fuchs
34bd1e95c7
Reverting changes to ActionMailer
...
Revert "Experimental I18n charset support for ActionMailer"
This reverts commit 6982acb079 .
Conflicts:
actionmailer/lib/action_mailer/base.rb
2008-07-04 22:34:32 +02:00
Sven Fuchs
8305d6759a
Reverting changes to ActionMailer
...
Revert "Make sure ActionMailer use default charset if no defined by current locale"
This reverts commit d41e4c1c3d .
2008-07-04 22:26:53 +02:00
Sven Fuchs
35bad50816
Merge branch 'i18n' of git@github.com:svenfuchs/rails into i18n
2008-07-04 22:23:43 +02:00
Sven Fuchs
e1a7f83fca
use :default for human_attribute_name
2008-07-04 22:22:20 +02:00
Jeremy Kemper
271f5b655f
Fix rdoc for Filters::ClassMethods
2008-07-04 12:51:16 -07:00
Pratik Naik
cb645c8877
Use ActiveSupport::TimeZone in time:zones rake tasks
2008-07-04 20:07:00 +01:00
Michael Koziarski
c3aaba0180
Simplify the implementation of assert_redirected_to to normalise the urls before comparing. Also allows for a simpler implementation of redirect_to without most of the recursion.
...
Also allows for assert_redirected_to @some_record
2008-07-04 10:41:40 +03:00
Michael Koziarski
db58391079
Remove old broken follow_redirect from functional tests. Still works in integration tests.
...
The follow_redirect in functional tests only worked if you used redirect_to :id=>foo, :action=>bar, rather than named routes.
2008-07-04 10:41:40 +03:00
Michael Koziarski
51e13d51ad
Move test related core_ext stuff out of regular core ext to prevent nasty surprises when you require active_support then use Test::Unit directly.
2008-07-04 10:41:39 +03:00
Joshua Peek
01637796d7
Revert "Moved TemplateHandlers to Base"
...
This reverts commit 42d215a925 .
Conflicts:
actionpack/lib/action_view/inline_template.rb
actionpack/lib/action_view/template.rb
2008-07-03 21:09:37 -05:00
josevalim
bad1eac91d
Allow caches_action to accept cache store options. [ #416 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-04 02:00:51 +01:00
David Lowenfels
87fbcaa622
Add :tokenizer option to validates_length_of. [ #507 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-04 01:31:39 +01:00
miloops
570f5aad66
Allow date helpers to ignore date hidden field tags. [ #503 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-04 01:06:22 +01:00
Joshua Peek
1a478923dc
Reduce the number of callsites for new TemplateFiles
2008-07-03 14:01:45 -05:00
Joshua Peek
8a442e0d57
Extracted Template rendering logic into Renderer module
2008-07-03 13:06:00 -05:00
Joshua Peek
7d5c8505f5
Use render on InlineTemplate
2008-07-03 12:50:43 -05:00
Joshua Peek
b6f89a8bf5
Don't rely on view instance logger
2008-07-03 12:49:54 -05:00
Joshua Peek
42d215a925
Moved TemplateHandlers to Base
2008-07-03 12:48:00 -05:00
Michael Koziarski
75e04b5295
Tighten the rescue clause when dealing with invalid instance variable names in form_helper.
2008-07-03 19:43:20 +03:00
Michael Koziarski
d79cde37ea
Move the file exists checks outside write_asset_file_contents.
...
This lets us avoid the relatively costly trip through compute_*_paths if the file already exists.
2008-07-03 19:43:14 +03:00
Michael Koziarski
12cf8f348b
Move template_format logic out to the request so it's alongside the 'regular' request format.
...
Use xhr? instead of the expensive trip through Request#accepts.
2008-07-03 19:43:06 +03:00
Michael Koziarski
dc2d754d60
Support for custom annotations with rake notes:custom and DRY up the task definition.
...
e.g. rake notes:custom ANNOTATION=WTF
2008-07-03 19:42:58 +03:00
Michael Koziarski
7098143f07
Remove unused local_binding option to InstanceTag's Constructor
2008-07-03 19:26:56 +03:00
Michael Koziarski
5dd10d60bb
Remove nested ternary operators from select_year in favour of conditionals.
2008-07-03 19:26:56 +03:00
Michael Koziarski
df36a6f759
Remove unneeded ObjectWrapper class.
...
Was previously needed to work around the semantics of a deprecated (now removed) API to render :partial
2008-07-03 19:26:56 +03:00
Michael Koziarski
efd18066a2
Tighten the rescue clause here to prevent hiding strange mock related errors behind the line offset test
2008-07-03 19:21:04 +03:00
Michael Koziarski
e358b1fce8
Remove old method of including javascripts define_javascript_functions.
...
javascript_include_tag and friends do a much better job.
2008-07-03 19:21:04 +03:00
Michael Koziarski
5501166dec
Remove strange alias for JavaScriptHelper
2008-07-03 19:20:47 +03:00
Tarmo Tänav
a37d065f85
Use :namespace instead of :path_prefix for finding controller. [ #544 state:resolved]
...
:namespace is supposed to be the module where controller exists.
:path_prefix can contain anything, including variables, which
makes it unsuitable for determining the module for a controller.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-03 16:11:50 +01:00
Luca Guidi
d41e4c1c3d
Make sure ActionMailer use default charset if no defined by current locale
2008-07-03 11:50:18 +02:00
Lucas Carlson
d20e8dd220
Changing order of equality because comparing certain objects with false raises an error.
...
>> require 'md5'
=> true
>> MD5.new("Asds") == false
TypeError: can't convert false into String
from (irb):2:in `=='
from (irb):2
>> false == MD5.new("Asds")
=> false
2008-07-02 21:24:48 -07:00
Joshua Peek
3b3790a435
Deprecate :use_full_path render option. The supplying the option no longer has an effect.
2008-07-02 21:38:58 -05:00
Joshua Peek
6c0edef26e
Added Rails.initialized? flag
2008-07-02 21:29:57 -05:00
Mike Subelsky
8f640c381d
Added application/jsonrequest as a synonym for application/json
...
[#536 state:resolved]
2008-07-02 11:39:42 -07:00
rick
a4138d4632
use mocha for TimeZone mocking in Form Options helper tests
2008-07-02 11:09:10 -07:00
Sven Fuchs
8f74ba96c4
remove core extensions in favor of I18n#translate and I18n#localize
2008-07-02 19:21:07 +02:00
Ricardo Santos
820992c98f
Ensure script/plugin unsource 'Usage' text is correct. [ #526 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-02 17:47:19 +01:00
Pratik Naik
267d3964eb
Make sure render :collection doesnt set nil local when :as is absent
2008-07-02 17:19:41 +01:00
Luca Guidi
7403c825a0
Fixed Date and Time localization for ActiveSupport
2008-07-02 17:51:34 +02:00
Pratik Naik
2b43620e3c
Add :as option to render a collection of partials with a custom local variable name. [ #509 state:resolved] [Simon Jefford, Pratik Naik]
2008-07-02 16:40:42 +01:00
Pratik Naik
4f75840d72
Add Inflection rules for String#humanize. [ #535 state:resolved] [dcmanges]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-02 13:25:36 +01:00
Tim Pope
3a95ee73cf
Make rake test:uncommitted work with Git.
...
Note : rake test:uncommitted is considering only unstaged files.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-02 05:21:59 +01:00
Tim Haines
f5052dd8a3
Make sure render :template works with :locals. [ #524 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-02 04:30:34 +01:00
Joshua Peek
aff2d33172
Improved test coverage and added RackRequest support for CGI environment variables.
2008-07-01 21:53:55 -05:00
Carl Porth
a81f16af31
Ensure Rails::Generator quotes file names while generating diff. [ #264 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-02 03:28:02 +01:00
Pratik Naik
474d425382
Ensure AssociationCollection#size considers all unsaved record. [ #305 state:resolved] [sds]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-02 03:17:33 +01:00
Scott Stewart
7378e23734
Ensure proper output when submit_tag is used with :disabled_with. [ #388 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-02 01:39:30 +01:00
Luca Guidi
6982acb079
Experimental I18n charset support for ActionMailer
2008-07-01 16:52:48 +02:00
gbuesing
6f1d827096
TimeWithZone#advance: treat :weeks option as variable-length
2008-06-29 15:28:34 -05:00
gbuesing
676d6a6514
TimeWithZone: when crossing DST boundary, treat Durations of days, months or years as variable-length, and all other values as absolute length. A time + 24.hours will advance exactly 24 hours, but a time + 1.day will advance 23-25 hours, depending on the day. Ensure consistent behavior across all advancing methods.
2008-06-29 15:21:40 -05:00
rick
01db5ded54
Merge branch 'state_machine'
...
Some big changes:
* Added some redundant requires so active_support/inflecto can be loaded
without the rest of ActiveSupport.
* Disabled callbacks and validations until they are added and tested.
* Converted specs back to tests, using ActiveSupport::TestCase and the new
#test helper.
* As an experiment, I imported Scott Barron's awesome AASM gem into
ActiveModel. I added multiple state machine support and vastly improved
the API (no more aasm_* prefixes). All the old tests pass. If this bothers
people, I have no problems removing this and contributing the changes back to
AASM. I just feel like AMo is a better spot for all these 'modelish' features.
2008-06-29 12:13:58 -07:00
gbuesing
4cf93935b2
Fix indentation and update changelogs for previous commit
2008-06-29 13:46:07 -05:00
Ernie Miller
d0092dc44d
Added support for regexp matching of priority zones in time_zone_select [ #195 state:resolved]
2008-06-29 13:37:07 -05:00
Pratik Naik
029a745584
Ensure FormBuilder date helpers respects html_options. [ #506 state:resolved] [Pascal Ehlert]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-29 00:36:31 +01:00
rick
c9e366e997
all aasm tests without activerecord moved over and passing
2008-06-28 11:33:50 -07:00
rick
a9d9ca16c7
converted tests for more complex state transitions
2008-06-28 11:01:40 -07:00
rick
74cb056986
add basic events and transitions. still more tests to convert
2008-06-28 09:19:44 -07:00
rick
b9528ad3c5
initial statemachine machine and state classes
2008-06-28 00:55:02 -07:00
rick
b7c6ceff9a
tweak activemodel load order a bit
2008-06-27 23:29:47 -07:00
rick
aec3c7aa72
add special requires for ActiveSupport::Inflector so you can load it individually
2008-06-27 23:29:25 -07:00
rick
7fc628e3fc
convert specs to tests
2008-06-27 23:29:03 -07:00
Tim Chater
1415df8f49
Dirty: recognize when an integer changes from zero to blank. [ #433 state:resolved]
2008-06-27 21:31:06 -07:00
Pratik Naik
9a25315076
Add extra hash conditions tests for named_scope
2008-06-28 01:57:32 +01:00
Pratik Naik
cd994eff9a
Allow conditions on multiple tables to be specified using hash.
...
Examples:
User.all :joins => :items, :conditions => { :age => 10, :items => { :color => 'black' } }
Item.first :conditions => { :items => { :color => 'red' } }
Note : Hash key in :conditions is referring to the actual table name or the alias defined in query.
2008-06-28 01:27:51 +01:00
Jeremy Kemper
582bff71c4
Fix typo in apparently-dead will_unload? method.
2008-06-27 17:21:57 -07:00
Pratik Naik
76e00fc784
Ensure observer test inherits from ActiveSupport::TestCase
2008-06-27 18:18:39 +01:00
Pat George
4ddca325ee
Warn and uses singularized ModelName if a plural ModelName is given to script/generate. Override with --force-plural. [ #333 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-27 16:35:26 +01:00
Luca Guidi
66c2508ebb
Make sure mocha is available
2008-06-27 15:00:55 +02:00
Cheah Chu Yeow
3c1e8ab0fe
Allow single quote (the ' character) in the middle of URL when auto_link-ing. [ #471 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-27 13:46:17 +01:00
Jeremy Kemper
4498aad4ac
MySQL: treat integer with :limit => 11 as a display width, not byte size, for backward-compatibility.
2008-06-27 01:07:22 -07:00
Jan De Poorter
b2b761166d
Make sure associated has_many/habtm objects get saved even when :validate => false is used. [ #486 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-27 03:02:13 +01:00
Pratik Naik
5ca7d01eca
Cache sanitized conditions in reflection object for associations
2008-06-27 02:47:38 +01:00
Andre Arko
0b12da44aa
Extract owner_quoted_id so it can be overridden. [ #292 state:committed]
2008-06-25 19:04:09 -07:00
Bob Klosinski
a93ea88c06
Added Thin support to script/server. [ #488 state:resolved]
2008-06-25 18:56:52 -07:00
Jeremy Kemper
24c7f41b4f
Freeze ModelName cache_key also
2008-06-25 18:55:55 -07:00
Jeremy Kemper
c397260577
Performance: minor Column#text? and #number? speedups
2008-06-25 18:55:55 -07:00
Joshua Peek
339491a6b3
Set precompiled fixture load path constant to speed up tests
2008-06-25 15:24:12 -05:00
Joshua Peek
a9259ccfe0
Hide InlineTemplate class from ActionController and use ActionView's render API
2008-06-25 06:04:06 -05:00
Joshua Peek
ad772402c4
Made ActionView::Base#render_file private
2008-06-25 05:57:24 -05:00
Joshua Peek
6f5327013d
Consolidate CustomHandlerTest, TemplateFileTest, and TemplateObjectTest and test them at a higher level of abstraction in ViewRenderTest.
2008-06-25 05:49:38 -05:00
Jimmy Baker
670e22e372
Patched HTML::Document#initialize call to Node.parse so that it includes the strict argument. [ #330 ]
2008-06-24 23:11:35 -07:00
Jeremy Kemper
071fe79279
Include cache key in ModelName
2008-06-24 22:07:09 -07:00
Jeremy Kemper
6874caa407
Performance: minor Array#to_param and #to_query speedups
2008-06-24 21:49:49 -07:00
Jeremy Kemper
69e72af622
Improve readability
2008-06-24 11:53:49 -07:00
Jeremy Kemper
f6520b7dc7
Test for tinyint
2008-06-23 23:42:06 -07:00
Jeremy Kemper
b409474325
link_to_function and button_to_function shouldn't modify their options hashes
2008-06-23 23:41:21 -07:00
Jeremy Kemper
290e1e2fc5
Treat any limit > 4 as bigint
2008-06-23 18:16:03 -07:00
Cheah Chu Yeow
f1cfd12487
Allow script/about to run in production mode instead of failing with a cryptic const_missing error.
...
[#370 state:resolved]
2008-06-23 10:27:33 -07:00
Sven Fuchs
8461526f34
silence deprecation warning during validations test
2008-06-23 14:55:07 +02:00
Sven Fuchs
77177441d1
including rcov shell scripts for reference
2008-06-23 14:49:47 +02:00
Sven Fuchs
ac66865ea3
update tests according to removal of self.locale from helpers
2008-06-23 14:49:02 +02:00
Sven Fuchs
c178a87b43
remove call to self.locale from helpers
2008-06-23 14:37:50 +02:00
Sven Fuchs
2ee9f2a030
remove generic translate helpers
2008-06-23 14:34:01 +02:00
Sven Fuchs
0dddba41fc
rather cosmetic improvements of test coverage
2008-06-23 14:33:29 +02:00
Jeremy Kemper
d7462ea365
Revert "Check for mocha gem without requiring the lib. [ #403 state:resolved]"
...
This reverts commit 4d5ac3f3d2 .
2008-06-23 00:31:49 -07:00
Jeremy Kemper
4d5ac3f3d2
Check for mocha gem without requiring the lib. [ #403 state:resolved]
2008-06-22 20:52:29 -07:00
Tarmo Tänav
baddea95e1
Always treat integer :limit as byte length. [ #420 state:resolved]
2008-06-22 20:42:31 -07:00
Daniel Morrison
3610997ba3
Partial updates don't update lock_version if nothing changed. [ #426 state:resolved]
2008-06-22 20:33:43 -07:00
Mark Catley
0fd3e4cd2b
Fix column collision with named_scope and :joins. [ #46 state:resolved]
2008-06-22 19:21:15 -07:00
Tammer Saleh
bb6e8eea5a
Fixed polymorphic_url to be able to handle singleton resources.
...
Example usage:
polymorphic_url([:admin, @user, :blog, @post]) # => admin_user_blog_post_url(@user, @post)
[#461 state:resolved]
2008-06-22 18:58:47 -07:00
Jeremy Kemper
a210f50361
Oops, already had a postgresql_version method!
2008-06-22 18:50:19 -07:00
ian
3532eaf92a
Only use DROP ... IF EXISTS for PostgreSQL 8.2 or later. [ #400 state:resolved]
2008-06-22 18:31:47 -07:00
Michael Raidel
f94600bdaf
ActiveRecord::Migrator#run records version-state after migrating. [ #369 state:resolved]
2008-06-22 18:16:17 -07:00
Tarmo Tänav
1afae84ab2
Fixed that scopes defined with a string name could not be composed
2008-06-22 17:26:00 -07:00
Jeremy Kemper
43cbcb10ae
nix extra newline
2008-06-22 16:22:23 -07:00
Jeremy Kemper
a73ac98123
Changelog for 509374e
2008-06-22 16:21:08 -07:00
Tarmo Tänav
509374ebe2
Named bind variables can now be used with postgresql-style typecasts
...
For example :conditions => ['stringcol::integer = :var', { :var => 10 }]
will no longer raise an exception about ':integer' having a missing value.
2008-06-22 16:16:06 -07:00
Diego Algorta
2e1b56c937
MySQL: rename_column preserves default values. [ #466 state:resolved]
2008-06-22 15:21:11 -07:00
Jeremy Kemper
a02d672cd7
Horo rdoc template
2008-06-22 10:38:25 -07:00
Sven Fuchs
3533dc6812
check self.locale instead of request.locale in helpers
2008-06-22 13:49:38 +02:00
Sven Fuchs
67fce4671e
crap, an array never has a request, stupid.
2008-06-22 13:49:08 +02:00
Sven Fuchs
20d6630c1b
Replaced country_options_for_select with old,
...
untranslated version and moved country-related helpers to a new
FormCountryHelper helper module so that they can easily be moved to a plugin.
Updated tests accordingly.
2008-06-22 11:41:51 +02:00
Sven Fuchs
d897acfbb1
remove DeprecatedConstantToMethodProxy again
2008-06-22 11:39:10 +02:00
Jeremy Kemper
f4ccc17953
Performance: javascript helper tweaks to speed up escaping and reduce object allocations when building options strings
2008-06-21 14:54:10 -07:00
Sven Fuchs
55e2e2e8b4
experimental DeprecatedConstantToMethodProxy
2008-06-21 18:12:59 +02:00
Sven Fuchs
8bfdabbd8b
incorporate #translate usage with several default keys
...
(use first default key that resolves to a translation). this might, depending
on the backend implementation save some expensive lookups (like db lookups)
2008-06-21 17:50:37 +02:00
Jeremy Kemper
9a0e443719
Everything responds to #to_param
2008-06-21 04:19:30 -07:00
Sven Fuchs
428aa24d24
Renamed lang/ to locale/ because that's what we seem to
...
standarize on. Also, in future this place can be used for data/code that's
not literally translations but conceptually belongs to the locale (like
custom pluralization algorithms etc.).
2008-06-21 11:35:02 +02:00
Sven Fuchs
c1e2506494
Changed process of storing translations from the
...
client libraries to the backend: clients now can pass a block to
backend#populate which can contain code to load and register translations.
This makes sense for backends that persist their translations (e.g. to db)
so the repeated loading and passing of translations throughout the server
startup would be wasted resources.
2008-06-21 11:27:19 +02:00
Jeremy Kemper
8d24a029df
Don't assume RubyProf constants are defined
2008-06-20 10:42:36 -07:00
David Heinemeier Hansson
161ab28b7c
Added block-handling to Enumerable#many? (Damian Janowski) [ #452 state:resolved]
2008-06-20 11:31:06 -05:00
Jeremy Kemper
00ba4c0cf3
true#to_param => true, so be sure to #to_s expanded cache keys
2008-06-20 00:46:00 -07:00
Jeremy Kemper
879245de1c
Tired of seeing <foo>/run
2008-06-20 00:36:59 -07:00
Jeremy Kemper
83c3e9903d
Don't profile GC runs/time by default
2008-06-20 00:35:11 -07:00
Jeremy Kemper
f47c81ff37
Fall back to #to_s for cache key expansion
2008-06-20 00:25:41 -07:00
Sven Fuchs
585c8c17c3
rename Backend::Simple#add_translations to set_translations
...
because it overwrites existing translations
2008-06-20 09:13:20 +02:00
Jeremy Kemper
72f93b581f
Check whether blocks are called from erb using a special __in_erb_template variable visible in block binding.
2008-06-19 22:21:56 -07:00
Jeremy Kemper
c440c9b199
Move erb_trim_mode setting to the ERB template handler. Keep a Base.erb_trim_mode= delegator around.
2008-06-19 17:18:07 -07:00
Pratik Naik
2e232af91f
Add performance test generator
2008-06-19 20:13:45 +01:00
Sven Fuchs
b09c6e7444
add a generic tranlate view helper
2008-06-19 19:08:14 +02:00
rick
10c581a6de
fix merge
2008-06-19 09:59:36 -07:00
Sven Fuchs
2fe4d350e9
make ActiveRecord::Errors.default_error_messages look up translated error messages
2008-06-19 18:31:11 +02:00
Sven Fuchs
fdb5f810dc
I18n has not been released as a gem, yet
2008-06-19 16:55:47 +02:00
Sven Fuchs
4a8486a1b1
add lang file for active_support
2008-06-19 16:43:30 +02:00
Sven Fuchs
45d41f0dad
integrating I18n into Rails
2008-06-19 16:25:27 +02:00
Jeremy Kemper
81025b5808
fix toplevel pdoc task
2008-06-18 23:17:02 -07:00
Jeremy Kemper
88796ad75a
Add toplevel doc to .gitignore
2008-06-18 23:16:01 -07:00
Jeremy Kemper
7e9a7c0f35
Require ssh publisher in toplevel Rakefile
2008-06-18 20:51:26 -07:00
Jeremy Kemper
4c720b7fbf
Add toplevel rdoc and pdoc tasks
2008-06-18 20:51:16 -07:00
Jeremy Kemper
15c3fc8da3
Add dummy pdoc task to railties
2008-06-18 20:34:24 -07:00
Jeremy Kemper
e96d557be0
Use rdoc exclude
2008-06-18 20:17:22 -07:00
Jeremy Kemper
803f41e97a
Add lib/rails/*.rb to rdoc
2008-06-18 20:17:16 -07:00
Jeremy Kemper
6e70573123
Use native include/exclude instead of doing it by hand
2008-06-18 20:17:10 -07:00
Jeremy Kemper
c52d9530c3
Exclude lib/activeresource.rb from rdoc
2008-06-18 20:17:05 -07:00
Jeremy Kemper
a61a2af6ed
Exclude lib/actionpack.rb from rdoc
2008-06-18 20:16:58 -07:00
Jeremy Kemper
8692e1722e
Generate rdoc for all .rb files except those in vendor
2008-06-18 20:05:38 -07:00
Jeremy Kemper
1e2544d536
Generate rdoc for all .rb files except those in vendor
2008-06-18 20:03:18 -07:00
Jeremy Kemper
9b3394f789
Add pdoc task to toplevel Rakefile
2008-06-18 19:58:33 -07:00
Jeremy Kemper
231c2c5709
Update Rakefiles to connect to wrath as current user. Use ssh config to set a different user.
2008-06-18 19:58:26 -07:00
Jeremy Kemper
1e0d2e36cc
Performance: add GC metrics for # of runs and total runtime
2008-06-18 19:19:22 -07:00
Jeremy Kemper
2541f7ac47
Oops, include metric name in csv filename
2008-06-18 18:36:04 -07:00
Jeremy Kemper
616bc42fd7
Performance: tweak unsupported metric error message
2008-06-18 18:34:25 -07:00
Jeremy Kemper
90a9a7013c
Write benchmark output to separate files per test+metric. Support Lloyd Hilaiel's GC.heap_info patch for current heap size.
2008-06-18 16:02:27 -07:00
Joshua Peek
40557e17dd
Improved test coverage for integration test's api
2008-06-17 21:25:51 -05:00
Joshua Peek
bec4b69a3b
Replaced TemplateFinder abstraction with ViewLoadPaths
2008-06-17 21:21:07 -05:00
Jeremy Kemper
6ffe32160e
Rely on quieter db:test:load task
2008-06-17 16:01:48 -07:00
Jeremy Kemper
e328bdaab6
Make Base.merge_conditions public
2008-06-17 16:01:48 -07:00
Jeremy Kemper
d7b3c3395f
Performance: PartialTemplate#initialize
2008-06-17 16:01:48 -07:00
David Heinemeier Hansson
8190bce8bc
Added block-call style to link_to [Sam Stephenson/DHH]
2008-06-17 17:37:29 -05:00
David Heinemeier Hansson
22af62cf48
Added Array#second through Array#tenth as aliases for Array#[1] through Array#[9] [DHH]
2008-06-17 17:37:29 -05:00
Luke Redpath
7650ff892c
Fix url_for with no arguments when default_url_options is not explicitly defined. [ #339 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-17 20:53:41 +01:00
George Ogata
bc4a2f156b
Fix observers that use after_find. [ #375 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-17 19:45:18 +01:00
Amos King
1b4b8fbbd9
verify :redirect_to => :back should redirect to the referrer. [ #280 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-17 18:08:56 +01:00
Andrew Kaspick
322f3eacf9
Correct code example in dom_id docs. [ #437 state:resolved]
2008-06-17 00:32:37 -07:00
Jeremy Kemper
8e74a434b8
Don't dump schema for every test run, just when migrations are run
2008-06-16 03:47:15 -07:00
Jeremy Kemper
899d63b997
process time for benchmarks (quicker), wall time for profiling (lower overhead)
2008-06-16 03:45:20 -07:00
Jeremy Kemper
e433bb16a6
Merge branch 'master' of git@github.com:rails/rails
2008-06-16 03:05:24 -07:00
Jeremy Kemper
fa2a255352
missed . joining rails version and git revision
2008-06-16 00:16:43 -07:00
Jeremy Kemper
ed67d90a98
Metrics::Memory measures in fractional KB also
2008-06-16 00:10:30 -07:00
Jeremy Kemper
49d19515b7
Extract environment. Hardcode some git info so I can start working with it now.
2008-06-16 00:08:39 -07:00
Jeremy Kemper
e8f78998b2
Force runs to be an integer. Start and stop RubyProf in same scope. Expect memory measurements in fractional KB now instead of bytes. Convert object allocation measurements to integer. Wrap up measure_mode in Metric instance method.
2008-06-15 21:47:28 -07:00
Jeremy Kemper
f93a6d99e6
Delegate run_test to @harness
2008-06-15 16:26:51 -07:00
Jeremy Kemper
09c70a0c03
Use test/performance/test_helper to do test setup then boost log level and turn on caching
2008-06-15 16:21:32 -07:00
Jeremy Kemper
59b2daba4f
Metrics::[] escues NameError only. Fix MODE typo.
2008-06-15 14:48:15 -07:00
Jeremy Kemper
f7866cdac1
Extract Metric and Performer. Simplify and refactor.
2008-06-15 14:41:18 -07:00
Pratik Naik
f31651bd6a
Reload cached templates when a new handler is registered
2008-06-15 17:20:31 +01:00
Joshua Peek
b415538b5d
Updated bundled TZInfo gem to version 0.3.9 for Ruby 1.9 compat
2008-06-14 15:18:55 -05:00
Jeremy Kemper
01a4af4a74
Pass printer class to output_filename
2008-06-14 03:29:30 -07:00
Jeremy Kemper
e3623bd9ed
Last commit message was meant for changelog.
2008-06-14 02:24:47 -07:00
Jeremy Kemper
eab71208db
Performance: integration test benchmarking and profiling. [Jeremy Kemper]
2008-06-14 02:04:38 -07:00
David Heinemeier Hansson
ba0f38f89e
Change Enumberal#several? to Enumberal#many?
2008-06-13 17:34:17 -05:00
Pratik Naik
eea4fe4c90
Make rescue template xhtml compatible [Sam Ruby] [ #415 status:resolved]
2008-06-13 23:23:44 +01:00
Jeremy Kemper
d62382afa3
Ruby 1.9 compat: instance_methods are symbols instead of strings. Use the quicker instance_method(sym) rescue false check.
2008-06-12 18:22:30 -07:00
Jeremy Kemper
579086047e
Remove superfluous test_process require
2008-06-12 18:19:40 -07:00
David Heinemeier Hansson
e536d4d888
Changed all generated tests to use the test/do declaration style [DHH]
2008-06-12 20:10:50 -05:00
David Heinemeier Hansson
f74ba37f4e
Added test/do declaration style testing to ActiveSupport::TestCase [DHH via Jay Fields]
2008-06-12 20:10:38 -05:00
David Heinemeier Hansson
048ac3604c
Revert "Ensure MemCacheStore is required when using CompressedMemCacheStore since they are lazy load now."
...
This reverts commit dd4181f47d .
2008-06-12 19:52:44 -05:00
David Heinemeier Hansson
6573f6a4bc
Revert "Lazy load cache and session stores"
...
This reverts commit 19895f087c .
2008-06-12 19:52:33 -05:00
David Heinemeier Hansson
a3caf28da3
Added Object#present? which is equivalent to !Object#blank? [DHH]
2008-06-12 18:30:56 -05:00
David Heinemeier Hansson
ea3a7e1bb1
Merge branch 'master' of git@github.com:rails/rails
2008-06-12 17:48:30 -05:00
David Heinemeier Hansson
556204abaf
Added Enumberable#several? to encapsulate collection.size > 1 [DHH]
2008-06-12 17:46:15 -05:00
Joshua Peek
dd4181f47d
Ensure MemCacheStore is required when using CompressedMemCacheStore since they are lazy load now.
2008-06-12 14:20:30 -05:00
Joshua Peek
d4c58c7928
Opps, I forgot to add template_handlers.rb to my index.
2008-06-11 22:22:05 -05:00
Joshua Peek
5ed162d7c1
Moved template handler registration into a mix-in module.
2008-06-11 22:05:36 -05:00
Jeremy Kemper
2275b8daab
Fix quoting in test_counting_with_single_conditions
2008-06-11 19:21:47 -07:00
Ben Munat
ddab9d7fdf
Add :from option to calculations. [ #397 state:resolved]
2008-06-11 18:07:57 -07:00
Antonio Cangiano
e170d34a63
Fixed non-standard SQL generated by preloading has_and_belongs_to_many association
2008-06-11 17:25:39 -07:00
Jeremy Kemper
e6c1f46eb0
Silence scope resolution warnings
2008-06-11 13:17:23 -07:00
Pratik Naik
65bc8f33de
Silence TimeZone warning
2008-06-11 17:11:34 +01:00
Jeremy Kemper
23df8befcd
supports_insert_with_returning? caches false result also
2008-06-11 09:06:36 -07:00
Jan De Poorter
d0b3685a0e
Added some has_many tests
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-11 13:18:54 +01:00
Jan De Poorter
ca9641f8a7
Fix FormOptionsHelper tests.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-11 13:17:40 +01:00
Jonathan del Strother
3e07f320c1
Improve ActionCaching's format-handling
...
Make ActionCaching more aware of different mimetype formats.
It will now use request.format to look up the cache type, in addition to the path extension.
When expiring caches, the request format no longer affects which cache is expired.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-11 13:15:01 +01:00
Pratik Naik
6fd73442d8
Update docs to reflect 71bf75
2008-06-11 12:57:19 +01:00
Pratik Naik
71bf756ea2
Disable validations for associated belongs_to record by default
2008-06-11 12:39:56 +01:00
Jan De Poorter
7f140bbdda
Add :validate option to associations. [ #301 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-11 12:21:57 +01:00
Pratik Naik
f728e57d22
Make sure cache_template_loading works and don't use to_prepare callback
2008-06-11 09:36:41 +01:00
Ruy Asan
3f594299c8
TimeZone -> ActiveSupport::TimeZone. [ #387 state:resolved]
2008-06-11 00:49:13 -07:00
Grant Hollingworth
634e462a0b
Performance: speed up Hash#except. [ #382 state:resolved]
2008-06-11 00:47:02 -07:00
Joshua Peek
e8a0ba4c93
Ensure view path cache is rebuilt in production mode which was broke by df44df9.
2008-06-10 20:39:02 -05:00
Jeremy Kemper
6b280e5b54
Merge branch 'pg'
2008-06-10 18:33:15 -07:00
Jeremy Kemper
03bf727219
PostgreSQL: use 'INSERT ... RETURNING id' for 8.2 and later.
2008-06-10 18:31:37 -07:00
Pratik Naik
0ad0bdc01c
Delegate ActionView::Base#controller_name to controller
2008-06-10 23:55:04 +01:00
Jeremy Kemper
b440aeb54a
PostgreSQL: insert looks up pk and sequence name if not given. [ #384 state:resolved]
2008-06-10 15:50:01 -07:00
Jeremy Kemper
fb14c88e39
Inflector -> ActiveSupport::Inflector
2008-06-10 14:02:38 -07:00
Jeremy Kemper
34c51c9e8f
Rubinious: setup/teardown override for miniunit
2008-06-10 14:01:16 -07:00
Jeremy Kemper
f5cbad21ac
Rubinious: work around h[k] ||= v returning []= result instead of v
2008-06-10 14:01:16 -07:00
Pratik Naik
19895f087c
Lazy load cache and session stores
2008-06-10 10:29:25 +01:00
Luis Hurtado
225065709c
Fixes parsing deep nested resources from XML. [ #380 state:resolved]
2008-06-09 23:06:07 -07:00
Jeremy Kemper
16a9787bf0
Add empty setup and teardown methods to rule out default setup behavior in base class
2008-06-09 23:04:51 -07:00
rick
f545e19692
add deprecation for the #concat helper's 2nd argument, which is no longer needed
2008-06-09 14:18:21 -07:00
rick
64637da284
add deprecation for the #concat helper's 2nd argument, which is no longer needed
2008-06-09 12:06:23 -04:00
Brandon Keepers
e94e53f9cd
fix eager loading with dynamic finders
2008-06-09 12:05:20 -04:00
Joshua Peek
2336430471
Removed TemplateFinder.update_extension_cache_for since view path cache will be updated on boot.
2008-06-09 10:21:30 -05:00
Joshua Peek
55791c6c00
Removed used check_view_paths after 057768c
2008-06-09 10:05:02 -05:00
Jeremy Kemper
9051da90e4
Enable autoreconnect if available. Freeze constants.
2008-06-08 22:38:30 -07:00
Jeremy Kemper
d20035910c
Give a more informative error message instead of just raising a load error when mysql gem isn't installed
2008-06-08 22:34:09 -07:00
Jeremy Kemper
def594b92d
Don't append limit to primary key column definition. Freeze some constants.
2008-06-08 22:08:59 -07:00
Jeremy Kemper
057768cd2c
Process view paths passed to AV::Base#initialize instead of raising.
2008-06-08 21:21:54 -07:00
Jeremy Kemper
c88f2b5e23
with_output_buffer returns the temporary buffer instead of the result of the block
2008-06-08 20:35:30 -07:00
Joshua Peek
df44df945d
Ensure ActionView::TemplateFinder view cache is rebuilt on initialize.
2008-06-08 22:31:54 -05:00
Joshua Peek
0c9281e821
Drop ActionController::Base.allow_concurrency flag
2008-06-08 22:11:50 -05:00
Jeremy Kemper
ff5f155f8d
Use output_buffer reader and writer methods exclusively instead of hitting the instance variable so others can override the methods.
2008-06-08 20:05:39 -07:00
rick
8bf74c30fe
change some more TimeZone references to ActiveSupport::TimeZone
2008-06-08 22:26:30 -04:00
Jeremy Kemper
d9fb021845
Remove dead, unused vendor/db2.rb
2008-06-08 16:02:49 -07:00
Jeremy Kemper
68af8c54af
Remove vendor/mysql.rb. Deprecated in 2.1 stable, gone in 2.2.
2008-06-08 16:02:25 -07:00
Tiago Macedo
a2f6ded732
Fix conditions and order on join tables with limited eager loading. [ #372 state:resolved]
2008-06-08 13:01:55 -07:00
rick
51e4106dcc
Add the gem load paths before the framework is loaded, so certain gems like RedCloth and BlueCloth can be frozen. [ #320 state:resolved]
2008-06-08 14:30:14 -04:00
rick
faad1e32a8
Fix discrepancies with loading rails/init.rb from gems. [ #324 state:resolved]
2008-06-08 14:04:04 -04:00
rick
138adbf156
Merge branch 'master' of git@github.com:rails/rails
2008-06-08 13:06:43 -04:00
Jacek Becela
86a042ddd9
Make plugins initialize also from rails/init.rb to ensure consistency with gems used as plugins
...
[#272 state:resolved]
2008-06-08 13:05:45 -04:00
Jeremy Kemper
b336ce9e06
Revert "Missed add: deprecated erb_variable test"
...
This reverts commit 56f5c5582c .
2008-06-08 13:04:00 -04:00
Jeremy Kemper
f42dab8221
Revert "Missed add: deprecated erb_variable test"
...
This reverts commit 56f5c5582c .
2008-06-08 01:36:33 -07:00
Jeremy Kemper
56f5c5582c
Missed add: deprecated erb_variable test
2008-06-08 01:32:57 -07:00
Jeremy Kemper
6c970d79a0
Performance: faster Object.subclasses_of
2008-06-08 00:35:36 -07:00
Joshua Peek
06b6f435cb
Wrap Initializer after_initialize inside mocha block.
2008-06-07 23:46:06 -05:00
Joshua Peek
d5539958a8
Wrap CGIResponse, LegacyRouteSet, Route, RouteSet and RouteLoading tests inside mocha block.
2008-06-07 23:42:05 -05:00
Joshua Peek
ceb5b6dbb1
Wrap date part value method tests inside a uses mocha block.
2008-06-07 23:25:34 -05:00
Jeremy Kemper
67e4f16fc5
No need to build a Set since we're iterating instead of checking for inclusion now
2008-06-07 18:06:45 -07:00
Jeremy Kemper
63679733d8
Changelog: More efficient concat and capture helpers. Remove ActionView::Base.erb_variable.
2008-06-07 17:48:44 -07:00
Jeremy Kemper
fce22c186d
Merge branch 'master' into erbout
2008-06-07 17:44:16 -07:00
Jeremy Kemper
d0956335a6
PostgreSQL: update create_database_with_encoding test also
2008-06-07 13:43:52 -07:00
Jeremy Kemper
21bb0f40b0
PostgreSQL: quote bare table names
2008-06-07 13:39:03 -07:00
Jeremy Kemper
fb9bf119fe
Merge branch 'master' into erbout
2008-06-06 22:27:03 -07:00
Jeremy Kemper
5b53a06959
Ensure we have an array to collect
2008-06-06 22:02:48 -07:00
Jeremy Kemper
5eb893f72d
Don't use deprecated String#each
2008-06-06 22:02:23 -07:00
Jeremy Kemper
011825e15a
Merge branch 'master' into erbout
2008-06-06 21:35:08 -07:00
Jeremy Kemper
84fb971c2f
Remove 1.9's String#chars also
2008-06-06 21:34:36 -07:00
Jeremy Kemper
deee9d22fe
Merge branch 'master' into erbout
2008-06-06 20:43:28 -07:00
Jeremy Kemper
1d1ea92f40
GemDependency#specification should be public
2008-06-06 20:41:22 -07:00
Jeremy Kemper
fe9d2ad6e8
Remove some internal dead code that supported content_for
2008-06-06 18:01:14 -07:00
Jeremy Kemper
26ec1be24a
concat should ignore nil
2008-06-06 18:00:01 -07:00
Jeremy Kemper
e732a405ab
javascript_tag should only concat when block_given?
2008-06-06 17:59:41 -07:00
Pratik Naik
89ea7bee36
Simplify ActiveRecord::Base#update_attribute
2008-06-07 01:25:27 +01:00
Jeremy Kemper
e79d47847a
Qualify Inflector in rdoc examples also. [ #356 state:resolved]
2008-06-06 13:03:59 -07:00
Jeremy Kemper
fec0f0678b
Merge branch 'master' into erbout
2008-06-06 04:13:23 -07:00
Jeremy Kemper
e2c49e6a59
Drop a string conversion from the often-called tag_options helper
2008-06-06 04:13:09 -07:00
Jeremy Kemper
fd40fbc198
Generate less garbage when expanding range bind variables in conditions
2008-06-06 03:54:16 -07:00
Jeremy Kemper
49c4c7b997
Merge branch 'master' into erbout
2008-06-06 03:41:47 -07:00
Jeremy Kemper
566d717d78
Move Class::ModelName to Active Support module core_ext
2008-06-06 03:38:05 -07:00
Jeremy Kemper
c1a98209da
Cache RecordIdentifier methods in Class#model_name wrapper
2008-06-06 03:03:30 -07:00
Jeremy Kemper
0ccd0b569a
Fix doc typo. Move extend self so it's more immediately obvious. Require inflections from load path.
2008-06-06 03:02:22 -07:00
Jeremy Kemper
9c9da5d927
Merge branch 'master' into erbout
2008-06-05 17:34:14 -07:00
Pratik Naik
1dbfe9766e
Ensure render :file works inside templates
2008-06-05 23:33:10 +01:00
Frederick Cheung
2e0765a003
Make partial counter start from 0.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-05 22:11:40 +01:00
Jeremy Kemper
e7f1556d0e
Merge branch 'master' into erbout
2008-06-05 13:25:33 -07:00
Pratik Naik
df8154c845
Fix that Rails::InfoController tests
2008-06-05 20:41:22 +01:00
Ryan Kinderman
ed0cb91a83
Ensure plugins' rake tasks are loaded before application's rake tasks. [ #259 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-05 12:44:38 +01:00
Joshua Peek
c4d570c2eb
Use CGI::Cookie::parse for request cookies until we officially deprecated CGI.
2008-06-04 22:32:09 -05:00
Joshua Peek
5fe2878973
Renamed StringQuestioneer to StringInquirer.
2008-06-04 15:06:32 -05:00
Joshua Peek
6e85f14817
Namespaced StringQuestioneer under ActiveSupport.
2008-06-04 15:02:51 -05:00
Joshua Peek
1e4fae42d4
Fixed deprecated call to Dependencies in plugin loader test.
2008-06-04 15:00:50 -05:00
Jeremy Kemper
e660055472
Give a nice message if there are duplicate migrations instead of raising a strange insert error
2008-06-04 12:07:03 -07:00
Sean Huber
30a0ebb3eb
Add RJS#page.reload. [ #277 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-04 13:32:53 +01:00
Jeremy Kemper
53bcbfbdc1
Merge branch 'master' into erbout
2008-06-03 22:38:27 -07:00
David Heinemeier Hansson
82e96eb294
Dependencies move to ActiveSupport::Dependencies missed a few spots
2008-06-03 19:19:08 -05:00
David Heinemeier Hansson
885453537e
Merge branch 'master' of git@github.com:rails/rails
2008-06-03 18:12:56 -05:00
David Heinemeier Hansson
edfa195e2a
Fixed Request#remote_ip to only raise hell if the HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR doesnt match (not just if theyre both present) [Mark Imbriaco, Bradford Folkens]
2008-06-03 18:11:47 -05:00
Gabe da Silveira
025515b234
Fix assert_redirected_to for nested controllers and named routes
...
[#308 state:resolved]
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-06-04 11:08:58 +12:00
Michael Koziarski
e3c26e9926
Merge branch 'master' into patches
2008-06-04 11:05:46 +12:00
David Heinemeier Hansson
8afa725f4b
Wrapped Rails.env in StringQuestioneer so you can do Rails.env.development? [DHH]
2008-06-03 17:44:56 -05:00
Steve Purcell
7cfa6ec8a3
Add more standard Hash methods to ActiveSupport::OrderedHash [ #314 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-06-03 14:15:33 -05:00
josevalim
d54d90f2b5
Allow caches_action to accept a layout option [ #198 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-06-03 14:02:51 -05:00
Craig Demyanovich
aa17716688
Callbacks fire before notifying observers [ #230 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-06-03 13:38:00 -05:00
Joshua Peek
a977f3e88e
Fixed ambiguous first argument warning in ArrayExtTest.
2008-06-03 13:35:03 -05:00
Joshua Peek
c08547d226
Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ActiveSupport [ #238 state:resolved]
2008-06-03 13:32:53 -05:00
Jeremy Kemper
f55ad960d2
Stack @output_buffer for nested rendering
2008-06-03 01:10:00 -07:00
Jeremy Kemper
4d4c8e298f
Don't pass block binding to concat
2008-06-02 21:32:50 -07:00
Jeremy Kemper
0bdb7d353b
Work with @output_buffer instead of _erbout
2008-06-02 21:32:50 -07:00
Jeremy Kemper
933697a5fc
Try replacing _erbout with @output_buffer
2008-06-02 21:32:50 -07:00
David Heinemeier Hansson
da91450e68
Added tests [ #279 state:resolved] (Nicholas Schlueter)
2008-06-02 22:05:27 -05:00
David Heinemeier Hansson
64fea9c45c
Fixed Date#end_of_quarter to not blow up on May 31st [ #289 state:resolved] (Danger)
2008-06-02 22:02:43 -05:00
David Heinemeier Hansson
e7a305f08d
Fixed Base#exists? to check status code as integer [ #299 state:resolved] (Wes Oldenbeuving)
2008-06-02 21:58:42 -05:00
David Heinemeier Hansson
442d2f1032
Fixed that RailsInfoController wasnt considering all requests local in development mode (Edgard Castro) [ #310 state:resolved]
2008-06-02 21:55:42 -05:00
Joshua Peek
92050f6c6f
Ensure Rack processor reads CGI output_cookies for the session cookie.
2008-06-02 21:02:51 -05:00
David Heinemeier Hansson
29641ff05a
Fixed the brokeness from 952ec79bec
2008-06-02 19:00:25 -05:00
David Heinemeier Hansson
4b4aa8f6e0
AR can be disabled, new_rails_defaults.rb should check [ #303 state:resolved] (Jesper Hvirring Henriksen)
2008-06-02 18:43:08 -05:00
David Heinemeier Hansson
a855ab89b7
Added a test for Gzip
2008-06-02 17:42:10 -05:00
Pratik Naik
bd75a722a2
Ensure AR#sum result is typecasted properly
2008-06-02 20:41:11 +01:00
Cheah Chu Yeow
952ec79bec
Faster Hash#slice that doesn't use Enumerable#include?.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-06-02 11:47:15 -07:00
Joshua Peek
714d42d1a6
Fixed initializer tests by stubbing out gems dependencies check.
2008-06-02 10:40:01 -05:00
Joshua Peek
185fe2e9cc
In 9c4f003, gem installation quotes versions. Do the same for unpack and update tests to reflect the change.
2008-06-02 09:54:36 -05:00
Marcos Tapajos
14a65cd982
Fixed changelog merge.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-06-02 09:47:53 -05:00
Jonathan Viney
4210d85a3f
Ensure Associations#sum returns 0 when no rows are returned. [ #295 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-06-02 12:50:44 +01:00
Joshua Peek
a980eb8c77
Added Rack middleware to handle static files.
2008-06-01 13:18:31 -07:00
Ezra Zygmuntowicz
06cb20708b
Added Rack processor
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-06-01 11:25:11 -07:00
David Heinemeier Hansson
3282bf3b50
Added SQL escaping for :limit and :offset in MySQL [Jonathan Wiess]
2008-06-01 09:15:11 -07:00
Michael Koziarski
b9a9b91a3e
Remove dead code, and the tests for it.
2008-05-31 16:58:24 -07:00
John D. Hume
61036a60eb
Substitute value into validates_format_of message
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-05-31 16:58:24 -07:00