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