Peter Marklund
afcbdfc15f
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:00 +12:00
Yehuda Katz + Carl Lerche
49a84ff69c
Ported over render :file tests.
2009-05-13 17:00:59 -07:00
Jeremy Kemper
4f291fa528
Simple examples for require profiling
2009-05-13 12:00:49 -07:00
Jeremy Kemper
e8550ee032
Cherry-pick core extensions
2009-05-13 12:00:15 -07:00
Jeremy Kemper
fa5da8ad54
isolated_test task
2009-05-13 11:43:03 -07:00
Jeremy Kemper
a7ccc7c79f
Remove support for deprecated validation message interpolation format
2009-05-13 11:43:03 -07:00
Jeremy Kemper
e9c5750bd1
Preserve ordering
2009-05-13 11:43:03 -07:00
Jeremy Kemper
4c963972fd
Defer rake/contrib requires so we can use the stdlib rake instead of the full gem
2009-05-13 11:43:03 -07:00
Yehuda Katz + Carl Lerche
216309c165
Implemented redirects and partial rendering in new base.
2009-05-12 16:21:34 -07:00
Yehuda Katz + Carl Lerche
72ca7c591c
Fixed new callbacks to not call the action when a callback sets the response body
2009-05-12 10:53:00 -07:00
Jeremy Kemper
22c5667c2e
Defer rake/contrib/sshpublisher require so we can use the stdlib rake instead of the full gem
2009-05-11 19:49:11 -07:00
Bryan Helmkamp
a2875bec9a
Use DependencyModule for included hooks in ActiveRecord
2009-05-11 22:23:47 -04:00
Yehuda Katz + Carl Lerche
00a9d4b91c
Merge branch 'master' into wip_abstract_controller
...
Conflicts:
actionpack/lib/action_controller/abstract/callbacks.rb
actionpack/lib/action_controller/abstract/renderer.rb
actionpack/lib/action_controller/base/base.rb
actionpack/lib/action_controller/dispatch/dispatcher.rb
actionpack/lib/action_controller/routing/route_set.rb
actionpack/lib/action_controller/testing/process.rb
actionpack/test/abstract_controller/layouts_test.rb
actionpack/test/controller/filters_test.rb
actionpack/test/controller/helper_test.rb
actionpack/test/controller/render_test.rb
actionpack/test/new_base/test_helper.rb
2009-05-11 17:07:05 -07:00
Yehuda Katz + Carl Lerche
0cac68d3be
Revert "Whitespace!"
...
This reverts commit a747ab5b20 .
2009-05-11 15:03:24 -07:00
Yehuda Katz + Carl Lerche
0f6e764e40
Fixed a bug with handling render options
2009-05-11 14:48:58 -07:00
Yehuda Katz + Carl Lerche
6694bd46f5
Aliased AbstractController::ActionNotFound to ActionController::UnknownAction
2009-05-11 12:45:26 -07:00
Jeremy Kemper
ddbeb15a5e
Revert "Fixed bug with polymorphic has_one :as pointing to an STI record"
...
[#2594 state:open]
This reverts commit 99c103be11 .
2009-05-11 12:20:54 -07:00
Yehuda Katz + Carl Lerche
94ee9d2452
Ported ConditionalGet to new Base
2009-05-11 12:04:43 -07:00
Yehuda Katz + Carl Lerche
c1d120a71e
Don't run the action if callbacks are halted.
...
In AbstractController, this means that response_body is not empty
2009-05-11 11:48:38 -07:00
Douglas F Shearer
e1854e0b19
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:45:57 -07:00
Jeremy Kemper
d45d0a1864
Merge branch 'master' of git@github.com:rails/rails
2009-05-11 11:43:30 -07:00
Yehuda Katz + Carl Lerche
34caf4f552
Merge branch 'master' into wip_abstract_controller
2009-05-11 10:58:30 -07:00
Yehuda Katz + Carl Lerche
a2f3684cec
Ported fresh_when into a ConditionalGet module
2009-05-11 10:57:59 -07:00
Yehuda Katz
030dfe3f83
More community code review :)
2009-05-11 10:22:07 -07:00
David Heinemeier Hansson
4932f7b38f
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]
2009-05-11 19:08:13 +02:00
Alexander Dymo
2e7409f035
Change spelling of Kyev timezone to Kyiv [ #2613 state:resolved]
2009-05-10 11:59:03 -05:00
Mike Breen
9010ed2755
Allow you to pass :all_blank to :reject_if option to automatically create a Proc that will reject any record with blank attributes.
2009-05-10 15:02:00 +12:00
Anthony Crumley
026b78f907
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:36:51 +12:00
Ken Collins
9e0cfdb7f9
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:04:46 +12:00
Frederick Cheung
235775de29
honour :inverse_of for joins based include
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-05-10 12:50:03 +12:00
Frederick Cheung
ef6f22ab2a
honour inverse_of when preloading associations
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-05-10 12:50:02 +12:00
Jeremy Kemper
4817bf94d1
Check for date/time methods that moved upstream in 1.9
2009-05-07 18:39:03 -07:00
Jeremy Kemper
49ed452136
Defer rake/contrib/sshpublisher require so basic tasks don't need the full rake gem
2009-05-07 18:27:50 -07:00
Jeremy Kemper
8ee0c598db
Tool for profiling resource usage in each require call.
...
$ ruby -Iactiveresource/lib tools/profile_requires.rb active_resource
91.84 KB 3220 obj 4.0 ms active_resource
83.86 KB 3108 obj 3.3 ms active_support
69.32 KB 2682 obj 2.6 ms active_support/vendor
33.98 KB 651 obj 0.6 ms i18n
94.40 KB 315 obj 4.0 ms 44 KB RSS
2009-05-07 12:10:26 -07:00
Joshua Peek
a747ab5b20
Whitespace!
2009-05-07 10:45:29 -05:00
Joshua Peek
af40fa6d03
Prefer "included" language over "setup"
2009-05-07 10:38:57 -05:00
Joshua Peek
2854535b02
Make module dependency DSL opt in
2009-05-07 10:29:22 -05:00
Joshua Peek
783deae99a
Add test coverage to module setup extensions
2009-05-07 10:03:39 -05:00
Matt Jones
bfc1609a50
Remove stray call to gems:unpack in gems:build:force
...
[#2266 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-05-06 18:57:27 -07:00
Jeremy Kemper
201d8b1755
Fix tests on 1.8.6
2009-05-06 12:19:30 -07:00
Jeremy Kemper
bd7659e014
Fix old reference to ActionController::Failsafe
2009-05-06 01:28:06 -07:00
Jeremy Kemper
6d4a4fabbb
Cherry pick Active Support dependencies. Autoload.
2009-05-06 00:14:55 -07:00
Jeremy Kemper
c585e263ab
Remove superfluous CGI require
2009-05-05 21:50:53 -07:00
Jeremy Kemper
a05cfb6df5
Prefer sibling Active Support
2009-05-05 21:44:02 -07:00
Jeremy Kemper
2f42433f0a
Cherry-pick the inflector only
2009-05-05 21:40:53 -07:00
Joshua Peek
d4402c5554
assert_redirect_to's partial hash matching was deprecated in 2-3 stable 7f1f16c01
2009-05-04 20:26:43 -05:00
Tim Connor
e3891601d1
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:11:24 -05:00
Joshua Peek
b9f9dd8fe9
Fix console
2009-05-04 20:02:14 -05:00
Murray Steele
ccea98389a
Providing support for :inverse_of as an option to associations.
...
You can now add an :inverse_of option to has_one, has_many and belongs_to associations. This is best described with an example:
class Man < ActiveRecord::Base
has_one :face, :inverse_of => :man
end
class Face < ActiveRecord::Base
belongs_to :man, :inverse_of => :face
end
m = Man.first
f = m.face
Without :inverse_of m and f.man would be different instances of the same object (f.man being pulled from the database again). With these new :inverse_of options m and f.man are the same in memory instance.
Currently :inverse_of supports has_one and has_many (but not the :through variants) associations. It also supplies inverse support for belongs_to associations where the inverse is a has_one and it's not a polymorphic.
Signed-off-by: Murray Steele <muz@h-lame.com >
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-05-04 15:27:39 -07:00
codebrulee
eb201e64c0
Fixed Hash#from_xml with keys that are all caps.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-05-04 10:01:01 -07:00