Commit Graph

6707 Commits

Author SHA1 Message Date
Rick Olson
78c2d9fc22 ActiveRecord::Base#sum defaults to 0 if no rows are returned. Closes #11550 [kamal]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9243 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-08 05:20:33 +00:00
Rick Olson
4d594cffcf Automatically parse posted JSON content for Mime::JSON requests. [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9242 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-08 05:05:54 +00:00
Rick Olson
0ff7a2d89f add json_escape ERB util to escape html entities in json strings that are output in HTML pages. [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9241 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-08 04:52:01 +00:00
Rick Olson
0bea3f8391 Don't require rails/gem_builder during rails initialization, it's only needed for the gems:build task. [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9240 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-08 04:21:32 +00:00
Rick Olson
7e94cf7f4d set ActiveSupport.escape_html_entities_in_json = false for new rails apps
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9239 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-08 03:47:08 +00:00
Rick Olson
605196c448 Add config.active_support.escape_html_entities_in_json to allow disabling of html entity escaping. [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9238 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-08 03:45:26 +00:00
Josh Peek
4b68982f64 Improve ActiveRecord::Base#table_name unit tests for nested classes. Closes #10289. [scott_willson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9237 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-07 19:44:37 +00:00
Josh Peek
2cdc613598 script/performance/profiler compatibility with the ruby-prof >= 0.5.0. Closes #9176. [Catfish]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9236 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-07 19:29:09 +00:00
Pratik Naik
4f39382a2f Ensure that respond_to? considers dynamic finder methods. Closes #11538. [floehopper]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9235 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-06 22:26:15 +00:00
Josh Peek
917423d664 Provide a helper proxy to access helper methods from outside views. Closes #10839 [Josh Peek]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9234 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-06 18:42:34 +00:00
Pratik Naik
5b822aca4b Split associations_test.rb into multiple files based on association type. [Pratik]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9233 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-06 03:01:09 +00:00
Pratik Naik
7ddc8f2e1b Ensure that save on parent object fails for invalid has_one association. Closes #10518. [Pratik]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9232 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-06 02:32:51 +00:00
Pratik Naik
9bc75fd007 Remove duplicate code from associations. [Pratik]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9231 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-06 02:18:42 +00:00
Pratik Naik
f6b12c11cd Refactor HasManyThroughAssociation to inherit from HasManyAssociation. Association callbacks and <association>_ids= now work with hm:t. Closes #11516 [rubyruy]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9230 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-06 00:27:12 +00:00
Pratik Naik
15d88885ee Ensure HABTM#create and HABTM#build do not load entire association. [Pratik]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9229 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-05 16:25:48 +00:00
Michael Koziarski
77730f7c9d Avoid modifying the sendmail_settings hash when using the return path. Closes #7572 [billkirtley]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9228 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-05 11:28:15 +00:00
Pratik Naik
097c0d6166 Fix more typos and changelog
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9227 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-05 11:18:05 +00:00
Pratik Naik
aa4af60aad Improve documentation.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9226 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-05 03:52:58 +00:00
Josh Peek
08318b8bcd Replaced callback method evaluation in AssociationCollection class to use ActiveSupport::Callbacks. Modified ActiveSupport::Callbacks::Callback#call to accept multiple arguments.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9225 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-04 20:26:42 +00:00
Michael Koziarski
36b8073ff5 Make HABTM#create behave the same as << with after_add callbacks. Closes #11374 [freels]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9224 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-04 14:37:22 +00:00
Michael Koziarski
50538fb524 Don't double include DISTINCT when the user has already specified it. Closes #11502 [kenneth.kalmer]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9223 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-04 12:06:22 +00:00
Michael Koziarski
295587f0ab Tiny change to allow AR based creation of TIME columns in sqlite. Closes #11465 [h-lame]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9222 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-04 11:45:08 +00:00
Geoff Buesing
49f2e6f8d4 Time #yesterday and #tomorrow behave correctly crossing DST boundary. Closes #7399 [sblackstone]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9221 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-04 03:29:30 +00:00
Jeremy Kemper
cfe42ba1b1 Update fcgi dispatcher test cases. Closes #11471 [guillaume]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9220 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-03 20:00:33 +00:00
Jeremy Kemper
940cf0cacd Bah, don't test TMail in AM
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9219 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-03 18:32:10 +00:00
Jeremy Kemper
5c17a74d59 Ruby 1.9 compat: compare with same encoding
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9218 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-03 17:28:05 +00:00
Jeremy Kemper
c9aaad795d Ruby 1.9 compat: ascii encoding for quoted-printable regexps
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9217 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-03 17:27:55 +00:00
Rick Olson
8ff9e9365d missed an added file
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9216 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 21:53:21 +00:00
Rick Olson
7d2316604a Flesh out rake gems:unpack to unpack all gems, and add rake gems:build for native extensions. Closes #11513 [ddollar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9215 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 17:48:30 +00:00
Geoff Buesing
2c6f1d4396 TimeWithZone: Adding tests for dst and leap day edge cases when advancing time
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9213 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 14:15:30 +00:00
Pratik Naik
1e087fd3fd Ensure RJS redirect_to doesn't html-escapes string argument. Closes #8546
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9212 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 12:48:59 +00:00
Pratik Naik
6a36d96aa2 Fix that config.to_prepare dependency error. Closes #10520 [akaspick, Pratik]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9211 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 12:48:10 +00:00
Pratik Naik
3b603bbc93 Revert [9209] Use Hash#except
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9210 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 12:47:52 +00:00
Pratik Naik
adaed1ebcb Adding Hash#without Closes #7369 [eventualbuddha]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9209 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 11:45:03 +00:00
Geoff Buesing
f4dc834976 TimeWithZone#method_missing: send to utc to advance with dst correctness, otherwise send to time. Adding tests for time calculations methods
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9208 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 06:56:44 +00:00
Rick Olson
c4ccca1f84 spell check
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9205 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 20:55:45 +00:00
Rick Olson
e0402fe032 Add config.active_support for future configuration options. Also, add more new Rails 3 config settings to new_rails_defaults.rb [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9204 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 20:35:56 +00:00
Rick Olson
1eb57a6870 Add config.active_support.use_standard_json_time_format setting so that Times and Dates export to ISO 8601 dates. [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9203 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 20:25:26 +00:00
Rick Olson
d450ac4459 Tweak ActiveRecord::Base#to_json to include a root value in the returned hash: {post: {title: ...}} [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9202 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 20:09:45 +00:00
David Heinemeier Hansson
6a74360f97 Use class << self
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9201 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 19:16:55 +00:00
Rick Olson
e223216e9a Add efficient #include? to AssociationCollection (for has_many/has_many :through/habtm). [stopdropandrew]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9200 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 18:27:22 +00:00
David Heinemeier Hansson
4e07037afa gems should be specified before plugins
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9199 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 17:15:31 +00:00
David Heinemeier Hansson
8f8f822fa6 Added examples for config.gem
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9198 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 17:13:05 +00:00
Jeremy Kemper
8f46ead1e9 Improving railties test coverage. Closes #11496 [miloops]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9197 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 16:54:30 +00:00
Jeremy Kemper
0c0c9fa863 Partial updates off by default
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9196 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 15:48:46 +00:00
Jeremy Kemper
41ac6c553f Ruby 1.9 compat: toplevel AS reference within BasicObject
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9195 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 07:39:14 +00:00
Jeremy Kemper
30fa377f33 Ruby 1.9 compat: encoding and multibyte test fixes
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9194 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 07:39:04 +00:00
Jeremy Kemper
300c927b6c Ruby 1.9 compat: force encoding for binary comparison tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9193 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 06:58:52 +00:00
Jeremy Kemper
ba8e0a846f Ruby 1.9 compat: work around YAML serialization error exposed by validations tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9192 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 06:46:40 +00:00
Jeremy Kemper
c3df9bfad2 Ruby 1.9 compat: delete DEFAULTS key from Hash not Omap array
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9191 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 06:33:16 +00:00