Jeremy Kemper
c548e21365
Bump git versions to 3.0.0.beta1 since we've released
2010-02-05 09:24:12 -08:00
Jeremy Kemper
a81a2a29ab
Bump arel dep
2010-02-05 09:21:45 -08:00
Jeremy Kemper
f1e5642fb7
Revert "Link to main Arel repository"
...
This reverts commit 2036268679 .
2010-02-05 09:12:35 -08:00
Paul Rosania
363a752c36
install ActionController::UrlFor before environment is parsed, to provide ActionMailer#default_url_options=
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-02-05 00:08:56 -08:00
Jeremy Kemper
459ecaf95d
Submarine the rake-gemcutter dep in Rakefiles
2010-02-05 00:03:03 -08:00
Jeremy Kemper
ae4cb0641e
Add the dummy rails3b gemspec that pulls in non-prerelease deps
2010-02-04 23:53:10 -08:00
Jeremy Kemper
b1f30ef048
Kill default require_path
2010-02-04 19:13:07 -08:00
Jeremy Kemper
7b81f5981f
Fix task defines
2010-02-04 18:44:32 -08:00
Jeremy Kemper
ed6e72a84f
No sense bundling sense it's not available in Rakefile. Also, actually require.
2010-02-04 18:44:32 -08:00
David Heinemeier Hansson
657ffed3f5
Need gemcutter here too
2010-02-04 18:39:19 -08:00
Jeremy Kemper
c1785f3282
Release using gemcutter gem:push tasks
2010-02-04 18:28:45 -08:00
Jeremy Kemper
31f8a59c16
Test that csrf meta content is html-escaped, too
2010-02-04 18:03:06 -08:00
Jeremy Kemper
7b1d3a0ca3
Add prototype ujs handler for data-method
2010-02-04 18:01:08 -08:00
Jeremy Kemper
6bf79f02be
Revert dumb test
2010-02-04 17:49:23 -08:00
Jeremy Kemper
358968cd28
Update prototype-ujs for data-confirm
2010-02-04 17:46:29 -08:00
Jeremy Kemper
3062bc70ef
HTML-escape csrf meta contents
2010-02-04 17:45:43 -08:00
Jeremy Kemper
2191aa47ac
Expose CSRF param name also
2010-02-04 15:26:24 -08:00
Chad Woolley
09a88a347d
fix rubygems/bundler install in ci build script
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-02-04 14:59:04 -08:00
Jeremy Kemper
78de17cf70
Expose CSRF tag for UJS adapters
2010-02-04 14:58:32 -08:00
Jeremy Kemper
127e53453d
Ensure javascripts are pulled in so UJS can hook the Delete link
2010-02-04 12:22:26 -08:00
Bryan Helmkamp
2036268679
Link to main Arel repository
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-02-04 12:01:25 -08:00
Jeremy Kemper
c697974fad
Bump to bundler 0.9.2
2010-02-04 11:36:57 -08:00
Jeremy Kemper
a74ed0c2ee
Autorequire default libs and those in groups named after the current Rails environment
2010-02-04 11:04:50 -08:00
Jeremy Kemper
a871b1a4d2
Depend on bundler >= 0.9.1
2010-02-04 10:56:16 -08:00
Jeremy Kemper
293fd9daf8
server command loads the application
2010-02-04 10:50:14 -08:00
Jeremy Kemper
ca273d171c
Revert "Rails script commands load the application rather than just boot"
...
This reverts commit 358451c219 .
2010-02-04 10:49:41 -08:00
Jeremy Kemper
358451c219
Rails script commands load the application rather than just boot
2010-02-04 10:45:35 -08:00
Jeremy Kemper
6154278d22
Fix broken autorequires
2010-02-04 10:08:06 -08:00
Jeremy Kemper
2faf94a7af
Use the correct environment.rb path
2010-02-04 10:08:06 -08:00
Jeremy Kemper
23ad1eff0d
Rationalize railtie dependencies: AC uses AV; AR uses AMo; and Rails always uses AS.
2010-02-04 10:08:06 -08:00
Jeremy Kemper
5c07c33ab4
Move framework requires and Bundler.require from boot.rb to app.rb. Cut down the list of railtie choices to those that make sense.
2010-02-04 10:08:06 -08:00
Antonio Cangiano
6b3fb38461
Updated the database.yml file generated for ibm_db to the latest version of DB2 and the gem.
...
[#3852 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-02-04 10:08:06 -08:00
Pratik Naik
25b6b95459
Make RAILS_* give deprecation warning just once
2010-02-04 17:00:50 +00:00
José Valim
06860dcf29
Remove duplicated version check.
2010-02-04 14:14:11 +01:00
Santiago Pastorino and José Ignacio Costa
6d6e6105c0
require 'action_controller' added on a test that uses it
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-02-04 14:07:24 +01:00
José Valim
d0f98420ea
Automatically require rubygems when --dev flag is given.
2010-02-04 14:05:13 +01:00
José Valim
79376e3c9d
Update Gemfile to use latest bundler config.
2010-02-04 13:53:37 +01:00
José Valim
ab14e3f862
Merge branch 'master' of gitproxy:rails/rails
2010-02-04 13:05:27 +01:00
José Valim
31248fe369
Remove instrument! and require thread from AS::Notifications.
2010-02-04 10:39:55 +01:00
Jeremy Kemper
c9ec28b2b6
Use a normal gem source url instead of a magic symbol
2010-02-04 00:21:47 -08:00
Jeremy Kemper
b63643004c
Bump bundler dep to 0.9.1.pre1
2010-02-04 00:19:07 -08:00
Jeremy Kemper
db15e49ddf
Autorequire bundled libraries by default
2010-02-03 23:56:51 -08:00
David Heinemeier Hansson
031139bb71
Homogenize gemspecs and remove the deprecated autorequire
2010-02-03 17:59:49 -08:00
Chad Woolley
e71825d40d
remove arel directory, breaks 'git submodule init', which breaks ci builds
...
Signed-off-by: Yehuda Katz <yehudakatz@Billing-MacBook-Pro.local >
2010-02-03 17:57:49 -08:00
David Heinemeier Hansson
dd13874ff6
Merge
2010-02-03 17:31:35 -08:00
David Heinemeier Hansson
79817aa9e7
Move to 3.0.0.beta
2010-02-03 17:29:51 -08:00
David Heinemeier Hansson
ddb512c02b
Simplify description
2010-02-03 17:27:06 -08:00
David Heinemeier Hansson
36e6daac67
Copy over latest release notes from docrails
2010-02-03 17:22:08 -08:00
Jeremy Kemper
9b033d14b2
Merge remote branch 'mikel/master'
2010-02-03 17:03:21 -08:00
SubbaRao Pasupuleti
639e044298
removing , from ,= statement in WrappedDatabaseException constructor
...
[#3830 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-02-03 17:02:40 -08:00
Mikel Lindsaar
1ae543a180
-v and --version params now work on rails script in or our of an app
2010-02-04 11:57:13 +11:00
Mikel Lindsaar
02ef8d20a1
Adding guard to make sure test database declarations exist before trying to auto create
2010-02-04 11:57:13 +11:00
Carl Lerche
f497e7ad1d
Update rails to use the latest bundler
2010-02-03 16:56:32 -08:00
Yehuda Katz
77015872be
Removing submodule hacks
2010-02-03 16:28:18 -08:00
José Valim
efa850558f
Make bin/rails call rails/commands/application, fix generators usage and update .gitignores.
2010-02-03 18:49:47 +01:00
José Valim
391f2543c9
Properly show middlewares on rake about.
2010-02-03 18:07:22 +01:00
José Valim
622e3dda84
No more vendored thor.
2010-02-03 17:57:54 +01:00
José Valim
836cbe5735
Add method and path to AC notifications.
2010-02-03 17:18:18 +01:00
José Valim
b13504303b
Merge remote branch 'mikel/master'
2010-02-03 10:32:27 +01:00
Mikel Lindsaar
f390eade5f
Adding 'db' as a shortcut for dbconsole to the rails command
2010-02-03 19:50:51 +11:00
Mikel Lindsaar
38d13f9597
Deprecated freeze rake tasks and cleaned up annotations.rake
2010-02-03 18:31:57 +11:00
Mikel Lindsaar
9d65390805
Added encoding qery support for SQLite3 to make rake db:charset work on all databases shipping with Rails 3
2010-02-03 18:06:38 +11:00
Mikel Lindsaar
fbdef7aafe
Made rake db:create also create the test database if you are in development mode
2010-02-03 16:39:04 +11:00
Mikel Lindsaar
80e49354f1
Updating index.html to remove script/generate and making railties tests pass again
2010-02-02 21:13:01 -08:00
Mikel Lindsaar
76d5428c33
Updating index.html to remove script/generate and making railties tests pass again
2010-02-03 15:52:05 +11:00
David Heinemeier Hansson
9a83bd5006
Rename usage path to command to just the command name
2010-02-02 16:16:26 -08:00
David Heinemeier Hansson
ea59177156
Wups, need the application command in there too
2010-02-02 16:11:40 -08:00
David Heinemeier Hansson
68ca336195
Fix rails server
2010-02-02 16:10:24 -08:00
David Heinemeier Hansson
7840ea29b4
Added "rake about" as a replacement for script/about [DHH]
2010-02-02 16:03:47 -08:00
David Heinemeier Hansson
d53749608e
Add a reminder that you should use "rails" not "script/rails" when running normally
2010-02-02 15:56:16 -08:00
David Heinemeier Hansson
9f224061ee
Boot path has already been required, dont need it again
2010-02-02 15:54:31 -08:00
Carl Lerche
08fd9a6491
Remove the generated gemfile in railties tests since the rails gemfile is used.
2010-02-02 15:51:24 -08:00
David Heinemeier Hansson
d236827881
Removed all the default commands in script/* and replaced them with script/rails and a rails command that'll act the same when run from within the app [DHH]
2010-02-02 15:50:56 -08:00
Carl Lerche
144f41ed9b
Use bundler 0.9.0.pre4 when running CI
2010-02-02 10:19:43 -08:00
Chad Woolley
2c978160d2
Fix invocation of system commands in ci script
...
Signed-off-by: Carl Lerche <carllerche@mac.com >
2010-02-02 10:17:50 -08:00
José Valim
ff2d04a9ec
Revert "failing tests in multibyte_chars_test.rb fixed". The bug is in Ruby 1.9.1 p376, not in AS test suite.
...
This reverts commit bf1f70d877 .
2010-02-02 12:07:41 +01:00
Santiago Pastorino and José Ignacio Costa
afdf52402e
Routing Mapper with % interpolation on Ruby 1.9.1 fixed [ #3837 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-02-02 11:58:38 +01:00
José Valim
95eadb39bd
Configuration values should be on AV::Base.
2010-02-02 11:32:28 +01:00
José Valim
ec4b18ec78
Get rid of deprecation warnings on config/environments/*
2010-02-02 10:44:09 +01:00
José Valim
101a8fa5f8
Ensure that attr_reader methods in generators are protected.
2010-02-02 10:30:28 +01:00
Szymon Nowak
17bee0dd2f
Change Rails::Generators::Migration protected instance methods to class methods. [ #3820 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-02-02 10:18:48 +01:00
Prem Sichanugrist
c01014ac1c
Modify the behavior of radio_button_tag to use sanitize_to_id for consistency [ #1792 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-02-02 10:17:26 +01:00
Prem Sichanugrist
ea2cbc86f7
Add test case for unable to run migration if ActiveRecord::Base.logger is nil ( #3434 )
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-02-02 10:14:51 +01:00
Corey Johnson
f4e5303bcf
fixed migration logger bug [ #3434 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-02-02 10:12:07 +01:00
Kieran Pilkington
f16e2ae9c9
Updating USAGE information for Mailer generator [ #3801 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-02-02 10:09:41 +01:00
Prem Sichanugrist
ab83800c35
Hide '/rails/info/properties' from 'rake routes' [ #3793 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2010-02-02 09:05:22 +00:00
Sam Ruby
df8852d04d
Make rdoc match current API
...
Signed-off-by: Mikel Lindsaar <raasdnil@gmail.com >
2010-02-02 12:06:50 +11:00
Sam Ruby
5998dd7bb8
Resolve view paths correctly on CygWin
...
Signed-off-by: Mikel Lindsaar <raasdnil@gmail.com >
2010-02-02 12:05:49 +11:00
Mikel Lindsaar
485f12fe4c
Fixed --dev flag for new bundler
2010-02-02 11:24:19 +11:00
Mikel Lindsaar
d1eed079e1
Merge branch 'master' of git://github.com/rails/rails
2010-02-02 10:51:19 +11:00
Carl Lerche
b9edb0c60c
Update the Gemfile and CI build
2010-02-01 15:42:45 -08:00
Carl Lerche
16c0d1d3b6
Run bundle exec rake instead of bin/rake during CI
2010-02-01 15:08:40 -08:00
Carl Lerche
90ab1a6a4d
[PATCH] remove geminstaller dependency from ci build
2010-02-01 15:04:03 -08:00
Mikel Lindsaar
ddf2b4add3
Xavier's edits
2010-02-02 09:46:55 +11:00
José Valim
d74b5e440c
Make AM test suite green.
2010-02-01 23:34:47 +01:00
Carl Lerche
ff7a6a9b41
Add the database adapter in the generated Gemfile
2010-02-01 13:43:17 -08:00
Santiago Pastorino
bf1f70d877
failing tests in multibyte_chars_test.rb fixed
...
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local >
2010-02-01 09:30:00 -08:00
Mikel Lindsaar
428bdb5063
Adding Release Notes 3.0
2010-02-01 23:51:40 +11:00
José Valim
66615f25cf
Merge branch 'master' of gitproxy:rails/rails
2010-02-01 11:41:16 +01:00
José Valim
0dece7929c
Deprecate AC configuration values which were moved to Rack.
2010-02-01 11:40:27 +01:00
Jeremy Kemper
e5ab4b0d07
Convert to class_attribute
2010-02-01 02:02:42 -08:00
Jeremy Kemper
8ae25a8e41
Introduce class_attribute to declare inheritable class attributes. Writing an attribute on a subclass behaves just like overriding the superclass reader method. Unifies and replaces most usage of cattr_accessor, class_inheritable_attribute, superclass_delegating_attribute, and extlib_inheritable_attribute.
2010-02-01 02:02:41 -08:00
José Valim
a8c5d22c23
Add config.generators.fallbacks.
2010-02-01 10:48:59 +01:00
Mikel Lindsaar
aa9f549965
Updates to output and warning on being for Rails 3.0
2010-02-01 19:59:45 +11:00
Yehuda Katz
2092351652
Add support for compile-time <%= raw %>
2010-01-31 23:42:35 -08:00
Santiago Pastorino
1adfb92135
Deleted all references to ActionView::SafeBuffer in favor of ActiveSupport::SafeBuffer
...
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local >
2010-01-31 22:14:18 -08:00
Santiago Pastorino
9987a00738
action_view/safe_buffer is no longer valid
...
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local >
2010-01-31 21:55:41 -08:00
Santiago Pastorino
f439f1d86f
action_view is requiring the deleted action_view/erb/util.rb file
...
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local >
2010-01-31 20:26:28 -08:00
Carl Lerche
3b922aaf08
Update the Ci build script
2010-01-31 20:18:13 -08:00
Mikel Lindsaar
65fb2c7b32
Completely updated the ActionMailer guide
2010-02-01 14:57:54 +11:00
Carl Lerche
a54654de1c
Update the generated Gemfile and config/boot.rb to work with bundler 0.9
2010-01-31 19:48:42 -08:00
Yehuda Katz
4cbb9db0a5
For performance reasons, you can no longer call html_safe! on Strings. Instead, all Strings are always not html_safe?. Instead, you can get a SafeBuffer from a String by calling #html_safe, which will SafeBuffer.new(self).
...
* Additionally, instead of doing concat("</form>".html_safe), you can do
safe_concat("</form>"), which will skip both the flag set, and the flag
check.
* For the first pass, I converted virtually all #html_safe!s to #html_safe,
and the tests pass. A further optimization would be to try to use
#safe_concat as much as possible, reducing the performance impact if
we know up front that a String is safe.
2010-01-31 19:39:13 -08:00
Carl Lerche
1c83fd2eff
Have rails depend on bundler
2010-01-31 19:35:11 -08:00
Carl Lerche
dfeae62e57
Update the CI geminstaller to pull in the correct version of bundler
2010-01-31 19:25:51 -08:00
Carl Lerche
9f01dff9c2
Get rails tests running on bundler 0.9
2010-01-31 19:13:43 -08:00
Jeremy Kemper
9bd0422dd7
Bump arel dependency to 0.2.0 from 0.2.pre
2010-01-31 18:42:41 -08:00
Mikel Lindsaar
65ad16568c
Updating copyright dates on all licenses
2010-02-01 10:10:53 +11:00
Mikel Lindsaar
a07d0f8786
Full update on ActiveModel documentation
2010-02-01 10:08:20 +11:00
Stefan Penner
c493370f33
UJS documentation.
2010-01-31 16:37:33 -06:00
Erik St. Martin
e1618b9ac3
data-remote needs to be on the form and not the submit when using button_to :remote=>true
2010-01-31 14:43:07 -06:00
Stephen St. Martin
a9e89e82b6
add :remote option to form_tag
2010-01-31 13:46:33 -06:00
Stephen St. Martin
a3349f845f
form_for should pass :remote to form_tag through html_options
2010-01-31 13:46:27 -06:00
Joshua Peek
59e9478f57
Require ac/test_case from AV::TestCase
2010-01-31 13:38:16 -06:00
Mikel Lindsaar
bb2c7b432c
Updating Action Mailer documentation
2010-01-31 09:46:51 -08:00
Mikel Lindsaar
2ebea1c02d
deOMGifying Railties, Active Support, and Action Pack
2010-01-31 09:46:30 -08:00
José Valim
b3a028259f
Improve missing template error messages a little bit.
2010-01-31 10:24:38 +01:00
Joshua Peek
48459c8278
Add rel=nofollow on non get remote links
2010-01-30 20:26:30 -06:00
Joshua Peek
31820b9dd6
Generate UJS code for :disable_with
2010-01-30 20:22:15 -06:00
Erik St. Martin
392817cf11
updating link_to and button_to to support :remote => true and other options such as :confirm in a unobtrusive manor
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2010-01-30 19:44:35 -06:00
Joshua Peek
7d9ed8eec1
Include prototype ujs adapter with new apps
2010-01-30 19:20:49 -06:00
Joshua Peek
db49c706b6
Axe AM state machine
...
We're going do it eventually, get it done before 3.0 is final.
2010-01-30 18:38:01 -06:00
Joshua Peek
657d85580e
Reorg options_for_javascript and array_or_string_for_javascript
2010-01-30 16:13:49 -06:00
Joshua Peek
570e02c96a
Move button_to_function to prototype helper
2010-01-30 16:08:56 -06:00
Joshua Peek
ff3f779629
Unused JAVASCRIPT_PATH const
2010-01-30 16:04:58 -06:00
Joshua Peek
ad1924125d
Move scripty JSG helpers into scriptaculous_helper.rb
2010-01-30 16:02:26 -06:00
Joshua Peek
9c2c307ee4
Move form_remote_tag and remote_form_for into prototype_legacy_helper
2010-01-30 15:42:30 -06:00
Joshua Peek
779094a602
Move button_to_remote and submit_to_remote into prototype_legacy_helper
...
plugin
2010-01-30 15:28:31 -06:00
Joshua Peek
b3787643ec
Move link_to_function and link_to_remote into prototype_legacy_helper
...
plugin
2010-01-30 15:20:00 -06:00
Joshua Peek
2de311a093
Drop AjaxHelper
2010-01-30 15:08:29 -06:00
Joshua Peek
95f317b020
Move periodically_call_remote into prototype_legacy_helper plugin
2010-01-30 15:01:02 -06:00
Joshua Peek
61c9b16487
Move observe_field and observe_form to prototype_legacy_helper plugin
2010-01-30 14:53:43 -06:00
Joshua Peek
4f7a85d2c6
Revert "Merge branch 'rails/master' into ujs"
...
This reverts commit 3aa1ea1ae4 , reversing
changes made to 2c12a71378 .
Conflicts:
actionpack/lib/action_view/helpers/javascript_helper.rb
actionpack/lib/action_view/helpers/url_helper.rb
actionpack/test/template/url_helper_test.rb
2010-01-30 14:39:59 -06:00
Joshua Peek
ac20f2cea1
Revert "Add rails.js driver to default source list"
...
This reverts commit 8a46e1182e .
2010-01-30 14:39:59 -06:00
Joshua Peek
ffc10731c3
Revert "fixed tests to also look for rails.js when using javascript_include_tag :defaults"
...
This reverts commit 7f181e4750 .
2010-01-30 14:39:59 -06:00
Joshua Peek
e0d4e5f345
Revert "Drop JS scripts from core"
...
This reverts commit a06c47a52b .
2010-01-30 14:39:59 -06:00
Pratik Naik
ec057ada07
Rely on arel to generate the correct sql when an empty array is supplied to IN predicate
2010-01-30 19:34:05 +00:00
Joshua Peek
1bd8a50a99
Deprecation notice for TestResponse#redirected_to
2010-01-30 12:26:49 -06:00
José Valim
c164ca1efb
Bring helpers_dir deprecation back.
2010-01-30 16:49:58 +01:00
José Valim
2d567e470a
Add transfer_encoding= setter deprecation.
2010-01-30 16:39:27 +01:00
José Valim
0e063f435c
Fix some backward incompatible behavior on AM.
2010-01-30 16:35:22 +01:00
José Valim
d6e2f5013c
Drop AR I18n deprecation and simple use errors.messages as fallback.
2010-01-30 13:12:12 +01:00
José Valim
431fc3c817
Improve railtie deprecation messages.
2010-01-30 12:30:15 +01:00
Paul Rosania
766e857bea
tsort-based dependency resolution for initializers
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-01-29 19:25:58 -08:00
Joshua Peek
a06c47a52b
Drop JS scripts from core
2010-01-29 20:27:23 -06:00
Joshua Peek
bddd1bb626
Deprecate link_to :popup
2010-01-29 20:00:55 -06:00
Erik St. Martin
7f181e4750
fixed tests to also look for rails.js when using javascript_include_tag :defaults
2010-01-29 16:33:27 -06:00
Joshua Peek
8a46e1182e
Add rails.js driver to default source list
2010-01-29 14:03:38 -06:00
José Valim
24aba77d9c
Only load testing tasks if test unit is being used.
2010-01-29 17:51:06 +01:00
José Valim
17ea8d8d4d
Automatically configure generators if application is defined.
2010-01-29 17:51:06 +01:00
José Valim
cc2642b220
Added :format and :locale options to render.
2010-01-29 17:51:06 +01:00
José Valim
986a4e616b
Fix rendering of layouts.
2010-01-29 17:51:05 +01:00
José Valim
ba82eb2efa
Get rid of AM warnings in AP test suite.
2010-01-29 17:51:05 +01:00
José Valim
3f84091937
ActionMailer should depend just on AbstractController.
2010-01-29 17:51:05 +01:00
Mikel Lindsaar
2960077445
Add a failing test case for render :layout
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-29 17:51:05 +01:00
Mikel Lindsaar
1024c11f3c
Added tests for rendering different template for new API
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-29 17:51:05 +01:00
Yehuda Katz
8031a53abd
superclass_delegating_accessor rewritten to serve as the base for many other kinds of accessors (step 1 of unification)
2010-01-29 03:01:02 -08:00
Jeremy Kemper
d58398c2b5
Ensure test sets json time format flag
2010-01-28 10:46:23 -08:00
Carl Lerche
f15bbcf97e
Move the ActiveRecord generator settings into the Railtie
2010-01-28 10:45:25 -08:00
José Valim
e7418ab63c
Add more tests to some key points in Railties.
...
Signed-off-by: Carl Lerche <carllerche@mac.com >
2010-01-28 10:28:41 -08:00
José Valim
64ea3dfd9f
Add reloadable specific for engines and move environment to application paths.
...
Signed-off-by: Carl Lerche <carllerche@mac.com >
2010-01-28 10:28:41 -08:00
José Valim
d3d487479a
Add config.to_prepare back and add tests for it.
...
Signed-off-by: Carl Lerche <carllerche@mac.com >
2010-01-28 10:28:40 -08:00
José Valim
226d8e745a
Refactor MetalLoader and RoutesReloader to rely less on class configuration.
...
Signed-off-by: Carl Lerche <carllerche@mac.com >
2010-01-28 10:28:40 -08:00
Carl Lerche
252911e378
Cleanup the test_unit generator move into the railtie
2010-01-28 10:17:41 -08:00
Carl Lerche
6268fcdc30
Fix the test_framework generator tests
2010-01-28 10:03:47 -08:00
Carlhuda
c7c3eac762
Test::Unit Railtie
2010-01-28 09:55:29 -08:00
Stefan Penner
3aa1ea1ae4
Merge branch 'rails/master' into ujs
2010-01-27 22:44:56 -06:00
Jeremy Kemper
2c12a71378
Missed template change for defaults -> default
2010-01-27 19:53:46 -08:00
Jeremy Kemper
452bb1e48d
Rename 'defaults' class method to 'default' to reflect that it's a declaration
2010-01-27 19:38:17 -08:00
Jeremy Kemper
079714277d
Attend to brittle mailer generator tests
2010-01-27 19:33:26 -08:00
Jeremy Kemper
fd0eb3d904
Clear up some ivar warnings
2010-01-27 19:33:03 -08:00
Erik St. Martin
2ec99192d5
renaming javascript drivers to *.rails.js for better naming convention
2010-01-27 22:32:10 -05:00
Jeremy Kemper
187b3b0b48
Fix time comparison. Mail#date returns DateTime not Time.
2010-01-27 19:08:36 -08:00
Jeremy Kemper
8c60acbea2
Expected attachment encoding is binary
2010-01-27 18:37:17 -08:00
Erik St. Martin
eff999d679
initial prototype of jQuery driver complete
2010-01-27 21:35:58 -05:00
Jatinder Singh
e87748869a
Use format of ARes rather than content-type of remote errors to load errors.
...
[#1956 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-01-27 18:27:18 -08:00
Geoff Buesing
e98f9579c4
Time#- with a DateTime argument behaves the same as with a Time argument, i.e. returns the difference between self and arg as a Float [ #3476 status:resolved]
2010-01-27 20:17:09 -06:00
snusnu
016f15dc69
active_support/ordered_hash now requires yaml
2010-01-27 18:13:06 -08:00
Erik St. Martin
a0232d8641
jquery driver now supports :confirm
2010-01-27 20:58:17 -05:00
Erik St. Martin
4911343bf7
jquery driver now supports :popup
2010-01-27 20:42:36 -05:00
Jeremy Kemper
f2dd3578c0
self.defaults => default
2010-01-27 17:35:51 -08:00
Jeremy Kemper
030ab357f9
Remove unbundle changelogs
2010-01-27 17:11:29 -08:00
Jeremy Kemper
8399a315f5
Merge remote branch 'mikel/master'
2010-01-27 17:09:55 -08:00
Mikel Lindsaar
a06a5a64ba
Unvendor'd text-format, now requires text-format gem
2010-01-28 12:08:14 +11:00
Mikel Lindsaar
c1f308f8c6
Unvendor'd MemCache-Client. Now requires the MemCache Client gem as a dependency - Don't forget to gem bundle buys and girls
2010-01-28 11:56:47 +11:00
Mikel Lindsaar
f1fe71d754
Unvendor'd Builder. Now requires the Builder gem as a dependency
2010-01-28 11:51:37 +11:00
Mikel Lindsaar
9029efce41
Unbundling TZInfo
2010-01-28 11:46:54 +11:00
Mikel Lindsaar
32ce2bb37f
Updated mail requirement to 2.1.2
2010-01-28 11:33:58 +11:00
Gregor Schmidt
7b8c6472ff
Adding custom yaml (de-)serialization for OrderedHash
...
[#3608 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-01-27 15:29:06 -08:00
Stefan Penner
2e338aed70
updated tests + docs, plus minor inconsistency fixes
2010-01-27 12:44:36 -06:00
Stefan Penner
253f335294
tests + docs
2010-01-27 12:44:36 -06:00
Stephen St. Martin
da19dfa419
support for observers in jquery driver, and minor bug fixes
2010-01-27 12:44:35 -06:00
Erik St. Martin
d13f254160
initial prototype of prototype js driver
2010-01-27 12:44:35 -06:00
Erik St. Martin
3c7d39d65f
observe_form now supports :with option as it should
2010-01-27 12:44:35 -06:00
Stephen St. Martin
5584d58e65
refactored to be more dry, data-update-failure now correctly works, combine compat and driver, namespaced events, and support for periodically_call_remote
2010-01-27 12:44:35 -06:00
Stefan Penner
1b8ced53c4
Added regression tests that discovered the previous issue.
2010-01-27 12:44:35 -06:00
Erik St. Martin
c0f63883ea
:href should be comming in through html_options and not options
2010-01-27 12:44:35 -06:00
Erik St. Martin
f661a3bc59
removing container inline js function of observed elements :function callback
2010-01-27 12:44:35 -06:00
Erik St. Martin
a6cd35ba68
moving html_safe call into helpers directly as they only work from that level
2010-01-27 12:44:35 -06:00
Erik St. Martin
007db3fca8
start of prototype driver, missing observe_form, observe_field, and periodically_call_remote
2010-01-27 12:44:35 -06:00
Erik St. Martin
0215466832
periodically_call_remote does not need data-observe=true
2010-01-27 12:44:35 -06:00
Erik St. Martin
6a8da2053e
need to tell erb that our <script> tag is html_safe
2010-01-27 12:44:35 -06:00
Erik St. Martin
ad26b3934e
test to go with last commit, explicit :href for link_to_remote
2010-01-27 12:44:35 -06:00
Erik St. Martin
9fe845670d
adding :href override to link_to_remote
2010-01-27 12:44:34 -06:00
Erik St. Martin
56ae6550b8
adding support for :disable_with to button_to_remote
2010-01-27 12:44:34 -06:00
Stephen St. Martin
ff26ca68d2
support for submit_to_remote in jquery driver
2010-01-27 12:44:34 -06:00
Stephen St. Martin
8b7cd5ae7e
fix duplidate data-submit attribute, submit_to_remote should test url
2010-01-27 12:44:34 -06:00
Stephen St. Martin
2204215b43
upgrade jquery to 1.4.1 and default request method to GET as its default on forms and links
2010-01-27 12:44:34 -06:00
Erik St. Martin
eb2d32f309
remote_form_for now supports :confirm
2010-01-27 12:44:34 -06:00
Stephen St. Martin
ed09413230
refractor handler code for remote_form_tag to also handle link_to_remote, fix a bug preventing :method from being used, also add missing :position, :confirm is still not functional yet
2010-01-27 12:44:34 -06:00
Erik St. Martin
44542bd7da
account for the fact a few options may be passed as symbols and need to be converted to string
2010-01-27 12:44:34 -06:00
Stephen St. Martin
04ad12d681
initial jquery driver and compat, right now the only supported method is form_remote_tag
2010-01-27 12:44:34 -06:00
Stephen St. Martin
5a75f1ab90
add missing call to set_with_and_condition_attributes for form_remote_tag
2010-01-27 12:44:34 -06:00
Erik St. Martin
06dd23d671
removing Prototype inline js for attributes for :with and :condition, it now is free form js that can be placed there, also moved :submit out into AjaxHelper, updated tests to reflect changes
2010-01-27 12:44:34 -06:00
Stephen St. Martin
d9af0dfac4
refactor params and with into copat module
2010-01-27 12:44:33 -06:00
Stephen St. Martin
a5e9d033e8
add missing test for :with option to link_to_remote
2010-01-27 12:44:33 -06:00
Erik St. Martin
9e3e1b3f24
fixing last merge breakage
2010-01-27 12:44:33 -06:00
Stephen St. Martin
133f6011d0
add missing :before and :after callbacks for link_to_remote
2010-01-27 12:44:33 -06:00
Erik St. Martin
426a6b2e00
making non remote versions of link_to, button_to, submit_tag and image_submit_tag output data attributes for things like :confirm, :method, :popup, and :disable_with
2010-01-27 12:44:33 -06:00
Erik St. Martin
9821648644
link_to_remote and button_to_remote now support :confirm
2010-01-27 12:44:33 -06:00
Erik St. Martin
d769897171
modified helper that adds attributes for :method to include rel='nofollow' if :method => :delete, same as its remote_ equivalent
2010-01-27 12:44:33 -06:00
Erik St. Martin
fbb56f7ee8
refactoring AjaxHelper a bit so that it calls shared method from JavascriptHelper to add attributes for :confirm
2010-01-27 12:44:33 -06:00
Erik St. Martin
463fc71107
making non remote versions of link_to, button_to, submit_tag and image_submit_tag output data attributes for things like :confirm, :method, :popup, and :disable_with
2010-01-27 12:44:33 -06:00
Erik St. Martin
c3baf8b767
link_to_remote and button_to_remote now support :confirm
2010-01-27 12:44:33 -06:00
Stephen St. Martin
9ad8d348b5
test :method option of link_to_remote, and ensure rel='nofollow' is added when :method => 'delete'
2010-01-27 12:44:33 -06:00
Erik St. Martin
9f5cb3d3b4
moving include of ScriptaculousHelper into PrototypeHelper, ActionView should know as little as possible about individual frameworks
2010-01-27 12:44:33 -06:00
Stephen St. Martin
37ad57596b
port existing test suite to check for new output, and fix all breaking tests
2010-01-27 12:44:32 -06:00
Erik St. Martin
7bf5aef907
fixed current tests that were failing do to module location change, this is temporary to fix state of repo till all the new tests are complete
2010-01-27 12:44:32 -06:00
Stefan Penner
255066b6c7
first round of documenation for ujs
2010-01-27 12:44:32 -06:00
Stephen St. Martin
20c6c71e6a
oops, remove test code
2010-01-27 12:44:32 -06:00
Stephen St. Martin
d8343a6ad7
restructure compatibility module so it is no longer a child
2010-01-27 12:44:32 -06:00
Erik St. Martin
565a696e71
Removed all helpers from PrototypeHelper that are implemented in AjaxHelper. Modified tests that extended with PrototypeHelper to now extend using AjaxHelper. AjaxHelper is now included by default in view helper
2010-01-27 12:44:32 -06:00
Erik St. Martin
5462caf434
fixing failing tests from last commit, order of attributes matters should probably change this later
2010-01-27 12:44:32 -06:00
Erik St. Martin
1cd8b98d01
javascript_helper now correctly pulls in ajax_helper instead of prototype_helper. prototype_helper is pulled in by ajax_helper for reverse compatibility
2010-01-27 12:44:32 -06:00
Stephen St. Martin
f115fb0111
make observers a little more dry
2010-01-27 12:44:32 -06:00
Stephen St. Martin
49e84a5943
fix failing tests from fork/merge
2010-01-27 12:44:31 -06:00
Stephen St. Martin
07299eb60d
rename ajax_test.rb to ajax_helper_test.rb for consistency
2010-01-27 12:44:31 -06:00
Stephen St. Martin
143d0764d0
nuke what appears to be a duplicate and unused test file
2010-01-27 12:44:31 -06:00
Stephen St. Martin
62a2d5178c
cleanup some spacing
2010-01-27 12:44:31 -06:00
Stephen St. Martin
27d52e00d9
extract_remote_attributes should be a private method
2010-01-27 12:44:31 -06:00
Bob Remeika
95b77e925f
Added observe_form
2010-01-27 12:44:31 -06:00
Bob Remeika
7d34975214
Added submit_to_remote helper
2010-01-27 12:44:31 -06:00
Bob Remeika
39ec7ce6a9
Removed duplication
2010-01-27 12:44:31 -06:00
Bob Remeika
8e172f13d7
Changed data-name to data-observed on observe_field
2010-01-27 12:44:31 -06:00
Bob Remeika
261654becf
Refactored ajax helpers so they use a little bit more coherent pattern; Removed code duplication from form_remote_tag
2010-01-27 12:44:31 -06:00
Bob Remeika
dad3d09ce8
Applied Yehuda's patch; Sharing extract_object_name_for_form! between form_helper and ajax_helper; Added script_decorator helper
2010-01-27 12:44:30 -06:00
Bob Remeika
5491a663da
Changed observe_field to field_observer
2010-01-27 12:44:30 -06:00
Bob Remeika
9c12e66748
Changed data-rails-type to data-js-type
2010-01-27 12:44:30 -06:00
Bob Remeika
bd65e7f73d
Changed data-remote='true' to data-js-type='remote'
2010-01-27 12:44:30 -06:00
Bob Remeika
631537a25d
remote_form_for tests pass
2010-01-27 12:44:30 -06:00
Bob Remeika
5316e77db1
Took first stab at reimplementing form_remote_tag helpers
2010-01-27 12:44:30 -06:00
Bob Remeika
b225de9711
Added assert_data_element_json test helper for data element helpers
2010-01-27 12:44:30 -06:00
Bob Remeika
afdecbc0a8
Took another stab at observe_field. Now implementing data only helpers as script elements.
2010-01-27 12:44:30 -06:00
Bob Remeika
d383f057c0
Changed the observe field node into a div with display:none
2010-01-27 12:44:30 -06:00
Bob Remeika
25c5ddd021
ObserveFieldTest uses url_for from AjaxTestCase
2010-01-27 12:44:30 -06:00
Stefan Penner
8f97e03fb0
fixed failing tests
2010-01-27 12:44:30 -06:00
Bob Remeika
773c4929fd
Implemented a fuller stub in AjaxTestCase for url_for because link_to calls url_for on all urls passed to it. Tests that were testing different input types for the url were failing because of this.
2010-01-27 12:44:30 -06:00
Bob Remeika
23275d1b79
Added the beginnings of the observe_field helper
2010-01-27 12:44:29 -06:00
Bob Remeika
b599c4c7ee
Added observe_form
2010-01-27 12:44:29 -06:00
Bob Remeika
8c43c11a9d
Added submit_to_remote helper
2010-01-27 12:44:29 -06:00
Bob Remeika
67b73ff272
Removed duplication
2010-01-27 12:44:29 -06:00
Bob Remeika
d9765c3af5
Changed data-name to data-observed on observe_field
2010-01-27 12:44:29 -06:00
Bob Remeika
4536191d55
Refactored ajax helpers so they use a little bit more coherent pattern; Removed code duplication from form_remote_tag
2010-01-27 12:44:29 -06:00
Bob Remeika
5ced1225fa
Applied Yehuda's patch; Sharing extract_object_name_for_form! between form_helper and ajax_helper; Added script_decorator helper
2010-01-27 12:44:29 -06:00
Bob Remeika
c1ce17a5f4
Changed observe_field to field_observer
2010-01-27 12:44:29 -06:00
Bob Remeika
081e057b17
Changed data-rails-type to data-js-type
2010-01-27 12:44:29 -06:00
Bob Remeika
efb70f0f9f
Changed data-remote='true' to data-js-type='remote'
2010-01-27 12:44:29 -06:00
Bob Remeika
29811533b4
remote_form_for tests pass
2010-01-27 12:44:29 -06:00
Bob Remeika
118a720a01
Took first stab at reimplementing form_remote_tag helpers
2010-01-27 12:44:29 -06:00
Bob Remeika
0955f57915
Added assert_data_element_json test helper for data element helpers
2010-01-27 12:44:28 -06:00
Bob Remeika
6fa8f81d7d
Took another stab at observe_field. Now implementing data only helpers as script elements.
2010-01-27 12:44:28 -06:00
Bob Remeika
88e793e5e7
Changed the observe field node into a div with display:none
2010-01-27 12:44:28 -06:00
Bob Remeika
fab8b25c15
ObserveFieldTest uses url_for from AjaxTestCase
2010-01-27 12:44:28 -06:00
Stefan Penner
77fc50a08b
fixed failing tests
2010-01-27 12:44:28 -06:00
Bob Remeika
c44682f6ab
Implemented a fuller stub in AjaxTestCase for url_for because link_to calls url_for on all urls passed to it. Tests that were testing different input types for the url were failing because of this.
2010-01-27 12:44:28 -06:00
Bob Remeika
a792ee5665
Added the beginnings of the observe_field helper
2010-01-27 12:44:28 -06:00
Mikel Lindsaar
b6b3db6734
Fixed bug on HTML only emails getting set to text/plain
2010-01-28 00:24:30 +11:00
Geoff Buesing
f3caa63bcb
Update bundled TZInfo to v0.3.16
2010-01-26 20:22:29 -06:00
Geoff Buesing
1cda85d08a
Georgetown TimeZone is now mapped to "America/Guyana" instead of "America/Argentina/San_Juan" [ #1821 status:resolved]
2010-01-26 20:18:17 -06:00
Jeremy Kemper
aef76d1e71
Merge remote branch 'fxn/master'
2010-01-26 15:38:49 -08:00
Mikel Lindsaar
458b6a7fc9
Fixing mailer generators to use the right email address
2010-01-27 10:35:56 +11:00
Aaron Patterson
beda2d43d6
future proofing the sqlite3 adapter code
...
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local >
2010-01-26 15:09:11 -08:00
Xavier Noria
3c6891593d
removes now void extending.rb
2010-01-26 23:08:00 +01:00
Xavier Noria
c25ac0deee
removes Object#extended_by
2010-01-26 23:03:58 +01:00
Xavier Noria
ccec730d7f
removes unused method Object#extend_with_included_modules_from
2010-01-26 23:01:51 +01:00
Xavier Noria
7d312e54ba
deletes no void files removal.rb and class_test.rb
2010-01-26 22:57:27 +01:00
Xavier Noria
44afd785c8
removes unused method Class#remove_class
2010-01-26 22:51:44 +01:00
Xavier Noria
5f981ff029
removes unused method Class#reachable?
2010-01-26 22:49:35 +01:00
Xavier Noria
f85f5dfc8f
removes unused Class#descedents
2010-01-26 22:48:21 +01:00
Xavier Noria
245bfafe33
removes unused Object#subclasses_of
2010-01-26 22:46:47 +01:00
Xavier Noria
5b01c8bb8b
removes unused Object#remove_subclasses_of
2010-01-26 22:44:32 +01:00
Xavier Noria
1b2ac25a2f
removes unused Class#remove_subclasses
2010-01-26 22:42:56 +01:00
Xavier Noria
ec7c642f5f
removes unused method Class#subclasses
2010-01-26 22:37:55 +01:00
José Valim
6404feee50
AC railtie should configure helpers path.
2010-01-26 21:05:50 +01:00
José Valim
dc57d545bb
Fix t('.helper').
2010-01-26 20:43:35 +01:00
José Valim
9f63c4b26e
Bring AM tests back to green again.
2010-01-26 19:50:59 +01:00
José Valim
af43674c1c
Fix failing tests on AM about render(:body => Hash).
2010-01-26 19:15:32 +01:00
José Valim
bdc39fad36
Merge branch 'master' of git://github.com/rails/rails
2010-01-26 18:39:53 +01:00
Joshua Peek
31b538df64
Failing AM test for legacy multipart alternative rendering
2010-01-26 09:37:20 -06:00
José Valim
e274eb1df1
Bring layouts with proc back alive.
2010-01-26 16:34:25 +01:00
Joshua Peek
9f7190187c
Failing AM test for nested layouts
2010-01-26 09:27:54 -06:00
José Valim
48a3985dd7
Also include translation in ActionMailer.
2010-01-26 16:18:29 +01:00
José Valim
52bb455c0d
Merge branch 'master' of git://github.com/rails/rails
2010-01-26 16:05:32 +01:00
José Valim
1078677575
Merge remote branch 'mikel/master'
2010-01-26 16:00:57 +01:00
José Valim and Mikel Lindsaar
05c4ad9d3f
Tidy up tests and docs.
2010-01-26 16:00:24 +01:00
Joshua Peek
f74fbf9d32
Keep ActionController::Base.helpers_dir around for a bit longer
2010-01-26 08:52:20 -06:00
José Valim
d7de1c76ca
Add a test which ensures application can overwrite plugins/engines view paths.
2010-01-26 15:46:17 +01:00
José Valim
081dfca33a
Clean up Rails::Rack::Logger.
2010-01-26 15:37:45 +01:00
José Valim
edb8131535
Move Rails::Rack::Metal to Rails::Application::Metal and just add cascade if any metal was declared.
2010-01-26 15:27:46 +01:00
José Valim
517b35a2bb
Middleware stack actually runs routes and not the application.
2010-01-26 15:00:27 +01:00
José Valim
f8bf1982df
Add tests for explicit engines.
2010-01-26 14:58:00 +01:00
Mikel Lindsaar
ccea6ab07d
Fixing up tests and docs to use defaults :from => 'name' instead of defaults({:from => 'name'})
2010-01-27 00:38:12 +11:00
Mikel Lindsaar
1133757a95
Merge branch 'master' of github.com:mikel/rails
...
Conflicts:
actionmailer/lib/action_mailer/base.rb
2010-01-27 00:21:22 +11:00
Mikel Lindsaar
21dcc20ed2
Fixed up documentation to reflect code change and cleaned up tests of spurious #deliver calls
2010-01-27 00:18:40 +11:00
José Valim
7adb1ffc03
Remove old fixtures files.
2010-01-26 14:09:48 +01:00
Mikel Lindsaar
9520166f70
Fixed up being able to pass random headers in with headers, or mail. Also, undeprecated headers(hash) as this works now too
2010-01-27 00:06:19 +11:00
José Valim
1dca7ebc93
Refactor railties test, break huge files in smaller chunks and move initializers to application folder.
2010-01-26 13:57:11 +01:00
José Valim
e6da2f651f
Ensure app does not show up in generators.
2010-01-26 12:23:02 +01:00
José Valim
007c0bb3b0
Ensure proper class is shown on rake middleware.
2010-01-26 12:16:47 +01:00
José Valim
db99324a89
Ensure calling a method in Rails::Application does not instantiate a void application.
2010-01-26 12:16:47 +01:00
José Valim and Mikel Lindsaar
8fabcb2eca
Update generators to use new defaults.
2010-01-26 11:48:25 +01:00
José Valim and Mikel Lindsaar
39a1b06f13
Deprecate old defaults API.
2010-01-26 11:46:42 +01:00
José Valim and Mikel Lindsaar
9dd65c368b
Make defaults accept a hash.
2010-01-26 11:21:20 +01:00
Mikel Lindsaar
b8c82edc1f
Updating generators for mailer to reflect changes in API
2010-01-26 18:59:52 +11:00
Mikel Lindsaar
e297eed4f2
Fixing up expectations in base_test.rb
2010-01-26 17:11:36 +11:00
Mikel Lindsaar
0b05acd424
Implementing class level :defaults hash, instead of delivers_from et al
2010-01-26 17:08:55 +11:00
Jack Christensen
c5b652f3d2
PostgreSQLAdapter: set time_zone to UTC when Base.default_timezone == :utc so that Postgres doesn't incorrectly offset-adjust values inserted into TIMESTAMP WITH TIME ZONE columns [ #3777 state:resolved]
2010-01-25 20:57:07 -06:00
Carlhuda
64f8c87b1d
Fix AR's rake tasks to work with the Rails::Application refactor
2010-01-25 17:55:54 -08:00
José Valim
abad097016
Merge remote branch 'mikel/master'
2010-01-26 01:56:52 +01:00
José Valim and Mikel Lindsaar
c02391f8f9
Fix small typo.
2010-01-26 01:54:23 +01:00
José Valim and Mikel Lindsaar
4af2bbc6b4
Merge branch 'master' of github.com:mikel/rails
2010-01-26 01:51:23 +01:00
José Valim and Mikel Lindsaar
74a5889abe
Refactor content type setting, added tests to ensure boundary exists on multipart and fixed typo
2010-01-26 11:49:59 +11:00
José Valim and Mikel Lindsaar
6589976533
Remove old files, add some information to docs and improve test suite.
2010-01-26 01:43:41 +01:00
José Valim and Mikel Lindsaar
1b3cb54eba
More work on generated mailer templates.
2010-01-26 01:09:08 +01:00
José Valim
8974dac92e
Ensure root routes inside optional scopes works as expected.
2010-01-26 00:55:26 +01:00
José Valim
5d07869245
Ensure all initializers are collections.
2010-01-26 00:08:08 +01:00
José Valim
a89c8cb528
Merge branch 'master' of git://github.com/rails/rails
...
Conflicts:
railties/test/railties/plugin_test.rb
2010-01-25 23:44:03 +01:00
José Valim
49be3316c2
Add a deprecation for helpers_dir.
2010-01-25 23:38:47 +01:00
Joshua Peek
3086dbd8d0
Failing test for plugin init requiring another plugin lib file
2010-01-25 16:33:29 -06:00
José Valim
cc1bb8590e
Refactor some railties tests structure.
2010-01-25 23:17:39 +01:00
José Valim
02908e1142
As first step setup the load path and lazy compare middlewares.
2010-01-25 22:59:08 +01:00
José Valim
1177a40e68
Fix i18n locales order test.
2010-01-25 22:10:11 +01:00
Joshua Peek
c6104e6514
Failing test for using plugin middleware in application config
2010-01-25 12:55:30 -06:00
Joshua Peek
2d1f9fb98f
Plugins need to load before app initializers
2010-01-25 11:06:39 -06:00
José Valim and Mikel Lindsaar
f14390091c
We don't support enriched yet
2010-01-26 00:09:18 +11:00
José Valim and Mikel Lindsaar
4a6eba3232
Added initial documentation for the new API
2010-01-25 23:46:23 +11:00
José Valim and Mikel Lindsaar
9cb3ca1d29
Change mailer generator templates and refactor the whole naming schema.
2010-01-25 13:20:32 +01:00
José Valim and Mikel Lindsaar
ad8f5d4106
Updated to mail 2.1.1
2010-01-25 23:15:16 +11:00
José Valim and Mikel Lindsaar
d5e4e9185b
Updated gemspec for Mail
2010-01-25 21:47:24 +11:00
José Valim and Mikel Lindsaar
ace74974cf
Got AM working with Mail yield on delivery_handler and updated tests
2010-01-25 21:47:03 +11:00
José Valim and Mikel Lindsaar
4240369a43
changed test to get TestMailer to use :file delivery method directly (as setup action was resetting delivery_method to :test on init
2010-01-25 13:46:44 +11:00
José Valim and Mikel Lindsaar
e4a989e9d9
Added delivery_handler method to mail and implemented in ActionMailer to deliver inside of instrumentation
2010-01-25 13:39:48 +11:00
José Valim
3b6f659fb6
Add active_model/railtie back to generated boot.rb, add models back to paths, load active_support/railtie since we need it and ensure default logger is set before config.
2010-01-25 01:12:22 +01:00
José Valim and Mikel Lindsaar
e1c1318638
Added delivers_from.
2010-01-25 00:37:12 +01:00
José Valim and Mikel Lindsaar
48faf53be1
Add some view paths tests.
2010-01-25 00:20:38 +01:00
José Valim and Mikel Lindsaar
90e9e46576
Merge branch 'master' of github.com:mikel/rails
2010-01-24 23:59:29 +01:00
José Valim and Mikel Lindsaar
0ece244fee
Ensure implicit multipart templates with locale works as expected.
2010-01-24 23:59:12 +01:00
José Valim and Mikel Lindsaar
4e96442c4e
Merge branch 'master' of git://github.com/rails/rails
...
Conflicts:
actionmailer/lib/action_mailer/mail_helper.rb
railties/lib/rails/configuration.rb
2010-01-25 09:50:01 +11:00
José Valim and Mikel Lindsaar
c0262827ca
Speed up some Hash core extensions.
2010-01-24 23:40:45 +01:00
José Valim and Mikel Lindsaar
328b0b1268
Remove deprecated behavior since 2.3.
2010-01-24 23:32:09 +01:00
José Valim and Mikel Lindsaar
0361414ae3
Add uniq_by and uniq_by! to Array.
2010-01-24 23:28:52 +01:00
Rizwan Reza
396003fc48
Revamp of Rails documentation task
...
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local >
2010-01-24 13:16:38 -08:00
José Valim
6e57b88c60
Fix a couple failures on 1.9.1.
2010-01-24 21:21:37 +01:00
José Valim and Mikel Lindsaar
a74a655648
Add tests to mail helper.
2010-01-24 19:52:50 +01:00
José Valim and Mikel Lindsaar
bd96614101
Move old tests to a specific folder and add some delivery method tests.
2010-01-24 19:36:42 +01:00
José Valim and Mikel Lindsaar
99f960a3d7
Handle some TODOs and deprecations.
2010-01-24 18:40:04 +01:00
José Valim and Mikel Lindsaar
0d931fecbb
Finish cleaning up delivery methods implementation.
2010-01-24 18:11:57 +01:00
José Valim and Mikel Lindsaar
5dead5bb88
Maintain old_api and deprecated_api in different files.
2010-01-24 17:49:48 +01:00
Joshua Peek
9543298d02
Use Rails::Application ref in Rakefile and console scripts.
...
Less places you need to change if you rename your application.
2010-01-24 10:35:45 -06:00
José Valim and Mikel Lindsaar
f30d73bab4
Add new class delivery method API.
2010-01-24 17:31:18 +01:00
Joshua Peek
9212652155
Add Rails::Application pointer to the default app to add symmetry to Foo::Application
2010-01-24 10:29:38 -06:00
José Valim and Mikel Lindsaar
7409b73484
Some refactoring.
2010-01-24 16:37:28 +01:00
José Valim
6545a68264
Fix failing tests after merge.
2010-01-24 15:08:06 +01:00
José Valim
84ebfa4550
Ensure metals and initializers in plugins are loaded.
2010-01-24 14:48:00 +01:00
José Valim
dd05b6c543
Add tests for plugin sanity check.
2010-01-24 12:49:12 +01:00
José Valim
e548f96b1d
Rename plugin_name to railtie_name and engine_name.
2010-01-24 12:23:21 +01:00
José Valim
b92608770e
Ensure environment config has higher priority than application ones.
2010-01-24 12:15:46 +01:00
José Valim
37e4deb260
Ensure helpers work from configured path.
2010-01-24 12:04:37 +01:00
José Valim
e0bdc4f446
Ensure namespaced controllers in engines work.
2010-01-24 11:06:06 +01:00
José Valim and Mikel Lindsaar
73a9000402
Adding failing tests for calling just the action, instead of :create_action_name and :deliver_action_name
2010-01-24 20:38:53 +11:00
José Valim
5cd9aad4fd
Add I18n tests to engines.
2010-01-24 10:27:42 +01:00
José Valim
25724c664d
Load deprecated tasks for plugins.
2010-01-24 10:03:03 +01:00
José Valim
5b26fa4875
Make plugin generator compatible with new schema.
2010-01-24 09:42:28 +01:00
José Valim
2fde9d774b
Solve some pendencies.
2010-01-24 09:32:54 +01:00
José Valim and Mikel Lindsaar
afc758297c
Moving AS::Notifications call to one location in base
2010-01-24 12:30:13 +11:00
José Valim and Mikel Lindsaar
258ca14800
Delegated ActionMailer::Base.deliveries to Mail.deliveries, added callback support in Mail to call ActionMailer on delivery, moved deliver to deprecated API in preparation for new API
2010-01-24 11:15:42 +11:00
José Valim and Mikel Lindsaar
e7e4ed48df
Set sort order for explicit parts from the collector's template sequence
2010-01-24 09:34:50 +11:00
José Valim
d3c40242a5
Move console stuff to its own directory.
2010-01-23 23:02:43 +01:00
José Valim
f915f9e339
Merge branch 'master' into app
...
Conflicts:
railties/lib/rails/application.rb
2010-01-23 22:53:26 +01:00
José Valim
b17e358e3d
Move configuration to subfolders.
2010-01-23 22:30:17 +01:00
José Valim
788fce2550
Create configurable modules and ensure that they are added only on direct children.
2010-01-23 18:41:53 +01:00
José Valim
2b75b94ac0
Plugin is now an Engine.
2010-01-23 17:51:48 +01:00
José Valim
924fa084e8
First steps into making Plugin < Engine.
2010-01-23 17:13:25 +01:00
José Valim
13d66cdf25
Extract Railtie load from application.
2010-01-23 16:59:37 +01:00
José Valim
4f03603215
Break application.rb file in smaller chunks.
2010-01-23 16:07:20 +01:00
José Valim
80130d1201
Extract routes reloading responsibilities from application and load them just upon a request.
2010-01-23 16:06:33 +01:00
José Valim and Mikel Lindsaar
c985a0ee3d
Add some tests to collector with templates and any.
2010-01-23 12:46:40 +01:00
José Valim and Mikel Lindsaar
6ba944608e
Make implicit and explicit templates pass through the same part creation process.
2010-01-23 12:20:20 +01:00
José Valim and Mikel Lindsaar
5a19d24892
Adding collector to ActionMailer
2010-01-23 21:50:36 +11:00
José Valim and Mikel Lindsaar
c6b16260fe
Added basic explicit multipart rendering and tests
2010-01-23 21:37:34 +11:00
José Valim and Mikel Lindsaar
502028a32b
Move double render check out of AbstractController.
2010-01-23 10:29:22 +01:00
José Valim and Mikel Lindsaar
5c3ef8c17d
Refactor subject with i18n.
2010-01-23 10:24:19 +01:00
José Valim and Mikel Lindsaar
ddfc0725a0
Added AbstractController::Collector.
2010-01-23 10:23:06 +01:00
Mikel Lindsaar
1ea84c38ea
Merge branch 'master' of git://github.com/rails/rails
2010-01-23 19:45:25 +11:00
Pratik Naik
8ff2fb6f3a
Make default_scope work with Relations
2010-01-23 13:41:09 +05:30
Mikel Lindsaar
bd24c75fc6
Updated Gemspec to mail 2.0.3 from gemcutter
2010-01-23 18:45:59 +11:00
José Valim
4eab3aad8d
Ensure user set load paths have higher preference and move Bootstrap inside Application.
2010-01-23 02:03:11 +01:00
José Valim
98240c49b0
Get rid of initializers global and create i18n railtie.
2010-01-23 01:29:29 +01:00
Joshua Peek
c2e57c0bb0
I removed the rdoc task from plugin Rakefile
2010-01-22 13:56:10 -06:00
Joshua Peek
2db14457f4
Delegate App calls to instance
2010-01-22 13:56:10 -06:00
José Valim
c8cc8a9872
Moved more configuration away from bootstrap.
2010-01-22 20:44:38 +01:00
José Valim
d618b7e3dc
Ensure strings given to render with slash are rendered relative to the configured _prefix.
2010-01-22 17:58:03 +01:00
Prem Sichanugrist
cc6f16685c
Add test case for load initializers before routing behavior.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-22 17:58:03 +01:00
Xavier Noria
5c53ffe1db
Add missing require for Object#try [ #3771 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2010-01-22 22:20:00 +05:30
Joshua Peek
1a750da130
Make @controller an internal ivar in the view
2010-01-22 10:19:01 -06:00
José Valim
4ae7936727
Got tests working once again.
2010-01-22 16:24:44 +01:00
Pratik Naik
4afd9702fe
Relation should respond to class methods
2010-01-22 20:14:37 +05:30
Pratik Naik
ee8c006dac
Allow calling class methods on a Relation
2010-01-22 20:10:41 +05:30
Joshua Peek
c52820ae15
Use expand_path to require environment in metal template
2010-01-22 08:34:12 -06:00
Joshua Peek
284fd2568d
Include cascade header in metal template
2010-01-22 08:31:41 -06:00
Joshua Peek
658f9e7e44
lib is already included w/ rake test task
2010-01-22 08:29:42 -06:00
Joshua Peek
5bf5688f51
Remove rdoc task from generated plugin Rakefile
2010-01-22 08:29:07 -06:00
Joshua Peek
259f3846a9
Template whitespace
2010-01-22 08:27:05 -06:00
José Valim and Mikel Lindsaar
951397b4a2
Get implicit multipart and attachments working together.
2010-01-22 14:38:41 +01:00
José Valim and Mikel Lindsaar
1cd55928c6
First work on implicit multipart.
2010-01-22 13:56:06 +01:00
José Valim and Mikel Lindsaar
dcb9253693
Add basic template rendering to new DSL.
2010-01-22 13:27:26 +01:00
Mikel Lindsaar
6cf378aeb0
Merge branch 'master' of github.com:mikel/rails
2010-01-22 21:58:13 +11:00
José Valim and Mikel Lindsaar
b30eb39ff0
Add more tests to new API.
2010-01-22 11:57:54 +01:00
Mikel Lindsaar
1170e70797
Merge branch 'master' of github.com:mikel/rails
2010-01-22 21:10:52 +11:00
José Valim and Mikel Lindsaar
bb9d71ff9e
Move class methods to deprecated stuff.
2010-01-22 11:10:37 +01:00
José Valim and Mikel Lindsaar
343ac48f45
Moved deprecated_body.rb to deprecatead_api.rb
2010-01-22 11:01:21 +01:00
Mikel Lindsaar
6fd7d1fc12
Fixing typo in config.frameworks error
2010-01-22 19:38:50 +11:00
José Valim and Mikel Lindsaar
8a6a2ca712
Merge branch 'master' of git://github.com/rails/rails
2010-01-22 13:37:29 +11:00
José Valim and Mikel Lindsaar
c9dc1ac95b
Updating functional tests to not compare equality with encoded, Mail::Message has an == operator
2010-01-22 13:32:16 +11:00
José Valim and Mikel Lindsaar
90bbed233e
Updating deprecated_body.rb to use :content instead of :data or :body in the params hash
2010-01-22 12:51:07 +11:00
José Valim and Mikel Lindsaar
77986f6bdb
Added use of AS::Notifications for tmail_compat.rb
2010-01-22 12:49:13 +11:00
José Valim and Mikel Lindsaar
12c001fec4
Updating deprecated API to sanitize old style attachments hash to work with new mail.attachments method
2010-01-22 12:46:19 +11:00
José Valim
02c5137ead
Add view paths to Engine setup.
2010-01-22 01:10:31 +01:00
José Valim
7fcf8590e7
Massive cleanup in Railties and load stack.
2010-01-21 23:14:20 +01:00
Pratik Naik
6d30002a52
Revert "Refactoring attributes/types" [ #3348 state:open]
...
This reverts commit f936a1f100 .
Conflicts:
activerecord/lib/active_record.rb
activerecord/lib/active_record/base.rb
Revert "Fixed: #without_typecast should only disable typecasting on the duplicated attributes" [#3387 state:open]
This reverts commit 2831996483 .
Reason :
It's not generating attribute methods properly, making object.column 5x slower.
2010-01-22 02:37:07 +05:30
Pratik Naik
a68a3e9af6
Simplify finder method definitions
2010-01-21 22:29:21 +05:30
Prem Sichanugrist
2df1810cf3
Add test case for load initializers before routing behavior.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-21 17:45:21 +01:00
José Valim
fc4f237864
Make filter parameters based on request, so they can be modified for anything in the middleware stack.
2010-01-21 16:52:49 +01:00
José Valim
04063393f9
Give higher priority to rails generators.
2010-01-21 14:11:24 +01:00
Pratik Naik
da142cd865
Supplying Arel::SqlLiteral is much faster
2010-01-21 17:52:09 +05:30
José Valim
378464a2e4
Default to sync instrumentation.
2010-01-21 13:09:12 +01:00
José Valim
dcb8b64975
Add shortcut test to abstract/render_test.rb
2010-01-21 12:12:10 +01:00
José Valim
48dc1ae309
Don't let generators die if rubygems puts crap in your load path.
2010-01-21 12:10:39 +01:00
José Valim
31fddf2ace
Tidy up new filter_parameters implementation.
2010-01-21 11:57:24 +01:00
Prem Sichanugrist
b1bc3b3cd3
Add deprecation warning for calling filter_parameter_logging ActionController::Base, and allow it to be configured in config.filter_parameters
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-21 11:41:31 +01:00
Prem Sichanugrist
bd4f21fbac
Move filter_parameter_logging logic out of the controller and create ActionDispatch::ParametersFilter to handle parameter filteration instead. This will make filteration not depending on controller anymore.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-21 10:08:26 +01:00
José Valim and Mikel Lindsaar
3829f9ecfd
Adding tests for attachments['blah.rb'] = {} et al
2010-01-21 20:03:55 +11:00
José Valim and Mikel Lindsaar
fbdbac2b88
Merge branch 'master' of git://github.com/rails/rails
2010-01-21 11:42:22 +11:00
Pratik Naik
fa9f000246
Use quoted_table_name with arel.from() if no from values explicitly supplied. Arel seems to be spending a lot of time figuring out the FROM value otherwise.
2010-01-21 01:37:02 +05:30
Pratik Naik
798d2828dc
Cache quoted_table_name
2010-01-21 01:28:50 +05:30
Pratik Naik
24cc9e5b4f
Relation#spawn is basically clone + reset
2010-01-21 00:41:15 +05:30
Pratik Naik
8bdcb6f072
Always use table.* in the finder query unless specified
2010-01-21 00:40:38 +05:30
Sam Ruby
c8cba7db76
Add AD::Route#to_s
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2010-01-20 10:56:27 -06:00
Pratik Naik
459e9b29d4
Use @limit_value and @offset_value instead of calling arel
2010-01-20 22:20:56 +05:30
Pratik Naik
8d31c9f3a0
Move update and update_all to Relation
2010-01-20 22:20:56 +05:30
Joshua Peek
93956a18e4
Only send filtered_env for notifications
2010-01-20 10:07:23 -06:00
Joshua Peek
87bcf1aa15
Request#filter_parameters and filter_env
2010-01-20 09:55:58 -06:00
Pratik Naik
f7d94cdc6d
Fix AP's AR integration tests warning
2010-01-20 20:40:20 +05:30
Pratik Naik
1fb78e3ed8
Base.merge_conditions is no longer needed
2010-01-20 20:37:17 +05:30
Joshua Peek
909443eab6
Expose last controller in rack env["action_controller.instance"]
2010-01-20 09:00:23 -06:00
Santiago Pastorino
d1ffc54c06
fixes the failure of config.plugins without :all option tests [ #3718 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-20 15:02:13 +01:00
José Valim
6e26be6960
Move ActionController::Translation to AbstractController::Translation.
2010-01-20 15:02:13 +01:00
José Valim
8e2fd54b19
Bring normalize behavior to AbstractController::Rendering
2010-01-20 15:02:13 +01:00
Pratik Naik
8b9bfbe225
Dont delegate Relation#update to arel
2010-01-20 19:01:26 +05:30
José Valim and Mikel Lindsaar
d3da87ce77
Mail method accepting all headers set via the hash
2010-01-21 00:10:22 +11:00
Pratik Naik
f216fadc0e
Delegate delete_all to Relation
2010-01-20 18:33:14 +05:30
Pratik Naik
9756805676
Move destroy to Relation
2010-01-20 18:28:45 +05:30
Pratik Naik
223e2a2709
Remove Base.delete as it's same as Relation#delete
2010-01-20 18:24:36 +05:30
Pratik Naik
2493229674
Delegate exists? to Relation
2010-01-20 18:17:37 +05:30
José Valim and Mikel Lindsaar
c34cfcc29f
Created mail method for new API
2010-01-20 23:46:59 +11:00
Pratik Naik
8f0f02a166
Make Relation#destroy_all handle all the cases
2010-01-20 18:12:50 +05:30
José Valim and Mikel Lindsaar
10c509fbfa
Moved old API into deprecated_api.rb in preparation for new Rails 3 Mailer API
2010-01-20 22:26:24 +11:00
Mikel Lindsaar
8b37fee201
Merge branch 'master' of git://github.com/rails/rails
...
Conflicts:
actionmailer/lib/action_mailer/base.rb
2010-01-20 21:58:22 +11:00
Pratik Naik
8a1be22849
Use unscoped instead of with_exclusive_scope for preloading
2010-01-20 16:11:14 +05:30
Pratik Naik
5502780c69
Move array_of_strings? to Relation
2010-01-20 14:01:42 +05:30
Pratik Naik
394c05ed82
Remove stale methods constructing joins
2010-01-20 13:24:53 +05:30
Yehuda Katz
1a50d2e66a
Stop overriding LoadError.new to return a MissingSourceError (and sometimes nil!)
2010-01-19 22:35:26 -08:00
Joshua Peek
5ebfa62427
Revert streaming params parser support.
...
AS Xml and Json parsers expect the request body to be a real IO object
supporting methods like getc or ungetc which are not specified by the
Rack spec and aren't supported by Passenger or the Rewindable input
wrapper.
We can restore functionality if the AS parsers are rewritten to support
Racks subset of supported IO methods.
2010-01-19 22:56:38 -06:00
Joshua Peek
a5d06d05fb
Cleanup middleware introspection output
2010-01-19 22:56:37 -06:00
Mikel Lindsaar
c04baed627
Fixing failing test on sendmail expectation
2010-01-20 14:12:17 +11:00
Mikel Lindsaar
2a3ec5fee4
Updating gemspec to 2.0.1 for mail
2010-01-20 14:12:05 +11:00
Pratik Naik
565b4cd3e0
Scope#find is no longer needed now that Relation#find handles all the cases
2010-01-20 03:40:37 +05:30
Pratik Naik
52ec4311f5
Delegate all finders to Relation
2010-01-20 03:35:25 +05:30
Pratik Naik
74e3539cda
Ignore order for simple calculations to make postgresql happy
2010-01-20 02:17:49 +05:30
José Valim
848d6cd46b
Mail should log when raise_delivery_methods is false.
2010-01-19 21:34:59 +01:00
Pratik Naik
d8c30723aa
Named scopes dont need count() now that Relation#count handles all the cases
2010-01-20 01:35:20 +05:30
Pratik Naik
1b78a3f8d5
with_scope no longer needs :reverse_merge
2010-01-20 01:29:18 +05:30
Pratik Naik
42553a98ea
Remove find_with_associations and related code from associations now that Relation handles that stuff
2010-01-20 01:20:20 +05:30
Prem Sichanugrist
6e62e89737
Fix bug that causes TimeZone.seconds_to_utc_offset to returns wrong offset when hour < 0 and not in hundreds [ #3741 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-19 20:31:33 +01:00
José Valim
d2759d125a
Avoid load tasks from plugins recursively (so stuff in tests or vendor does not get loaded).
2010-01-19 20:07:50 +01:00
José Valim
4ca9765088
Allow railties to specify generators paths.
2010-01-19 19:59:08 +01:00
Pratik Naik
9acf0af544
Remove Relation#where_clause
2010-01-19 23:11:54 +05:30
Pratik Naik
dbce07b81d
Give preference to to_a over arel from Relation#method_missing
2010-01-19 22:52:08 +05:30
Pratik Naik
9465b84b54
Rename CalculationMethods to Calculations and get rid of the old Calculations module
2010-01-19 22:17:33 +05:30
Pratik Naik
8f63dcb648
Move the only remaining calculation method calculate() to Relation
2010-01-19 22:17:33 +05:30
José Valim
fef5afa962
Get rid of RAILS_ROOT deprecation on AM::TestCase.
2010-01-19 16:13:27 +01:00
José Valim
e8e8da5c85
Logging thread should not die on logging errors.
2010-01-19 16:13:27 +01:00
Pratik Naik
ec63fdcff3
Get rid of construct_count_options_from_args
2010-01-19 20:43:03 +05:30
Pratik Naik
73b179eb68
Delegate count to Relation
2010-01-19 20:37:12 +05:30
Joshua Peek
88ffba2329
Disable ShowExceptions during integration tests
2010-01-19 09:06:21 -06:00
José Valim
a8e25a518a
Move parameters to the top on logging.
2010-01-19 15:35:24 +01:00
José Valim
5a81dbf489
Fix failing test.
2010-01-19 15:35:23 +01:00
José Valim
4e2852a487
Do not send rack.input or any other rack information to AD listeners.
2010-01-19 15:35:23 +01:00
José Valim
e10f51b6b7
Refactor delivery methods.
2010-01-19 15:34:58 +01:00
Joshua Peek
bec5356f25
Define named routes for other non-GET REST actions
2010-01-19 08:23:23 -06:00
José Valim
f32e3aff5f
Merge branch 'master' of git://github.com/rails/rails
2010-01-19 14:29:11 +01:00
José Valim
c1848f9736
Get all tests passing.
2010-01-19 14:28:04 +01:00
Mikel Lindsaar
c8e2998701
First pass on fixing delivery method
2010-01-19 23:36:49 +11:00
Pratik Naik
9c7c7104f6
Fix the named scope equality check
2010-01-19 17:45:48 +05:30
Mikel Lindsaar
d201d39437
latest updates
2010-01-19 23:09:46 +11:00
Pratik Naik
4148c686ec
Delegate :average, :minimum, :maximum, :sum to Relation
2010-01-19 15:50:47 +05:30
Mikel Lindsaar
2107921000
Merge branch 'master' of git://github.com/rails/rails into rails
2010-01-19 21:05:37 +11:00
Pratik Naik
ed8501ef16
Fix DoubleRenderError error message
2010-01-19 15:23:56 +05:30
Pratik Naik
b9599502c9
Add Relation#construct_relation_for_association_calculations for calculations with includes
2010-01-19 15:22:09 +05:30
Joshua Peek
71d67fc6bd
Prettier hash dump
2010-01-18 21:22:09 -06:00
Joshua Peek
5579de5bab
Show Rack env dump on exception page
2010-01-18 21:12:17 -06:00
José Valim
f00cbf7872
Bring render_message back for 2.3 compatibility.
2010-01-19 01:36:07 +01:00
José Valim
a0374582ff
Bring body(Hash) behavior back.
2010-01-19 01:36:07 +01:00
José Valim
c7255386cd
script/generate mailer Notifier will now create a mailer at app/mailers.
2010-01-19 01:36:06 +01:00
José Valim
a18dd52d58
Get generators tests running on Ruby 1.9.1
2010-01-19 01:36:06 +01:00
José Valim
93d64dfefc
Improve script/generate help.
2010-01-19 01:36:06 +01:00
José Valim
e1029be1eb
Since Rails will require Ruby >= 1.8.7, we can rely on instance_exec.
2010-01-19 01:36:06 +01:00
Pratik Naik
e6a68a5cc3
Add Relation#find_with_associations to load relation with eager loaded associations
2010-01-19 04:42:19 +05:30
Joshua Peek
f2693cda44
Install plugin view paths into AM view load path
2010-01-18 16:48:04 -06:00
Joshua Peek
59cd044310
Add all folders in app/* to the load path
2010-01-18 15:37:58 -06:00
Pratik Naik
9e7ec2a9f1
Simplify calculation scope building. Remove :order from associations as it is troublesome w/ calculation methods using postgresql.
2010-01-18 23:40:42 +05:30
Pratik Naik
3c4186b366
Remove construct_calculation_arel_with_included_associations because it's same as construct_finder_arel_with_included_associations
2010-01-18 23:40:42 +05:30
Pratik Naik
893524382a
No need to pass current_scoped_methods to construct_calculation_arel everytime
2010-01-18 23:40:42 +05:30
José Valim
728db5a932
Rake tasks should load generators from new paths.
2010-01-18 18:22:55 +01:00
Joshua Peek
68b76a38eb
Cleanup deprecation notices.
2010-01-18 09:49:38 -06:00
Paco Guzman
e27bfad6a5
Forgot to change named_scope to scope in an ArgumentError raise exception for duplication scopes related to commit d60bb0a9e4 [ #3736 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-18 16:36:08 +01:00
José Valim
a2b76d1dde
Improve generators help.
2010-01-18 16:21:11 +01:00
José Valim
61f77b1dcd
More cleaning up on rails generators load path.
2010-01-18 16:21:11 +01:00
José Valim
9fffdc5cdb
Generators load path now will be Ruby load path. If you want to use rspec:install generator, you need generators/rspec/install_generator in your load path.
2010-01-18 16:21:11 +01:00
José Valim
e75ea47434
Automatically remove :generators: from namespaces.
2010-01-18 16:21:10 +01:00
José Valim
a2e2e73c5e
Ensure generators can be invoked by their shortcut and remove attr_reader tasks.
2010-01-18 16:21:10 +01:00
Pratik Naik
4c00c65c58
Simplify construct_finder_arel_* methods
2010-01-18 19:40:23 +05:30
Pratik Naik
2a2bc8e84a
Handle invalid query IN() generated when a blank array is supplied in hash conditions
2010-01-18 18:56:55 +05:30
Pratik Naik
8bb5274648
Get rid of Relation#order_clauses
2010-01-18 18:56:55 +05:30
Pratik Naik
8ba2902dd4
Fix the named_scope deprecation notice
2010-01-18 18:56:55 +05:30
José Valim
40c4a0036a
Ensure deprecated validate methods are invoked when they are private [ #3214 status:resolved]
2010-01-18 09:56:36 +01:00
Damien Mathieu
38c2e4687f
Missing rename from named_scope to scope [ #3735 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-18 09:33:36 +01:00
Joshua Peek
c29bb8857e
Clear out AS callback method pollution in AC::Base.action_methods
2010-01-17 22:06:28 -06:00
Joshua Peek
58fe3295fe
Base#action_methods delegates to Base.action_methods
2010-01-17 21:51:07 -06:00
Joshua Peek
eeba755a11
Accessing nonexistant cookies through the signed jar should not raise an
...
exception
2010-01-17 21:31:06 -06:00
Pratik Naik
6ce538d485
Add missing CHANGELOG entry about relations as scopes
2010-01-18 04:42:04 +05:30
Pratik Naik
d60bb0a9e4
Rename named_scope to scope
2010-01-18 04:38:19 +05:30
Pratik Naik
e1d507c7fb
Dont check for class equaity when merging relations
2010-01-18 04:28:21 +05:30
Pratik Naik
88de6b2de2
Inherit named scope class Scope from Relation
2010-01-18 04:24:24 +05:30
Pratik Naik
c6850d8361
Ensure that Scope#proxy_scope is always klass. Rename proxy_scope to klass too.
2010-01-18 00:03:18 +05:30
Pratik Naik
dca3de3bc7
Make relations work as scopes
2010-01-17 23:22:11 +05:30
Pratik Naik
f0cde5be54
Make sure named_scope names are not used as method names already
2010-01-17 21:34:41 +05:30
Sam Elliott and Santiago Pastorino
5a6596787b
Module lookup issue on flash_test using ruby 1.9 solved [ #3716 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-17 16:57:14 +01:00
Prem Sichanugrist
eb67532bc1
Make local_request? to returns true when facing ::1 IPv6 address [ #3257 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-17 16:56:54 +01:00
Rizwan Reza
a0dc6cc70b
Fix RAILS_ROOT deprecation on guides generation. [ #3710 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-17 16:28:31 +01:00
José Valim
44a10a2440
Fix resources_path_names branch which was sending an array as entity. [ #3715 status:resolved]
2010-01-17 16:18:14 +01:00
José Valim
58136e1bd3
Plugin generator should use templates.
2010-01-17 15:17:50 +01:00
Rizwan Reza
e3898bda9c
Take --skip-activerecord into account boot.rb requires. [ #3711 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-17 14:55:11 +01:00
Rizwan Reza
cf109342a7
Fixes rake:template task [ #3714 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-17 14:54:49 +01:00
Santiago Pastorino
8268d68b50
mail.create_path returns an array test fixed [ #3712 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-17 14:54:06 +01:00
Samuel Elliott
31ea83eb89
Adding Proc support to validation messages so that they can become a little more dynamic, allowing for customisations during the request [ #3514 status:resolved].
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-17 14:40:10 +01:00
José Valim
c0d31ca41b
save(false) is gone, use save(:validate => false) instead.
2010-01-17 14:22:34 +01:00
Mikel Lindsaar
ccb7d9def3
Fixing up base to refactor settings
2010-01-17 23:27:59 +11:00
José Valim
020e656447
Move middleware builder back to Rails::Rack::Metal without losing the new behavior.
2010-01-17 13:23:38 +01:00
José Valim
27d9836ad3
Add ActionDispatch::Railties::Subscriber and finish tidying up the logging.
2010-01-17 12:43:17 +01:00
José Valim
61ada28ed3
Get rid of prepare_each_request, since now it's a middleware initialization parameter.
2010-01-17 11:44:04 +01:00
José Valim
8f5e733998
Add notifications to default middleware stack and update subscriber tests.
2010-01-17 11:35:48 +01:00
José Valim
0334f9f6cf
Add ActionDispatch::Notifications middleware.
2010-01-17 11:29:51 +01:00
Mikel Lindsaar
9a3a0d15fc
Updating mail require to 2.0.0
2010-01-17 21:02:38 +11:00
José Valim
afd0c06dfa
Validates needs hash slice.
2010-01-17 09:57:16 +01:00
José Valim
645832cfdd
Clean up filter parameter logging tests.
2010-01-17 09:54:24 +01:00
Pratik Naik
54a043895f
Make merging of order values consistent
2010-01-17 14:19:41 +05:30
Joshua Peek
f9a4300415
debug helper output should not be sanitized
2010-01-16 21:43:03 -06:00
Joshua Peek
eb39d0f7b9
Use backtrace cleaner for dev mode exception page
2010-01-16 21:34:35 -06:00
Joshua Peek
d2d4acf027
Cookies middleware
2010-01-16 17:22:27 -06:00
Pratik Naik
8d87c80c19
Make Relation#reload force load the records immediately
2010-01-17 04:25:59 +05:30
Pratik Naik
7921a73acd
Use relations to build scope for named scopes
2010-01-17 04:20:11 +05:30
Pratik Naik
b8b6621acb
Simplify Model.scoped definition
2010-01-17 03:54:52 +05:30
Joshua Peek
603d4fbacd
Build middleware stack and reload routes after app initializers run
...
[#3709 state:resolved]
2010-01-16 16:15:32 -06:00
Pratik Naik
dba196cb7f
Merge docrails
2010-01-17 03:26:20 +05:30
Pratik Naik
6e3bee6cf1
Cache Model.arel_table
2010-01-17 03:14:17 +05:30
Pratik Naik
6806483b91
Use arel_table[] instead of unscoped[] to get arel attribute
2010-01-17 03:10:07 +05:30
Pratik Naik
0ab30637dd
Revert "Fix #microseconds conversion and #fast_string_to_time"
...
This reverts commit 717a2941e1 . Bunch of failures when running postgresql tests.
2010-01-17 03:04:11 +05:30
Pratik Naik
cd90dcb1bd
Rename Model.active_relation to Model.unscoped
2010-01-17 03:00:56 +05:30
Joshua Peek
e9a1dbe79a
Allow custom controller for resource(s) [ #3703 state:resolved]
2010-01-16 15:16:22 -06:00
Pratik Naik
468cfcedd3
Improve the error message for class mismatch on Relation#merge
2010-01-17 02:08:42 +05:30
Pratik Naik
7f8d4d3c4e
Get rid of Base#merge_includes
2010-01-16 23:59:57 +05:30
Ryan Bigg
e17b23db01
Make guides generation work for Ruby 1.9.x
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2010-01-16 23:25:16 +05:30
Ryan Bigg
0fc6418e75
Mark title and headers as html_safe! for guides [ #3702 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2010-01-16 23:24:38 +05:30
Pratik Naik
07e41a8361
No need to set @arel_engine to nil twice. Committed by mistake in 3968825f
2010-01-16 23:17:14 +05:30
Pratik Naik
3968825f5f
Make sure Model#active_relation always adds STI conditions if needed
2010-01-16 23:11:35 +05:30
Pratik Naik
cfdfd89926
Use new finder methods for association preloading
2010-01-16 22:14:10 +05:30
Pratik Naik
f80be3ea0f
Use Relation#apply_finder_options from calculations
2010-01-16 22:05:01 +05:30
Pratik Naik
61e831564a
Add Relation#apply_finder_options for applying old finder options
2010-01-16 21:21:20 +05:30
Sam Granieri
488b4c8c5c
Make script/dbconsole work again [ #3690 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2010-01-16 20:55:22 +05:30
José Valim
92f49b5f1e
Split ActionDispatch http in smaller chunks.
2010-01-16 15:45:07 +01:00
Mikel Lindsaar
03c1457eb5
Removed autoload of DeliveryMethods
2010-01-16 14:02:55 +01:00
Mikel Lindsaar
0750304c01
Migrated over to Mail doing delivery.
2010-01-16 14:02:55 +01:00
Mikel Lindsaar
5b0c8a1266
Removing internal delivery agents
2010-01-16 14:02:55 +01:00
Pratik Naik
5a52523a80
Rename active_relation_engine -> arel_engine and active_relation_table -> arel_table
2010-01-16 16:02:30 +05:30
Chris Hapgood
717a2941e1
Fix #microseconds conversion and #fast_string_to_time
...
* Use direct integer parsing in #fast_string_to_time to avoid convoluted
conversions and errors due to truncation.
* Use Float#round in #microseconds to avoid truncation errors.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2010-01-16 15:21:36 +13:00
Pratik Naik
81cd11259c
Remove protected method Class#scoped?
2010-01-16 04:38:16 +05:30
Pratik Naik
2d0bc08a7e
Make type_condition return Arel predicate and not a string condition
2010-01-16 04:21:18 +05:30
Pratik Naik
99dd107760
Remove unused default_select
2010-01-16 04:21:18 +05:30
José Valim
b3c87746ef
Move I18n to gemspec and update dependencies.
2010-01-15 23:48:38 +01:00
José Valim
5a5760828b
Add tests for simple match with namespace.
2010-01-15 23:36:03 +01:00
José Valim
13d76b6170
Add some implicit path tests to Subscriber.
2010-01-15 23:36:03 +01:00
Joshua Peek
b2578a148c
Fix singleton resource named routes
2010-01-15 16:31:00 -06:00
Pratik Naik
2ee130abec
Remove scope related code from construct_join
2010-01-16 03:51:10 +05:30
Joshua Peek
89082004b0
Fix const reference for SessionRestoreError
2010-01-15 16:20:12 -06:00
Joshua Peek
6437eb9f35
Always join scoped paths with slashes
2010-01-15 16:13:01 -06:00
Joshua Peek
576b8dda52
Cleanup internal resource macro to use method helper shorthand
2010-01-15 16:13:01 -06:00
Pratik Naik
21ce8eac9b
Remove stale construct_* methods
2010-01-16 03:37:04 +05:30
Pratik Naik
951e485b88
Remove construct_conditions
2010-01-16 02:56:13 +05:30
Pratik Naik
6c997c3c39
Simplify Model.delete_all
2010-01-16 02:38:19 +05:30
Pratik Naik
c5f3811a49
Model.delete should just use scoped.delete
2010-01-16 02:35:53 +05:30
Joshua Peek
184ef28f55
Routing method shorthand shouldn't clobber :to options
2010-01-15 14:55:13 -06:00
Joshua Peek
ead93c5be5
Move Flash into middleware
2010-01-15 14:55:13 -06:00
Pratik Naik
3da29f647b
Remove AR#scope() method
2010-01-16 01:42:01 +05:30
Joshua Peek
3eaf525213
Make HEAD method masquerade as GET so requests are routed correctly
2010-01-15 12:38:50 -06:00
Pratik Naik
43a84a054f
Fix the query matching in SubscriberTest
2010-01-16 00:02:46 +05:30
Pratik Naik
bed9179aa1
Make scopes use relations under the hood
2010-01-16 00:02:46 +05:30
José Valim
1c30ec23fe
In heterogeneous collections, neither the @path nor the @template are available, so we need to tell that we are simply rendering a collection.
2010-01-15 17:43:45 +01:00
José Valim
a0cdfdc771
Allow f.submit to be localized per object.
2010-01-15 16:10:19 +01:00
José Valim
e5a2a9fced
Remove URI object from ActiveResource notification, send the :mailer class in AM (like in AP#process_action) and remove locale instrumentation.
2010-01-15 15:57:33 +01:00
José Valim
4598d88749
Ensure log is flushed and tailed on failures.
2010-01-15 14:16:52 +01:00
José Valim
5252f5c1c9
Bundle automatically if --dev or --edge is given as option.
2010-01-15 13:39:56 +01:00
José Valim
c905fce35f
Add message_id to AM payload and don't send bcc and cc if they were not sent.
2010-01-15 13:17:56 +01:00
José Valim
a5a9156b4e
Template rendering should include layout time.
2010-01-15 12:24:32 +01:00
José Valim
6487d2871c
Fix an issue where log was not being tailed in the first request.
2010-01-15 12:24:31 +01:00
José Valim
88dd60298e
Do not send the whole controller in notifications, cherry pick required pieces.
2010-01-15 12:24:31 +01:00
José Valim
704daad762
Ensure we just send Ruby Stdlib objects in ActionMailer notifications.
2010-01-15 12:24:31 +01:00
José Valim
6932f6751e
ActiveRecord should give the connection id as payload, and not the whole connection.
2010-01-15 12:24:31 +01:00
José Valim
7f4d8e3fbd
Yield the payload notifications for further modification (like adding the result).
2010-01-15 12:24:31 +01:00
José Valim
b0994be5bd
LogTailer should be invoked after all logs in threads were flushed.
2010-01-15 12:24:31 +01:00
José Valim
b4019d5080
Rails::Subscriber is now responsible for flushing all loggers it's responsible for.
2010-01-15 12:24:31 +01:00
José Valim
8b9bff9557
Small tweaks in ActionController subscriber messages format.
2010-01-15 12:24:31 +01:00
José Valim
8c8942ed4f
Move Dispatcher setup to Railties and add instrumentation hook.
2010-01-15 12:24:30 +01:00
Joshua Peek
5a8e7287c5
Set a good example, no system ignores in project ignore file
2010-01-13 20:26:01 -06:00
Joshua Peek
be968ecd8b
Respect resources_path_names and :path_names options in new dsl
2010-01-13 20:26:01 -06:00
Joshua Peek
0f51e45307
optimise_named_routes is unnecessary
2010-01-13 20:22:53 -06:00
José Valim
9038a4af35
Add documentation to f.submit and make scaffold generators use the new shortcut.
2010-01-14 02:02:07 +01:00
José Valim
363545aa20
Different nested validations should not be ignore [ #3638 status:resolved]
2010-01-14 01:46:27 +01:00
José Valim
35933822de
Ensure optional path scopes are properly handled.
2010-01-14 01:31:17 +01:00
Stephen Celis
2835ec6134
Custom 'type' attribute support for text_field. [ #3646 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-14 01:07:04 +01:00
José Valim
214b548485
Make check boxes accept :multiple as option so they can handle collections (such as HABTM).
2010-01-14 01:07:03 +01:00
José Valim
d50bf47b00
Call :to_model before working with the object.
2010-01-14 01:07:03 +01:00
Carlos Antonio da Silva
8e0208f650
Add possibility to use i18n translatios in submit FormHelper.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-14 01:07:03 +01:00
José Valim
f921ad5c97
Tidy up ActiveRecord and Views runtime information on process action logger.
2010-01-14 01:07:03 +01:00
José Valim
116df09c3e
Add notifications to ActiveResource.
2010-01-14 01:07:03 +01:00
José Valim
7c3573f327
Add instrument! to notifications which adds the result to the payload.
2010-01-14 01:07:03 +01:00
José Valim
2a6bc1263e
Add subscriber to ActionMailer.
2010-01-14 01:07:03 +01:00
Joshua Peek
d01716731b
Add router support for resources :only and :except actions
2010-01-13 17:23:14 -06:00
Joshua Peek
5d787590f2
Cool this routing test passes now
2010-01-13 16:42:47 -06:00
Joshua Peek
bf9b81e2cb
Pass :as to resources to change the resource name
2010-01-13 12:18:06 -06:00
Joshua Peek
521ef3c40f
Passing in a crud action overloads the default action instead of creating a
...
new member action.
2010-01-13 11:45:27 -06:00
José Valim
01839834fd
ControllerRuntime tests also use Rails::Subscriber::TestHelper.
2010-01-13 01:19:24 +01:00
José Valim
b0d35ad00c
Test fragment/page cache and send data/file notifications.
2010-01-13 01:19:24 +01:00
José Valim
da5978c223
Add subscriber for ActionPack and move all logging inside it.
2010-01-13 01:19:23 +01:00
José Valim
8d78a82d79
Deprecate ActiveRecord::Base.colorize_logging.
2010-01-13 01:19:23 +01:00
José Valim
743cafb7f4
Create Rails::Subscriber::TestHelper and use it to make ActiveRecord subscriber tests run in both sync and async scenarios.
2010-01-13 01:19:23 +01:00
José Valim
dc2e291a93
Move AR logging responsibilities to ActiveRecord::Railties::Subscriber.
2010-01-13 01:19:23 +01:00
José Valim
fe3ceabeed
Set up subscriber on initialization.
2010-01-13 01:19:23 +01:00
José Valim
7f25ccf38d
Remove allow_concurrency and verification_timeout from ActiveRecord::Base (deprecated since 2.2).
2010-01-13 01:19:23 +01:00
José Valim
c464271e03
Get rid of old rails_info_controller.rb
2010-01-13 01:19:22 +01:00
José Valim
1a275730b2
Set deprecation warnings for RAILS_ENV and RAILS_DEFAULT_LOGGER.
2010-01-13 01:19:22 +01:00
José Valim
9dd4c79d61
Allow to add subscribers through Railtie.
2010-01-13 01:19:22 +01:00
José Valim
4704af763f
Do not send notifications when instrumentation raise an error.
2010-01-13 01:19:22 +01:00
José Valim
1e12dc04cb
Stub initial Rails::Subscriber implementation.
2010-01-13 01:19:22 +01:00
José Valim
5f34bd61b0
As the other constants, RAILS_DEFAULT_LOGGER no more.
2010-01-13 01:19:22 +01:00
José Valim
c4e3344a26
Revert "Add a generator_paths config option"
...
This reverts commit 8665c754cb .
2010-01-13 01:19:22 +01:00
José Valim
a5c45e69d9
Remove old bundler version from vendor.
2010-01-13 01:19:22 +01:00
Chad Woolley
b9a7ec6db5
reduce max size of fixture IDs to fix sqlite2 tests, because sqlite2 was getting negative and changing values for ID field. See http://www.sqlite.org/datatypes.html
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2010-01-12 11:01:49 -08:00
Pratik Naik
006519d2c9
Use Relation#except for reversing the order
2010-01-12 22:55:57 +05:30
Pratik Naik
4938a5746d
Ensure using proper engine for Arel::Table
2010-01-12 22:37:26 +05:30
Pratik Naik
a04486dc99
Delay building arel relation as long as possible for improved introspection
2010-01-12 22:25:55 +05:30
José Valim
b078f7fd39
Fix typos and add tests to ensure they will be caught the next time.
2010-01-11 23:38:35 +01:00
José Valim
cccb998800
Expose connections available in the connection pool.
2010-01-11 23:38:18 +01:00
José Valim
d382e93d8f
Improve ActionPack logger output.
2010-01-11 23:38:17 +01:00
David Heinemeier Hansson
8cb594a2e1
Get everyone running on Rails.env and fix the broken environment settings for script/console and script/dbconsole
2010-01-11 14:01:28 -08:00
José Valim
a9eebde856
Merge branch 'master' of git://github.com/rails/rails
2010-01-11 15:18:24 +01:00
José Valim
c1239e6509
Send the connection in AR notifications to avoid checking out new connections in threads just for logging purposes.
2010-01-11 15:14:52 +01:00
José Valim
0a8004efd2
Provide useful information when instrumenting partials.
2010-01-11 10:21:15 +01:00
Joshua Peek
02bbde4e78
Cleanup junk metal and revise API
...
API Change: Returning a "X-Cascade: pass" header triggers the cascade
instead of a 404 response.
2010-01-10 23:09:10 -06:00
Joshua Peek
3921586091
Rewrite Metal tests
2010-01-10 22:33:34 -06:00
David Heinemeier Hansson
2c2b84f93c
Javascript tests expects the old default of escaping HTML, make it so for now
2010-01-10 18:25:17 -08:00
David Heinemeier Hansson
5ddc597066
Use safe_concat instead of trying to html_safe! what might be a frozen string
2010-01-10 18:13:43 -08:00
José Valim
d2e7c1b97d
Raise an error if respond_with is invoked and no format is declared.
2010-01-10 20:21:08 +01:00
José Valim
8d72ba51ba
Ensure nested namespaces work as expected.
2010-01-10 18:42:45 +01:00
Joao Carlos
36969c6ecd
Fixes namespaced routes [ #3673 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-10 12:49:31 +01:00
David Heinemeier Hansson
d2c4a93c69
Have to remove the environment name from ARGV or IRB will freak out
2010-01-09 09:52:16 -08:00
Yehuda Katz
8665c754cb
Add a generator_paths config option
2010-01-09 11:04:06 -06:00
José Valim
7e6530b170
Merge remote branch 'eloy/master'
2010-01-09 00:23:29 +01:00
José Valim
017f5d5308
Fix typo by renaming :genre to :gender.
2010-01-09 00:18:07 +01:00
José Valim
93898b389b
Ensure new validates works with uniqueness validator.
2010-01-08 23:50:31 +01:00
David Heinemeier Hansson
d4589e96ef
Fixed that PrototypeHelper#update_page should return html_safe [DHH]
2010-01-08 13:46:30 -08:00
Jeffrey Hardy
652d1c19ea
Allow AR::Schema's migrations_path to be overwritten by subclasses. Defaults to 'db/migrate'
...
[#3671 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-01-08 13:08:23 -08:00
Eloy Duran
7f775ef1a9
Renamed AssociationReflection #collection_association? to #collection?.
2010-01-08 21:47:17 +01:00
Eloy Duran
f2aacd5140
Rollback the transaction when one of the autosave associations fails to save. [ #3391 state:resolved]
2010-01-08 21:45:02 +01:00
Lawrence Pit
5193fe9dd7
Exclude unchanged records from the collection being considered for autosave. [ #2578 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2010-01-08 21:45:02 +01:00
Bryan Stearns
1080351437
Add failing test that triggers the stack overflow
2010-01-08 21:45:02 +01:00
José Valim
802b08da00
Mailer should give self as payload because it contains all the information needed (as the template rendered and the mailer name).
2010-01-08 21:36:04 +01:00
José Valim
7045c4c279
Allow validates to map some types to specific options. So now you can do:
...
validates :email, :presence => true, :format => /@/
validates :genre, :inclusion => %w(m f)
validates :password, :length => 6..20
2010-01-08 21:36:04 +01:00
José Valim
fa14d6d51e
Compile length validator options still at the class level, so whenever the validator is called, it just needs to check for :maximum, :minimum and :is values.
2010-01-08 21:36:04 +01:00
David Heinemeier Hansson
188d52165b
Fixed that much of DateHelper wouldn't return html_safe? strings [DHH]
2010-01-08 11:49:12 -08:00
David Heinemeier Hansson
5ea130943e
Fixed that fragment caching should return a cache hit as html_safe (or it would all just get escaped) [DHH]
2010-01-07 17:45:32 -08:00
Mikel Lindsaar
1ddf17dff0
Return-Path per RFC needs '<' and '>' around the addr_spec
2010-01-08 12:17:12 +11:00
Jeremy Kemper
8087d51842
Liberalize picky test
2010-01-07 17:08:02 -08:00
Jeremy Kemper
1ca9c26301
Merge remote branch 'mikel/master'
2010-01-07 16:59:23 -08:00
Jeremy Kemper
ee85f15453
Qualify constant lookup in BasicObject
2010-01-07 16:43:25 -08:00
Mikel Lindsaar
82407f94aa
Merge branch 'master' of github.com:mikel/rails
...
Conflicts:
actionmailer/actionmailer.gemspec
actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb
2010-01-08 11:17:04 +11:00
Mikel Lindsaar
e2aa6712a1
Updating mail require
2010-01-08 11:13:46 +11:00
Jeremy Kemper
4300f94533
Revert "Remove connection method definition, since it's called just once."
...
Restore the connection method which was added so it can be overridden.
This reverts commit e428c75d2b .
2010-01-07 13:30:51 -08:00
José Valim
3022ce4f72
No more hacks to ensure generators are executed inside Rails.root.
2010-01-07 21:24:50 +01:00
José Valim
ccc9f0b7de
Ensure application names are not singularized.
2010-01-07 21:09:32 +01:00
Joshua Peek
8fe66f1af0
Run railtie and plugin initializers before app specific ones
2010-01-07 14:01:34 -06:00
José Valim
19e7c524d2
Ensure config/application.rb also uses app_const instead of app_name.classify.
2010-01-07 20:59:26 +01:00
José Valim
423e2acbb7
Merge remote branch 'eloy/master'
2010-01-07 20:13:07 +01:00
José Valim
47a5fd4c4b
Allow :if, :unless, :on, :allow_nil and :allow_blank as shared options in validates.
2010-01-07 19:23:59 +01:00
jamie
0a79eb7889
Add validates method as shortcut to setup validators for a given set of attributes:
...
class Person < ActiveRecord::Base
include MyValidators
validates :name, :presence => true, :uniqueness => true, :length => { :maximum => 100 }
validates :email, :presence => true, :email => true
end
[#3058 status:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-07 19:23:59 +01:00
Jeffrey Hardy
2dcc53bdbc
Remove stray semicolon from cookie_verification_secret initialzer template
2010-01-07 11:51:54 -05:00
Jeffrey Hardy
f8352ec255
Align assignments in the session_store initializer template
2010-01-07 11:46:55 -05:00
José Valim
3b631df101
Ensure that segments in default_url_options also work with format specified.
2010-01-07 17:17:06 +01:00
José Valim
f149eb19d4
From now on, parameters defined in default_url_options can be absent from named routes.
...
This allows the following setup to work:
# app/controllers/application_controller.rb
class ApplicationController
def default_url_options(options=nil)
{ :locale => I18n.locale }
end
end
# From your views and controllers:
I18n.locale #=> :en
users_url #=> "/en/users"
users_url(:pl) #=> "/pl/users"
user_url(1) #=> "/en/users/1"
user_url(:pl, 1) #=> "/pl/users/1"
user_url(1, :locale => :pl) #=> "/pl/users/1"
If you provide all expected parameters, it still works as previously.
But if any parameter is missing, it tries to assign all possible ones
with the hash returned in default_url_options or the one passed straight
to the named route method.
Beware that default_url_options in ApplicationController is not shared
with ActionMailer, so you are required to always give the locale in your
email views.
2010-01-07 15:34:14 +01:00
José Valim
f564f947d9
Remove duplicated url_for code and move methods shared between ActionMailer and ActionController up to AbstractController.
2010-01-07 15:31:50 +01:00
José Valim
598456b68b
Updated the documentation for helpers.label.
2010-01-07 15:31:50 +01:00
José Valim
a25ef06956
Allow to specify default attributes names translation in I18n yml files.
...
For example, you could easily specify :created_at and :updated_at translations as:
en:
attributes:
created_at: "Created at"
updated_at: "Updated at"
This configuration is built on ActiveModel, so it means those translations are
shared between different ORMs as well (but always as a fallback).
2010-01-07 15:31:50 +01:00
José Valim
b0572ab2b6
Be sure to dup load paths before clearing the array.
2010-01-07 15:31:50 +01:00
José Valim
c68cc49dcd
Use helpers.label instead of views.labels.
2010-01-07 15:31:50 +01:00
José Valim
a091e2e4f6
errors in ActionView should not be namespaced as well.
2010-01-07 15:31:50 +01:00
José Valim
821a160a49
Add a deprecation message to activerecord.errors.
2010-01-07 15:31:49 +01:00
José Valim
190ce3ab37
Errors messages are now moved from :activerecord.errors to simply :errors on I18n yml files.
2010-01-07 15:31:49 +01:00
Eloy Duran
9550916903
Raise a RecordNotFound if an ID in nested attributes is given but doesn't return a record. [ #2415 state:resolved]
2010-01-07 13:19:49 +01:00
Eloy Duran
b6264c43f4
Moved the validation logic to the association reflection and refactored autosave_association.rb a bit.
2010-01-07 13:19:48 +01:00
Eloy Duran
fc6aae3459
Remove deprecated '_delete' option from NestedAttributes.
2010-01-07 13:19:48 +01:00
Eloy Duran
a559260e41
Removed unnecessary call to #try and cleaned up a bit more.
2010-01-07 13:19:48 +01:00
Eloy Duran
f866ced24a
Don't use strings for callbacks, as these will be evaled. Rather use symbols, which uses a direct method dispatch.
...
Patch by Comron Sattari. [#3429 state:resolved]
2010-01-07 13:19:48 +01:00
Eloy Duran
2171e0a1d1
Cleanup some code in nested_attributes.rb, autosave_association.rb, and associations.rb with AssociationReflection#collection_association?
...
Also cache the result value.
2010-01-07 13:19:48 +01:00
Eloy Duran
f82adc7c5a
Add AssociationReflection#collection_association? which returns true if it's for a has_many or has_and_belongs_to_many association.
2010-01-07 13:19:48 +01:00
Eloy Duran
1afa9fa5a9
Refactored nested attributes a bit around :reject_if => :all_blank.
2010-01-07 13:19:48 +01:00
Jeremy Kemper
a323b83acf
Remove unneeded reliance on super -> method_missing quirk
2010-01-07 00:06:20 -08:00
Jeremy Kemper
816ba1e15a
Remove unneeded reliance on Numeric#round quirk
2010-01-06 23:35:03 -08:00
José Valim
74f6ccea20
instrumenter should be accessible from ActiveSupport::Notifications.
2010-01-06 22:24:16 +01:00
José Valim
0c2d933f36
Ensure before_validation and after_validation accepts :on as option.
2010-01-06 22:24:16 +01:00
Jeffrey Hardy
cfe0fcae06
Fix failing app generator test when using the --dev option
2010-01-06 14:22:51 -05:00
Jeffrey Hardy
caad6c634c
Restore require of 'active_record/fixtures' for Rake tasks that use them
2010-01-06 13:58:27 -05:00
Jeffrey Hardy
894ce15534
Use better defaults for fixtures: transactional=true, instantiated=false
...
These reflect the settings that were previously included in the default
test_helper.rb, removed in d7d9173 .
2010-01-06 13:38:11 -05:00
Jeffrey Hardy
891ba18d65
Update db:migrate error message to reflect the removal of config.frameworks
2010-01-06 13:37:45 -05:00
Jeffrey Hardy
8a41b710f6
Fix spacing on frameworks error message
2010-01-06 13:37:11 -05:00
Joshua Peek
88fd569ba0
Remove config.gem deprecation stub since its not "deprecated" but
...
completely removed.
This makes feature detection easier with config.respond_to?(:gem)
2010-01-06 11:33:04 -06:00
José Valim
0d5ce7c525
namespace in routes changes both the path and name prefix.
2010-01-06 09:51:46 +01:00
José Valim
e4099c2ad3
Allow named routes to be debugged.
2010-01-06 09:32:29 +01:00
Joshua Peek
bbe80ae652
config.plugins should still work with an array of strings
2010-01-05 23:37:40 -06:00
José Valim
10389a4c29
Ruby 1.9.1 requires hash given to foormat to contain symbols.
2010-01-06 00:42:58 +01:00
José Valim
0cf190001e
Remove CGI.escape in function of Rack::Mount.escape
2010-01-06 00:33:17 +01:00
José Valim
e55d70a380
redirect in routes takes port into account [ #3653 status:resolved]
2010-01-05 23:40:56 +01:00
Joshua Peek
b3900a29eb
All router redirect helper to accept a full URI [ #3653 state:resolved]
2010-01-05 12:00:38 -06:00
Joshua Peek
8ff4faf66a
assert_template depends on AV::Template monkey patches in action_view/test_case
2010-01-05 11:48:06 -06:00
David Heinemeier Hansson
2dc5aeed6d
NumberHelper#number_to_currency should output html_safe strings so the units are not escaped
2010-01-05 08:22:17 -08:00
Dan Croak
38f669766c
Rails layouts, error pages, and public/index now use HTML5.
...
The specification allows the character encoding meta tag to be removed
if character encoding is set at the transport level (Content-Type),
which Rails is doing.
http://dev.w3.org/html5/html4-differences/#character-encoding
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2010-01-05 10:13:29 -06:00
Jeremy Kemper
5c527c2f61
Controller tests should always require view tests since they add behavior controllers expect
2010-01-04 19:44:27 -08:00
Joshua Peek
3f28e0bda6
Trash string coercion rack hacks
2010-01-04 19:46:21 -06:00
Joshua Peek
76b5f18feb
Default middleware stack needs to be available at configuration time
2010-01-04 19:40:16 -06:00
Joshua Peek
56b28ec8d6
Middleware configuration tests
2010-01-04 19:40:16 -06:00
Jeremy Kemper
6591a10b1f
Reinstate explicit active_support/test_case require since console_app interacts with a non-autoloaded constant
2010-01-04 17:00:47 -08:00
Carlhuda
952e449fc0
Fix --dev option
2010-01-04 16:32:43 -08:00
Joshua Peek
17f053931e
use_instantiated_fixtures and use_transactional_fixtures defaults are set in active_record/fixtures
2010-01-04 17:23:36 -06:00
Joshua Peek
947bbc170e
Smoke test for test_help
2010-01-04 17:13:45 -06:00
Joshua Peek
508ffccfe7
rack and rack-test are pulled in by AD
2010-01-04 16:55:27 -06:00
Joshua Peek
e5ed62deea
Autoload AR test case
2010-01-04 16:50:01 -06:00
Joshua Peek
640d9e7e32
Autoload AMo test case
2010-01-04 16:29:07 -06:00
Joshua Peek
2601a16ede
Autoload AS test case
2010-01-04 16:22:46 -06:00
Joshua Peek
ce56c36cd3
Autoload AM test case class
2010-01-04 16:22:46 -06:00
Joshua Peek
cf83a6f16b
Autoload AC and AV test case classes
2010-01-04 16:22:46 -06:00
José Valim
45462c5e41
Expose Instrumenter id in Notifications.
2010-01-04 23:05:28 +01:00
José Valim
562a00ba16
@_formats initialization should be AbstractController::Base.
2010-01-04 23:05:28 +01:00
José Valim
bd729344a7
Remove deprecated formatted named routes
2010-01-04 23:05:27 +01:00
Zach Brock
79438b4638
adding fix for auto linking to master too
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2010-01-05 10:57:20 +13:00
Joshua Peek
ae270f597d
Remove rack submodule, 1.1 has been released as a gem.
2010-01-04 10:09:10 -06:00
David Heinemeier Hansson
5e94d3e3ea
Merge
2010-01-03 22:27:28 -08:00
David Heinemeier Hansson
d7d917335e
Stop featuring ActiveSupport::TestCase.use_instantiated_fixtures and ActiveSupport::TestCase.use_transactional_fixtures as likely-to-change settings in test/test_helper.rb -- they are not and their values are already set in test_help.rb [DHH]
2010-01-03 19:55:21 -08:00
David Heinemeier Hansson
437df4a8d3
Describe intent, not implementation
2010-01-03 19:46:10 -08:00
David Heinemeier Hansson
0ad07d9c26
Removed config/initializers/new_rails_defaults.rb as all frameworks now follow the settings from it [DHH]
2010-01-03 19:32:48 -08:00
David Heinemeier Hansson
1459c8cc1d
Changed ActiveRecord::Base.store_full_sti_class to be true by default reflecting the previously announced Rails 3 default [DHH]
2010-01-03 19:30:28 -08:00
David Heinemeier Hansson
6042067c0b
Changed the default ActiveSupport.use_standard_json_time_format from false to true and
...
ActiveSupport.escape_html_entities_in_json from true to false to match previously announced Rails 3 defaults [DHH]
2010-01-03 19:20:43 -08:00
David Heinemeier Hansson
532b11690f
Change the ActiveModel::Base.include_root_in_json default to true for Rails 3 [DHH]
2010-01-03 22:02:10 -05:00
David Heinemeier Hansson
0422314b29
Time zoning should be turned on by default with UTC
2010-01-03 21:55:48 -05:00
David Heinemeier Hansson
51460b5bf2
This comment has been true of all helpers for a long time
2010-01-03 21:34:19 -05:00
David Heinemeier Hansson
950e6bb491
Remove self-evident comment about how subclasses work
2010-01-03 21:32:40 -05:00
David Heinemeier Hansson
090d12b49b
Added that ActionController::Base now does helper :all instead of relying on the default ApplicationController in Rails to do it [DHH]
2010-01-03 21:32:02 -05:00
José Valim
eca11bfdb5
Merge branch 'master' of git://github.com/rails/rails
2010-01-04 01:05:19 +01:00
José Valim
b0947bf97c
Bring generators tests back to life.
2010-01-04 00:31:53 +01:00
José Valim
3990310a2b
Use underscore in notification namespaces.
2010-01-04 00:03:56 +01:00
José Valim
f2d276fefd
Ensure no notification is on the queue before running notifications related tests.
2010-01-03 23:39:09 +01:00
José Valim
53c6984944
Add notifications to ActionDispatch::ShowExceptions, this can be used as hooks for plugins like ExceptionNotifier.
2010-01-03 23:33:34 +01:00
Pratik Naik
a68165833a
Add Relation#create_with to explictily specify create scope
2010-01-04 03:50:16 +05:30
Pratik Naik
a115b5d79a
Ensure using proper engine for Arel::Table
2010-01-04 02:05:18 +05:30
José Valim
6fbe9ef2ff
Use namespaces in notifications.
2010-01-03 20:39:42 +01:00
José Valim
4796be33a4
Add missing tests to Validators.
2010-01-03 17:14:50 +01:00
José Valim
271e7c803f
Move all generators tests to use new test case syntax.
2010-01-03 17:14:50 +01:00
José Valim
441227a10f
Create Rails::Generators::TestCase.
2010-01-03 17:14:49 +01:00
José Valim
e88ea3255f
Assert for valid application names. [ #3556 status:resolved]
2010-01-03 17:14:49 +01:00
José Valim
6716e4bc0c
Use regexp in lookups instead of traversing namespaces. This removes the need of special cases.
2010-01-03 17:14:48 +01:00
Pratik Naik
00f3f6dc31
Relation#merge and Relation#except should respect locks
2010-01-03 21:25:19 +05:30
Pratik Naik
3db876cb76
Relation#merge and Relation#except should respect havings
2010-01-03 20:50:04 +05:30
Pratik Naik
af5e1b4cc6
Add Relation#except
2010-01-03 19:43:29 +05:30
Pratik Naik
22bfd8b098
Rename a variable name for consistency
2010-01-03 19:20:40 +05:30
Pratik Naik
8edfa8f82f
Move Relation#spawn and Relation#merge to a separate module
2010-01-03 18:57:57 +05:30
Pratik Naik
3eca0ab838
Give preference to the second relation's order when merging
2010-01-03 18:52:30 +05:30
Stefan Penner
d531cbc809
fixed missing or incorrect session data error message
2010-01-02 23:01:06 -08:00
Yehuda Katz
106d8f7688
AppName::Application.root should work
2010-01-02 22:49:40 -08:00
Yehuda Katz
f1cd3a98f3
Doc fix
2010-01-02 22:46:09 -08:00
Mikel Lindsaar
42aa9b87c2
Silence warnings
2010-01-02 22:39:00 -08:00
Mikel Lindsaar
bf6d0e2bc2
Updating to Mail 1.5.0, including default values for all Message#field_name methods, can access field objects by calling Message#[:field_name]
2010-01-02 22:39:00 -08:00
Pratik Naik
4939f95c9b
Reapply "Remove optional join_dependency argument as Relation always supplies it" - Now without syntax errors
2010-01-03 11:08:57 +05:30
Jeremy Kemper
7ad7c82caf
Skip isolation test tests until they work
2010-01-02 20:29:47 -08:00
Xavier Noria
7a2554d9a3
Let Integer#multiple_of? accept zero as argument
...
[#2982 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-01-02 20:25:15 -08:00
Jeremy Kemper
8571aa613f
Revert "Remove optional join_dependency argument as Relation always supplies it"
...
This reverts commit 8e57deed8b .
2010-01-02 18:39:36 -08:00
Mikel Lindsaar
fcf2dd3352
Merge branch 'master' of github.com:mikel/rails
2010-01-03 11:24:04 +11:00
Mikel Lindsaar
ffcd356771
Updating to Mail 1.5.0, including default values for all Message#field_name methods, can access field objects by calling Message#[:field_name]
2010-01-03 11:15:50 +11:00
Steve Agalloco
c3d19eb950
app_generator option should be skip_activerecord not no_activerecord
...
(Thor actually accepts both, the patch was applied to improve readability)
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-03 00:47:01 +01:00
Mikel Lindsaar
5867f9516d
Silence warning of missing init on @config
2010-01-03 10:17:30 +11:00
Mikel Lindsaar
a009239092
Silence @text not initialized warning
2010-01-03 10:17:30 +11:00
Pratik Naik
8e57deed8b
Remove optional join_dependency argument as Relation always supplies it
2010-01-03 04:09:36 +05:30
Pratik Naik
47da00e94b
Further simplify Relation#references_eager_loaded_tables?
2010-01-03 03:58:34 +05:30
Pratik Naik
e9ebf8b898
Cache Relation#to_sql
2010-01-03 03:56:21 +05:30
Pratik Naik
0d1a2a3c22
Remove unused code from association.rb now that Relation takes care of checking the referenced tables
2010-01-03 03:49:10 +05:30
Pratik Naik
eb7fdb9464
Make Relation#includes behave exactly like the existing :include option
2010-01-03 03:46:08 +05:30
Pratik Naik
6f5f23aaa7
Add Relation#includes to be an equivalent of current finder option :include
2010-01-03 03:24:28 +05:30
Pratik Naik
c51347152a
Get rid of Model.construct_finder_arel_with_includes. Use construct_finder_arel instead
2010-01-03 03:08:01 +05:30
Pratik Naik
a9c790e10f
Simply methods for checking eager loaded tables references in the query
2010-01-03 03:00:30 +05:30
José Valim
4c5b5024c3
Rails notifications are set through Railtie in each framework.
2010-01-02 22:27:03 +01:00
José Valim
08986ce290
Remove deprecated ActiveModel tests (%d and %s is no longer supported in error messages a couple months already)
2010-01-02 22:27:03 +01:00
José Valim
fd719d7ecf
Update vendored Thor.
2010-01-02 22:27:03 +01:00
José Valim
f50bb48e04
Do not enforce human_attribute_name as required API.
2010-01-02 22:27:03 +01:00
Carsten Gehling
bef968d379
I18n label helper [ #745 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-02 22:27:02 +01:00
José Valim
653fa4c10c
Add naming to AMo::Lint
2010-01-02 22:27:02 +01:00
José Valim
7cc0a4cfa1
Use activerecord.errors.format as in Rails 2.3.5.
2010-01-02 22:27:02 +01:00
José Valim
5fdd0e80a4
Be sure to convert namespaced names to we have 'Parrots name' instead of 'Parrots.name' in error messages.
2010-01-02 22:27:02 +01:00
José Valim
dcafe995bf
Make nested attributes behave like in 2.3.5 and add a sanity test for it with I18n.
2010-01-02 22:27:02 +01:00
Pratik Naik
ac1df91e5e
Implement Relation#create and Relation#create!
2010-01-03 00:16:14 +05:30
Pratik Naik
65200d2933
Implement Relation#new
2010-01-03 00:08:59 +05:30
Pratik Naik
32b48bf419
Use arel predicates instead of strings wherever possible when merging relations
2010-01-02 22:43:40 +05:30
Pratik Naik
f1acf1cc74
Give higher preference to second relation's equality predicates when merging
2010-01-02 21:16:16 +05:30
Pratik Naik
3e6e3e90ef
Remove the test which was testing a non-existing method, always failing on 1.9 and never even running on 1.8
2010-01-02 16:12:01 +05:30
Pratik Naik
7ff131f740
Make sure not to spalt string arguments
2010-01-02 13:43:50 +05:30
Xavier Noria
abae712213
fixes a couple of wrong requires
2010-01-01 14:28:57 -08:00
Xavier Noria
9ab528df8d
nokogiri.rb needs active_support/core_ext/object/blank
2010-01-01 14:28:57 -08:00
Xavier Noria
2d233ebdcf
libxml.rb needs active_support/core_ext/object/blank
2010-01-01 14:28:57 -08:00
Xavier Noria
173f828760
jdom.rb needs active_support/core_ext/object/blank
2010-01-01 14:28:57 -08:00
Xavier Noria
388dde9f9d
time_with_zone.rb needs active_support/core_ext/object/acts_like
2010-01-01 14:28:57 -08:00
Xavier Noria
606203c034
testing/performance.rb needs active_support/core_ext/string/inflections because it uses demodulize
2010-01-01 14:28:56 -08:00
Xavier Noria
0e5b9d7d7d
rescuable.rb needs active_support/core_ext/array/extract_options
2010-01-01 14:28:56 -08:00
Xavier Noria
bddf0a6fd3
rescuable.rb needs active_support/core_ext/string/inflections because it uses constantize
2010-01-01 14:28:56 -08:00
Xavier Noria
b7afaa08bf
message_verifier.rb needs active_support/core_ext/object/blank
2010-01-01 14:28:56 -08:00
Xavier Noria
679acfbefd
message_verifier.rb needs active_support/base64
2010-01-01 14:28:56 -08:00
Xavier Noria
d26d671e38
message_encriptor.rb needs active_support/base64
2010-01-01 14:28:56 -08:00
Xavier Noria
f15313c0c8
duration.rb needs active_support/core_ext/object/acts_like
2010-01-01 14:28:56 -08:00
Xavier Noria
e7c08c1e29
method_wrappers.rb needs active_support/core_ext/array/extract_options
2010-01-01 14:28:56 -08:00
Xavier Noria
9036bf82c6
to_param.rb needs active_support/core_ext/object/to_query
2010-01-01 14:28:56 -08:00
Xavier Noria
cbab9c0347
extending.rb needs active_support/core_ext/object/blank
2010-01-01 14:28:56 -08:00
Xavier Noria
7f17b23aea
extending.rb needs active_support/core_ext/class/removal because it uses reachable?
2010-01-01 14:28:56 -08:00
Xavier Noria
4d2f0d2287
synchronization.rb needs active_support/core_ext/array/extract_options
2010-01-01 14:28:56 -08:00
Xavier Noria
8ae9ef75f3
loading.rb needs active_support/core_ext/string/inflections because it uses underscore
2010-01-01 14:28:56 -08:00
Xavier Noria
7ba8c9e78e
hash/conversions.rb needs active_support/core_ext/string/inflections because it uses singularize and a few others
2010-01-01 14:28:55 -08:00
Xavier Noria
e6385a912a
hash/conversions.rb needs active_support/core_ext/object/blank because it uses blank?
2010-01-01 14:28:55 -08:00
Xavier Noria
2f9fc1fe01
date_time/calculations.rb needs active_support/core_ext/object/acts_like because it uses acts_like?
2010-01-01 14:28:55 -08:00
Xavier Noria
44f9813344
date/calculations.rb needs active_support/core_ext/object/acts_like because it uses acts_like?
2010-01-01 14:28:55 -08:00
Xavier Noria
5b295a65c3
callbacks.rb needs active_support/core_ext/object/metaclass because it uses metaclass
2010-01-01 14:28:55 -08:00
Xavier Noria
3337da9e94
cache.rb requires active_support/core_ext/string/inflections because it uses camelize
2010-01-01 14:28:55 -08:00
Xavier Noria
13168e6594
requires active_support/inflector/methods active_support/core_ext/string/inflections in local_cache.rb because it uses underscore
2010-01-01 14:28:55 -08:00
Xavier Noria
f1e34cc41d
requires active_support/core_ext/array/extract_options in mem_cache_store.rb because it uses extract_options!
2010-01-01 14:28:55 -08:00
Xavier Noria
7f7f5d619a
requires active_support/gzip in CompressedMemCacheStore because it uses ActiveSupport::Gzip
2010-01-01 14:28:55 -08:00
Xavier Noria
da97b51fdf
requires active_support/core_ext/hash/keys in benchmarkable because it uses assert_valid_keys
2010-01-01 14:28:55 -08:00
Xavier Noria
39667c846b
make sure returning is available for the libxml extension
2010-01-01 14:28:55 -08:00
Xavier Noria
a2595a1f0f
delegating_attributes.rb does not use duplicable
2010-01-01 14:28:55 -08:00
Xavier Noria
4a27d42637
require cgi to reopen it, not technically needed but makes sense
2010-01-01 14:28:55 -08:00
Pratik Naik
4a7a14b0e1
Use relations to build uniqueness conditions
2010-01-02 03:46:08 +05:30
Pratik Naik
498fddc714
Fix join string for the WHERE clause
2010-01-02 03:20:52 +05:30
Willem van Bergen
689984ddd3
Fixed some bugs and fixed some tests in new SAX-based XmlMini backends.
...
[#3636 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-01-01 13:18:03 -08:00
Willem van Bergen
96a2b3905c
Added SAX-based parser for XmlMini, using LibXML
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-01-01 13:17:46 -08:00
Willem van Bergen
d7f9b9fd24
Added SAX-based parser for XmlMini, using Nokogiri.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-01-01 13:17:45 -08:00
Willem van Bergen
34b03cebf9
Code cleanup, bugfixes and speed improvements for the Nokogiri and LibXML XmlMini backends
...
[#3641 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-01-01 13:16:40 -08:00
Jeremy Kemper
4f590b67b7
Ruby 1.9.2: explicit coercion check no longer needed; bug fixed upstream
2010-01-01 11:02:09 -08:00
Pratik Naik
b35873a575
Rename Model.arel_table to Model.active_relation
2010-01-02 00:25:29 +05:30
Pratik Naik
d2c4b3b672
Rename Model.engine to active_relation_engine. Cache arel_table and the method takes no arguments now
2010-01-02 00:03:20 +05:30
Pratik Naik
5971842d2d
Use Arel::Table instead of ActiveRecord::Relation from HABTM and has_many#delete_records
2010-01-01 23:42:13 +05:30
Pratik Naik
fc94c03c1d
Remove unncessary arguments passed to arel_table
2010-01-01 23:34:15 +05:30
Pratik Naik
d200d08004
Use arel for building the STI type condition
2010-01-01 23:15:48 +05:30
Mikel Lindsaar
a0f44fe0fb
Silence warning of missing init on @config
2010-01-01 20:45:28 +11:00
Mikel Lindsaar
f72dd368b3
Silence @text not initialized warning
2010-01-01 14:44:11 +11:00
Yehuda Katz
7789663a7d
Put MySQL and Postgres in an :only block so you can gem bundle --only default to leave out MySQL and Postgres
2009-12-31 18:49:27 -08:00
José Valim
50aa876f32
Make rendering in ActionView happen through _render_template, as the rendering which comes from ActionController.
2009-12-31 18:40:20 -08:00
José Valim
c03c40b481
Expose a _render_partial hook as thhe _render_template one and make use of it.
2009-12-31 18:40:20 -08:00
José Valim
33c98b15bc
ActionController::Logger should include AbstractController::Logger and sort autoloads for easier readability.
2009-12-31 18:40:20 -08:00
José Valim
38fa0d14a8
controller_path is required by ActionView, so move it up to AbstractController and refactor AbstractController::Layouts.
2009-12-31 18:40:20 -08:00
Jeremy Kemper
db49b7dc94
Fix new year heisenbug
2009-12-31 18:32:16 -08:00
Jeremy Kemper
9790f0eda5
Merge commit 'josevalim/inheritance'
2009-12-31 18:24:45 -08:00
José Valim
8c5fe60ec8
Simplify repair_validations on AR and make it work with new callbacks.
2010-01-01 03:20:38 +01:00
Jeremy Kemper
6ce562c9ff
Merge commit 'mikel/master'
2009-12-31 17:15:06 -08:00
José Valim
50fbb74056
Fix inheritance issue with new callbacks.
2010-01-01 01:48:12 +01:00
Pratik Naik
58ad656769
Make sure association proxy does not pass quoted table name to sanitize_sql
2010-01-01 04:37:19 +05:30
Pratik Naik
8a32d37967
Handle Range with excluded end
2010-01-01 04:33:56 +05:30
Pratik Naik
c62e88a5ab
Try using cached attribute before creating a new one
2010-01-01 04:17:56 +05:30
Pratik Naik
77c23b2104
Use PredicateBuilder for sql hash sanitization
2010-01-01 04:17:56 +05:30
Pratik Naik
141d3aff2f
Fix the method name for recusion
2010-01-01 04:17:56 +05:30
Pratik Naik
3c23b71a09
Move predicate building to a stand alone PredicateBuilder class
2010-01-01 04:17:55 +05:30
Carl Lerche
ae7ada1fde
Some railties cleanup:
...
* Rename <framework>/rails.rb -> <framework>/railtie.rb
* Rails::Plugin -> Rails::Railtie
* Rails::Plugin::Vendored -> Rails::Plugin
2009-12-31 13:12:52 -08:00
Carl Lerche
e749424dfa
Rename rails.rb -> rails/all.rb and rails/core.rb -> rails.rb
2009-12-31 13:12:52 -08:00
Pratik Naik
fdc62cdcdb
Use Arel::Attribute when building where conditions from hash
2010-01-01 02:22:03 +05:30
Carl Lerche
2f8643955a
Raise a helpful error if config.frameworks is used
2009-12-31 11:57:59 -08:00
Carl Lerche
a23f4b6aee
Add a /rails.rb for each framework for consistency
2009-12-31 11:57:59 -08:00
Carl Lerche
1e41097294
Fully remove config.frameworks in favor of requires in boot.rb
2009-12-31 11:57:59 -08:00
Pratik Naik
783caae52f
Use Arel::Attribute for pk conditions
2010-01-01 01:00:18 +05:30
Pratik Naik
93555c672e
Add Relation#table to get the relevant Arel::Table
2010-01-01 00:56:49 +05:30
Pratik Naik
d5f9173926
Add Relation#delete [Pratik Naik, Emilio Tagua]
2010-01-01 00:17:40 +05:30
David Heinemeier Hansson
ea41a757aa
Dont gitkeep things that are gitignored
2009-12-31 11:09:10 -05:00
Mikel Lindsaar
94838fbe39
Updating mail requirement to 1.4.3
2009-12-31 19:51:25 +11:00
Mikel Lindsaar
e372f25b0d
Merge branch 'master' of github.com:mikel/rails
...
Conflicts:
actionmailer/lib/action_mailer/tmail_compat.rb
2009-12-31 19:48:40 +11:00
Mikel Lindsaar
2f1aaebe77
removing spurious line
2009-12-31 19:46:22 +11:00
Mikel Lindsaar
a2880827b4
Adding :transfer_encoding -> :content_transfer_encoding as part of TmailCompat
2009-12-31 19:37:37 +11:00
Jeremy Kemper
16f1a2b573
Clarify assertion
2009-12-30 23:21:10 -08:00
David Heinemeier Hansson
96c27e4003
Merge branch 'master' of github.com:rails/rails
2009-12-31 01:15:30 -05:00
Jeremy Kemper
c4c2502df8
Fix controller runtime test
2009-12-30 22:15:02 -08:00
David Heinemeier Hansson
5d8342cc32
Added .gitkeep to empty directories and --skip-git to skip gitignore/gitkeep files
2009-12-31 01:14:23 -05:00
Carl Lerche
d39d7f5f44
Allow ActiveSupport's isolation tests to run with MiniTest on 1.9
2009-12-30 20:48:46 -08:00
David Heinemeier Hansson
5eb3ceca01
Orphan experiment no longer needed
2009-12-30 22:55:52 -05:00
Jeremy Kemper
1fbd02e446
Revert "Add config.action_controller.include behavior to plugins."
...
This reverts commit 7e8b7f46bf .
Conflicts:
railties/lib/rails/plugin.rb
2009-12-30 19:34:15 -08:00
Jeremy Kemper
10a2638db0
Fix up AR extension by using Railties module instead of Rails and requiring ControllerRuntime at initialization time instead of boot
2009-12-30 19:24:00 -08:00
Jeremy Kemper
d349b22097
Remove self-require
2009-12-30 19:00:12 -08:00
Jeremy Kemper
8ad9d14494
Partially revert "ActionDispatch should require as little of ActiveSupport as possible"
...
Removes load path change from commit bb153f42e4 .
2009-12-30 17:35:17 -08:00
Jeremy Kemper
1a0c372b19
depends on Module#attr_internal
2009-12-30 14:31:02 -08:00
Jeremy Kemper
3a29aa3abc
Merge commit 'josevalim/arlog'
2009-12-30 14:01:05 -08:00
Jeremy Kemper
0c7c842d8f
Merge branch 'master' of github.com:rails/rails
2009-12-30 14:01:00 -08:00
Jeremy Kemper
17787fbfdb
Merge commit 'josevalim/callbacks'
2009-12-30 13:48:20 -08:00
José Valim
cb3c0d490b
Get rid of DeprecatedCallbacks in ActiveRecord::Associations and finally remove it.
2009-12-30 13:40:37 -08:00
José Valim
a6e2d16b1e
Setup and teardown now use new callbacks.
2009-12-30 13:40:37 -08:00
Carl Lerche
bb153f42e4
ActionDispatch should require as little of ActiveSupport as possible
2009-12-30 12:58:40 -08:00
Pratik Naik
7aabaac0f5
Organize Relation methods into separate modules
2009-12-30 19:29:26 +05:30
José Valim
4ecdf24bde
Kick AR logging back to life and move ControllerRuntime inside ActiveRecord::Rails.
2009-12-30 13:07:48 +01:00
José Valim
97a64b6b22
Get rid of DeprecatedCallbacks in ActiveRecord::Associations and finally remove it.
2009-12-30 11:43:34 +01:00
José Valim
e58ad8ed9c
Setup and teardown now use new callbacks.
2009-12-30 11:09:27 +01:00
Mikel Lindsaar
79280a233f
Adding :transfer_encoding -> :content_transfer_encoding as part of TmailCompat
2009-12-30 20:43:56 +11:00
Jeremy Kemper
97204fc0bc
Merge commit 'mikel/master'
2009-12-30 00:18:41 -08:00
Pratik Naik
8734f9a271
Relation#many? shoud load the records if there's a LIMIT
2009-12-30 12:14:00 +05:30
Pratik Naik
bdf59a5618
Add Relation#any? and Relation#many?
2009-12-30 12:11:22 +05:30
Mikel Lindsaar
345e622a20
Adding TMailCompat layer for :set_content_type and friends
2009-12-30 16:12:51 +11:00
Pratik Naik
a56518aee2
Fix the count test for postgres
2009-12-30 10:41:47 +05:30
Jeremy Kemper
79550e8995
Revert "Add default respond_to formats to ApplicationController."
...
(Needs consensus that these are appropriate defaults.)
This reverts commit 66604b2e0e .
2009-12-29 19:11:00 -08:00
Carl Lerche
e5c88434db
Use the correct method for eager loading autoloads
2009-12-29 19:04:37 -08:00
Jeremy Kemper
153ce2f328
Clean up changelog a bit
2009-12-29 15:50:47 -08:00
Jeremy Kemper
71ffa76070
Merge branch 'mail'
2009-12-29 15:49:04 -08:00
Jeremy Kemper
ce1aeeee3f
Move mail gem dep to Action Mailer's gemspec
2009-12-29 15:47:28 -08:00
Jeremy Kemper
b27a3e8da3
Merge branch 'master' of git://github.com/mikel/rails into mail
...
Conflicts:
actionmailer/lib/action_mailer.rb
2009-12-29 15:46:12 -08:00
Jeremy Kemper
485d244eae
Merge branch 'master' of github.com:rails/rails
2009-12-29 15:38:17 -08:00
José Valim
0b37572552
Clean up railties Rakefile from old responsibilities which are now part of main Rakefile
2009-12-29 23:58:44 +01:00
José Valim
1a4d909c68
Add rails app --edge and rails app --dev
2009-12-29 23:58:34 +01:00
José Valim
66604b2e0e
Add default respond_to formats to ApplicationController.
2009-12-29 23:58:25 +01:00
Sam Pohlenz
468bdb3ed8
Make plugins responsible for loading their own rake tasks
...
Signed-off-by: Carl Lerche <carllerche@mac.com >
2009-12-29 14:47:48 -08:00
Sam Pohlenz
cbce027669
Application object should instantiate non-vendored plugins
...
Signed-off-by: Carl Lerche <carllerche@mac.com >
2009-12-29 14:45:43 -08:00
Carl Lerche
2e87196d14
Use extlib_inheritable_accessor in request_forgery_protection.rb.
...
For some reason the current class_inheritable_accessor does not play nice with included hooks. class_inheritable_accessor will be revised shortly.
2009-12-29 13:21:36 -08:00
Carl Lerche
3cb7e04763
Finally remove rails/initializer.rb
2009-12-29 13:20:10 -08:00
Pratik Naik
f17bb1fbff
Simplify get_projection_name_from_chained_relations using recursion
2009-12-30 01:16:24 +05:30
Emilio Tagua
00cd3789f6
Relation#count should look for projections in chained relations and perform the count on the given column
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-12-30 01:12:38 +05:30
Carl Lerche
aa1b32ae97
Check to see if the plugin object responds to load_tasks (vendor/plugin/* does not yet) Fixes Sam Ruby's tests.
2009-12-29 10:49:12 -08:00
Pratik Naik
0dea509817
Oops, add the missing #tap call
2009-12-29 15:54:40 +05:30
Pratik Naik
3b8853eda4
Replace Base#safe_to_array with Array.wrap
2009-12-29 15:53:06 +05:30
Pratik Naik
0a1ff1a14f
Rewrite Relation#readonly, eager_load, preload using Object#tap
2009-12-29 15:28:40 +05:30
Pratik Naik
1785e1b26e
Rename Relation#create_new_relation to spawn and refactor preload/eagerload associations using attr_writer
2009-12-29 15:24:30 +05:30
Pratik Naik
61fa111a55
Refactor Relation#readonly using attr_writer
2009-12-29 15:24:30 +05:30
Yehuda Katz
cf4978313b
Make sure evalled method knows where it came from
2009-12-29 01:04:32 -08:00
Pratik Naik
981f696398
Relation#respond_to? should take second argument for responding to private methods
2009-12-29 12:31:08 +05:30
Pratik Naik
bc933d0fa1
Make sure Relation responds to dynamic finder methods
2009-12-29 12:27:40 +05:30
Pratik Naik
f290e685f0
Add Relation#size and Relation#empty?
2009-12-29 12:15:28 +05:30
Pratik Naik
13989ff8c6
Use relation#delete_all for Model.delete_all
2009-12-29 11:46:07 +05:30
Pratik Naik
54b80c7361
Add Relation#delete_all
2009-12-29 11:46:07 +05:30
Jeremy Kemper
f79caa49fb
Complain if there's no such middleware
2009-12-28 20:24:28 -08:00
Carl Lerche
4ee70643b3
Don't require initializer.rb in core.rb
2009-12-28 18:26:15 -08:00
Carl Lerche
49c800b6bd
Move the ActiveRecord related rake tasks into the AR gem.
2009-12-28 17:53:05 -08:00
Carl Lerche
d747b6847b
Require active_support/dependencies/autoload in action_dispatch
2009-12-28 17:53:05 -08:00
Carl Lerche
c02f278263
Add the ability to have plugins load rake tasks.
2009-12-28 17:53:04 -08:00
Jeremy Kemper
9a650a6547
Silence some trivial warnings: shadowed local vars, indentation mismatches
2009-12-28 17:36:08 -08:00
José Valim
6d390671f6
Move ActiveRecord callbacks implementation to ActiveModel and make use of it.
...
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local >
2009-12-28 16:19:23 -08:00
Yehuda Katz
643862e3be
Merge branch 'master' of github.com:rails/rails
2009-12-28 16:19:09 -08:00
Pratik Naik
078ea0dfbd
Oops. Remove debug information inside a test from the previous commit
2009-12-29 04:33:37 +05:30
Pratik Naik
08633bae5e
Migrate all the calculation methods to Relation
2009-12-29 04:30:04 +05:30
Jeremy Kemper
949c8c0d0e
Don't publicize with_scope for tests since it may shadow public misuse
2009-12-28 14:07:23 -08:00
Jeremy Kemper
1b91f534ce
Fix uniqueness validation: with_exclusive_scope is not public
2009-12-28 14:06:22 -08:00
Jeremy Kemper
d927265abd
Fix pg test
2009-12-28 13:05:36 -08:00
Jeremy Kemper
9fe42232f1
Merge commit 'Fingertips/master'
2009-12-28 12:50:56 -08:00
Jeremy Kemper
a76af2309a
rake smoke: toplevel task to quickly smoke-test all projects
2009-12-28 12:29:03 -08:00
Pratik Naik
1ebfd999ec
Add ruby-debug to Gemfile for Ruby < 1.9
2009-12-29 01:53:15 +05:30
Jeremy Kemper
ea7b5ff99e
Use present rather than any
2009-12-28 12:12:53 -08:00
Eloy Duran
c23fbd0d47
Refactored previous changes to nested attributes.
2009-12-28 21:09:22 +01:00
Michael Siebert
07b615fb89
Add an :update_only option to accepts_nested_attributes_for for to-one associations. [ #2563 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-12-28 21:09:19 +01:00
Jeremy Kemper
f95fcdd3af
Fix copy/pasted test class name
2009-12-28 11:40:34 -08:00
Jeremy Kemper
4691cc43ee
Fix ruby version test
2009-12-28 11:40:23 -08:00
Jeremy Kemper
632df063a3
Merge commit 'josevalim/validations'
2009-12-28 11:13:35 -08:00
Pratik Naik
91e28aae86
Add Model.having and Relation#having
2009-12-29 00:07:46 +05:30
Eloy Duran
9c771a9608
Make sure to not add autosave callbacks multiple times. [ #3575 state:resolved]
...
This makes sure that, in a HABTM association, only one join record is craeted.
2009-12-28 16:56:31 +01:00
Murray Steele
ff508640e2
Make polymorphic_inverse_of in Reflection throw an InverseOfAssociationNotFoundError if the supplied class doesn't have the appropriate association. [ #3520 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-12-28 15:12:17 +01:00
Murray Steele
6a74ee7f4d
Provide a slightly more robust we_can_set_the_inverse_on_this? method for polymorphic belongs_to associations. [ #3520 state:resolved]
...
Also add a new test for polymorphic belongs_to that test direct accessor assignment, not just .replace assignment.
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-12-28 15:12:15 +01:00
George Ogata
81ca0cf2b0
Add inverse polymorphic association support. [ #3520 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-12-28 15:12:13 +01:00
Murray Steele
6c8c85bc1e
Add more tests for the various ways we can assign objects to associations. [ #3513 state:resolved]
...
Get rid of a duplicate set_inverse_instance call if you use new_record(true) (e.g. you want to replace the existing instance).
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-12-28 15:12:11 +01:00
George Ogata
fc85c66527
Set inverse for #replace on a has_one association. [ #3513 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-12-28 15:12:07 +01:00
Pratik Naik
e8ca22d129
Move Relation calculation methods to a separate module
2009-12-28 19:12:15 +05:30
Pratik Naik
8f5d9eb0e2
Add Relation#count
2009-12-28 18:38:28 +05:30
Pratik Naik
aefa975fdd
Remove the todo note for arel#lock
2009-12-28 16:20:40 +05:30
Pratik Naik
02207dc02c
Add Model.readonly and association_collection#readonly finder method
2009-12-28 16:17:46 +05:30
Mikel Lindsaar
b354496bda
Adding default 8bit encoding if the body has non usascii in it
2009-12-28 21:41:16 +11:00
José Valim
616ebb8f6a
Remove unused code paths and require mail only when it's needed.
2009-12-28 11:21:36 +01:00
Pratik Naik
5156507e13
Remove locking related unused code
2009-12-28 14:33:56 +05:30
Pratik Naik
b95cc72429
Raise ArgumentError when trying to merge relations of different classes
2009-12-28 14:24:52 +05:30
Pratik Naik
92c982d973
Relation#readonly(false) should toggle the readonly flag
2009-12-28 14:20:54 +05:30
Pratik Naik
9f4e98330b
Remove unused construct_finder_sql
2009-12-28 12:57:35 +05:30
Pratik Naik
d6b0a7d67c
Fix a typo in CHANGELOG
2009-12-28 12:44:43 +05:30
Pratik Naik
a3c1db4e44
Add Model.lock and relation#lock now that arel has locking
2009-12-28 12:42:06 +05:30
Yehuda Katz
9abbe9f0b3
Merge branch 'master' of github.com:rails/rails
2009-12-27 22:27:33 -08:00
David Heinemeier Hansson
1c47d04ea5
Added Object#presence that returns the object if it's #present? otherwise returns nil [DHH/Colin Kelley]
2009-12-27 17:54:43 -08:00
David Heinemeier Hansson
a642edbef3
Added default .gitignore (this is just recognizing Git market share, don't throw a hissy if you use another SCM) [DHH]
2009-12-27 17:48:11 -08:00
Mikel Lindsaar
c039bcdb1c
Moved sort_parts into Mail, updated mail requirement to 1.4.2
2009-12-28 12:25:14 +11:00
Yehuda Katz
99f7e0ff27
Update rack submodule
2009-12-27 16:20:27 -08:00
Yehuda Katz
f095e6f59d
Fixes some problems with getting a new app working
2009-12-27 16:00:34 -08:00
Jeremy Kemper
19c48281a7
String#exclude? core extension: inverse of #include?
2009-12-27 15:49:29 -08:00
Jeremy Kemper
7c4fb93ac3
Ruby 1.9: string is not enumerable, so #exclude? is not available
2009-12-27 15:38:00 -08:00
Jeremy Kemper
3a79117c77
Typo
2009-12-27 15:27:18 -08:00
David Heinemeier Hansson
ebe3c8f2e4
Merge branch 'master' of github.com:rails/rails
2009-12-27 15:23:38 -08:00
David Heinemeier Hansson
438a8c3ec7
Require the enumberable extension from active support because we use #exclude?
2009-12-27 15:23:30 -08:00
José Valim
a176263ebc
Fix generators tests.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-12-27 15:19:16 -08:00
Jeremy Kemper
292363c75f
Use i18n
2009-12-27 15:17:44 -08:00
David Heinemeier Hansson
5012a1558d
Merge branch 'master' of github.com:rails/rails
2009-12-27 14:44:21 -08:00
David Heinemeier Hansson
1cd949006a
Fix the i18n dependency problem
2009-12-27 14:43:06 -08:00
Yehuda Katz
12e43494a7
Merge remote branch 'jose/perf'
2009-12-27 14:36:59 -08:00
Pratik Naik
1c26ba486c
Add Model.from and association_collection#from finder methods
2009-12-28 03:59:44 +05:30
Pratik Naik
6a776dcc9d
Use relation.from when constructing a relation
2009-12-28 03:59:44 +05:30
David Heinemeier Hansson
9521fcbcc2
Merge branch 'master' of github.com:rails/rails
2009-12-27 14:14:54 -08:00
David Heinemeier Hansson
95762cbbb3
Added shorthand for match 'products/overview' that expands to match 'products/overview', :to => 'products#overview', :as => 'products_overview'
2009-12-27 14:13:03 -08:00
Pratik Naik
a0ff5f82c3
Dont delegate relation#find to to_a
2009-12-28 03:22:33 +05:30
Pratik Naik
e9e20ab601
Use arel#from instead of the current hack
2009-12-28 03:19:31 +05:30
Pratik Naik
630dc50730
Fix relation tests for postgres
2009-12-28 02:50:04 +05:30
Pratik Naik
51a1d5a670
Handle preloads and eager loads when merging relations
2009-12-28 01:33:20 +05:30
Pratik Naik
a8b10a2a8d
Add relation#merge to merge two relations
2009-12-28 01:08:34 +05:30
Pratik Naik
08312e9958
Return a new relation when blank is supplied to relation.joins
2009-12-27 23:29:41 +05:30
Pratik Naik
5565bab994
Rewrite AssociationCollection#find using relations
2009-12-27 22:32:20 +05:30
Pratik Naik
bbdeaae2ca
Add relation.destroy_all
2009-12-27 21:15:12 +05:30
Pratik Naik
5cd8818258
Make Model.destroy_all use new finders
2009-12-27 19:22:18 +05:30
Pratik Naik
352cc7c94a
Make Model.find(:last) use relations
2009-12-27 19:12:50 +05:30
Pratik Naik
d5e98dc859
Add relation.last and relation.reverse_order
2009-12-27 19:04:30 +05:30
Pratik Naik
8957f5db5d
Make Model.all just a wrapper for find(:all)
2009-12-27 18:32:10 +05:30
Pratik Naik
d6d0fe8c8f
Make Model.find(:first, ..) use relations
2009-12-27 18:28:59 +05:30
Pratik Naik
59cf5e7bf2
Make Model.exists? use relation.exists?
2009-12-27 18:10:26 +05:30
José Valim
97db79ab3c
Remove ActiveRecord runtime logging from ActionPack and place in ActiveRecord, adding it through config.action_controller.include hook.
2009-12-27 13:32:40 +01:00
José Valim
7e8b7f46bf
Add config.action_controller.include behavior to plugins.
2009-12-27 13:31:36 +01:00
Pratik Naik
2c8f83556b
Add relation.exists?
2009-12-27 18:00:49 +05:30
Pratik Naik
b31233485b
Make Model.find(:all) use relations
2009-12-27 17:43:31 +05:30
Pratik Naik
a3f3fab795
Add relation.from as a temporary workaround until arel relation has .from option
2009-12-27 17:37:36 +05:30
Pratik Naik
6f5e3a04d6
Relation should supply :from to find_with_associations
2009-12-27 17:16:20 +05:30
José Valim
971f4ff829
DRY ActionMailer code.
2009-12-27 12:36:00 +01:00
Pratik Naik
7b5d0e8b78
Make Model.find(ids) use relations
2009-12-27 16:56:10 +05:30
José Valim
4747a9a57e
Getting rid of some warnings in AM suite.
2009-12-27 12:18:46 +01:00
José Valim
47e5caa96b
Merge Mail with latest Rails and move mail gem to Gemfile.
2009-12-27 12:09:20 +01:00
Pratik Naik
d92c4a8402
Add find(ids) to relations
2009-12-27 16:15:29 +05:30
Mikel Lindsaar
fd58a2d1da
Updating action_mailer to need mail 1.4.1
2009-12-27 21:42:33 +11:00
Mikel Lindsaar
331d375cc3
Changing body to use :to_s instead of :decoded... better use case
2009-12-27 20:56:16 +11:00
Pratik Naik
81608cf8fa
Make Model.all return an array rather than a relation for consistency. Use Model.scoped to get a relation
2009-12-27 15:06:45 +05:30
Pratik Naik
1efc8edb5f
Fix dynamic finder docs
2009-12-27 14:50:33 +05:30
Pratik Naik
85770ec713
Make Model.find_or_create_by_* and find_or_initialize_by_* use relations and remove method caching
2009-12-27 14:46:38 +05:30
Pratik Naik
d511de0261
Add find_or_create_by_* and find_or_initialize_by_* to relations
2009-12-27 14:28:19 +05:30
Pratik Naik
8829d6ecc6
Make Model.find_by_* and Model.find_all_by_* use relations and remove dynamic method caching
2009-12-27 13:17:29 +05:30
Mikel Lindsaar
d9aadb5b2d
Updating readme
2009-12-27 18:39:37 +11:00
Mikel Lindsaar
4e1fa4912d
Updating actionmailer to call :to_s on all field values instead of decoded
2009-12-27 18:38:30 +11:00
Jeremy Kemper
51d84eff12
Require bundled environment, if present, so Active Support can load i18n
2009-12-26 22:22:48 -08:00
Joshua Peek
bdf8ee44c5
script/server should init Rails by loading config.ru
...
Fixes "Rails 3.0 doesn't fucking work"
2009-12-26 18:23:48 -06:00
Pratik Naik
f6f416c58e
Add find_by_* and find_all_by_* finders to ActiveRecord::Relation
2009-12-27 03:25:29 +05:30
Pratik Naik
cc753eaf58
Replace Model.first(options) with new finder methods inside tests
2009-12-27 01:50:03 +05:30
José Valim
75ba102a80
Remove ActionView inline logging to ActiveSupport::Notifications and create ActionController::Base#log_event, so everything can be logged within one listener. Also expose log_process_action as a hook for different modules to include their own information during the action processing. This allow ActiveRecord to hook and any other ORM. Finally, this commit changes 'Processing' and 'Rendering' in logs to 'Processed' and 'Rendered' because at the point it's logged, everying already happened.
2009-12-26 20:28:53 +01:00
Joshua Peek
feb7382047
AD::Cascade that supports X-Cascade
2009-12-26 13:28:06 -06:00
Joshua Peek
673fa7f066
rack-mount 0.4
2009-12-26 13:25:36 -06:00
Joshua Peek
f53c36350d
Expect Rack 1.1
2009-12-26 13:25:35 -06:00
Pratik Naik
83f24afd44
Add new finder methods to association collection.
2009-12-27 00:25:00 +05:30
Pratik Naik
f374150698
Ensure Model.scoped adds type conditions for STI models
2009-12-27 00:11:31 +05:30
Pratik Naik
c6258ee313
Ensure all the finder methods respect scoping
2009-12-26 19:15:05 +05:30
José Valim
8a36e907d2
More <%= render(@posts) %> optimization.
2009-12-26 14:11:04 +01:00
José Valim
ff1a1c0b4d
Optimize <%= render(@posts) %>.
2009-12-26 14:11:04 +01:00
José Valim
c86424a72d
Break instrumentation into several end-points so rendering of partials can be optimized.
2009-12-26 14:11:04 +01:00
José Valim
48273a44c6
Wrap layout rendering in one method: _render_layout (this should make partial instrumentation easier).
2009-12-26 14:11:04 +01:00
José Valim
561885aea2
String#<< should work for any object which responds to :to_str, so enable this without the performance hit and make Fixnum safe by default.
2009-12-26 14:11:04 +01:00
Pratik Naik
9a9f97af28
Add relation.reload to force reloading the records
2009-12-26 15:31:50 +05:30
Pratik Naik
3c5a7dcaf5
Cache the loaded relations
2009-12-26 15:07:00 +05:30
Pratik Naik
9d3d60c64a
Ensure preload and eager_load finder methods accept multiple arguments
2009-12-26 14:40:45 +05:30
Pratik Naik
284d186cf4
Make sure the relations are always immutable
2009-12-26 14:26:02 +05:30
Pratik Naik
187fbe5cba
Add support for multiple arguments to .where finder
2009-12-26 12:57:34 +05:30
Pratik Naik
5f5aa44d2d
Add missing changelog entries
2009-12-26 12:43:49 +05:30
Pratik Naik
feb8b20eb5
Add Relation#all as an alias for to_a
2009-12-26 12:39:44 +05:30
Pratik Naik
a73fa9356f
Stop supporting blank arguments to AR#relation query methods
2009-12-26 04:07:50 +05:30
Pratik Naik
95274b28d9
Rename Model.conditions and relation.conditions to .where
2009-12-26 03:50:57 +05:30
Pratik Naik
1a99337180
No parentheses for assert_equal
2009-12-26 03:10:55 +05:30
Pratik Naik
a7fd564ab1
Add Model.select/group/order/limit/joins/conditions/preload/eager_load class methods returning a lazy relation.
...
Examples :
posts = Post.select('id).order('name') # Returns a lazy relation
posts.each {|p| puts p.id } # Fires "select id from posts order by name"
2009-12-26 03:06:51 +05:30
Yehuda Katz
8f6da9483b
Merge remote branch 'jose/am'
2009-12-25 13:06:11 -08:00
José Valim
9f1c359a20
Fix whiny_nil tests, improve error messages and make CI happy.
2009-12-25 22:00:36 +01:00
José Valim
88ba056043
Refactor multiple parts logic and move Utils to PartContainer.
2009-12-25 21:47:47 +01:00
José Valim
ee70d1b6ad
adv_attr_accessors in ActionMailer are not sent to the views, use the mailer object if you need to access the subject, recipients, from, etc.
2009-12-25 21:35:40 +01:00
Pratik Naik
2e79ec71a5
Model.scoped now returns a relation if invoked without any arguments
...
Example :
posts = Post.scoped
posts.size # Fires "select count(*) from posts" and returns the count
posts.each {|p| puts p.name } # Fires "select * from posts" and loads post objects
2009-12-26 01:33:20 +05:30
David Heinemeier Hansson
7f5d44bac5
The controller key shouldnt be part of the mapping if its not used
2009-12-25 10:14:44 -08:00
David Heinemeier Hansson
a8f1ee5986
Fix tests
2009-12-25 10:04:26 -08:00
José Valim
135d32c8bd
Move i18n to Gemfile.
2009-12-25 15:15:13 +01:00
José Valim
eb8e627c69
Merge branch 'master' of git://github.com/rails/rails
2009-12-25 12:09:13 +01:00
Yehuda Katz
1c66f85eb6
This code was needed to work around http://redmine.ruby-lang.org/issues/show/2494 . Since that bug is now closed in Ruby, we can remove it.
2009-12-24 23:48:35 -08:00
Yehuda Katz
3b1642c23c
Simplify and improve the performance of output_safety
2009-12-24 22:44:21 -08:00
Yehuda Katz
f3b072189a
Instead of marking raw text in templates as safe, and then putting them through String#<< which checks if the String is safe, use safe_concat, which uses the original (internal) String#<< and leaves the safe flag as is. Results in a significant performance improvement.
2009-12-24 21:50:18 -08:00
Yehuda Katz
baaaf2acaa
Dead code
2009-12-24 21:50:17 -08:00
David Heinemeier Hansson
0a365d63f6
Translated strings in the view are assumed html_safe ( Closes #3401 )
2009-12-24 20:32:53 -08:00
David Heinemeier Hansson
6ce5982afa
Stray carrier return
2009-12-24 16:13:50 -08:00
David Heinemeier Hansson
b9c0a16655
The new routes shortform now also works for :as
2009-12-24 16:08:03 -08:00
David Heinemeier Hansson
38af368360
Merge
2009-12-24 15:24:57 -08:00
David Heinemeier Hansson
2b7256a42e
Extract Mapping class from monster match method
2009-12-24 15:23:39 -08:00
Jeremy Kemper
46b376962f
Fix new schema test dependency on Hash#to_xml
2009-12-23 23:30:59 -08:00
Sam Ruby
aa3565f3a6
Allow named_routes to be used with root, and with new DSL short-form.
...
The real use case it to make all of the following act the same:
root 'store#index', :as => 'store'
match '/' => 'store#index', :as => 'store'
match '/', :to => 'store#index', :as => 'store'
The test case provided deviates from this in order to demonstrate all three
forms in a single set of test routes.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-12-23 20:55:21 -08:00
Carlhuda
84f1137ef8
Merge remote branch 'origin/master'
...
Conflicts:
railties/lib/rails/application.rb
2009-12-23 19:18:11 -08:00
Carlhuda
c4d6d50a46
Rackup config.ru from the correct directory
2009-12-23 19:10:44 -08:00
Carlhuda
af5c3c852e
Require active_support/all unless specifically requested to be left out.
2009-12-23 19:00:20 -08:00
Carlhuda
9653599a79
Remove the ActionView::Base autoload because it creates crazy circular autoload insanity
2009-12-23 18:59:49 -08:00
Jeremy Kemper
7a6f73e79b
Fix reference to Application#configuration to use #config
2009-12-23 17:47:38 -08:00
Carlhuda
d926fb62e8
Isolation tests intentionally avoid loading any state (because they're often testing things that have their own load path semantics that should not be polluted), so rack/test is not yet on the load path. Moving require "rack/test" into the setup means and after boot_rails means that it'll be required after the laod path has been altered to add in the Rails vendor/gems
2009-12-23 17:46:38 -08:00
Jeremy Kemper
4d3602a8c4
Routing: fix that route shorthand shouldn't ignore other options. Raise if :as option is given to root method since its name is always 'root'
2009-12-23 17:42:30 -08:00
Carlhuda
d2bd71a145
Finish moving config.frameworks-dependent code to the framework plugin
2009-12-23 17:23:29 -08:00
Jeremy Kemper
1ee50e58f6
Fix Rack::Lock middleware condition: use *unless* we allow concurrency
2009-12-23 17:14:21 -08:00
Jeremy Kemper
94bb331635
Shift more responsibility from application class to its singleton instance. Treat instantiation and boot as separate steps. Use app.config rather than app.configuration.
2009-12-23 17:11:17 -08:00
Carlhuda
61af34b001
Make /rails/info/properties work again. Also, the mocked up tests were passing so we added a test that actually tested this functionality.
2009-12-23 16:26:10 -08:00
Carlhuda
83be262b4b
Isolation tests intentionally avoid loading any state (because they're often testing things that have their own load path semantics that should not be polluted), so rack/test is not yet on the load path. Moving require "rack/test" into the setup means and after boot_rails means that it'll be required after the laod path has been altered to add in the Rails vendor/gems
2009-12-23 16:14:34 -08:00
Carlhuda
38aeb1528c
Moving out some framework specific initializers into the framework libraries.
2009-12-23 16:13:09 -08:00
Carlhuda
fa8dfc7d01
Raise an exception if an initializer is defined without a block
2009-12-23 15:16:38 -08:00
Carlhuda
dc677f7665
tests pass with requiring the frameworks in rails.rb
2009-12-23 15:16:38 -08:00
Jeremy Kemper
24e1b55608
Fix bare string Rack response bodies
2009-12-23 13:06:53 -08:00
Dwayne Litzenberger
808cad2bb4
Fix ActiveSupport::JSON encoding of control characters [\x00-\x1f]
...
According to RFC 4627, only the following Unicode code points are
allowed unescaped in JSON:
unescaped = %x20-21 / %x23-5B / %x5D-10FFFF
However, ActiveSupport::JSON did not escape the range %x00-1f. This caused
parse errors when trying to decode the resulting output.
[#3345 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-12-23 11:46:06 -08:00
José Valim
74098e4cb6
No need to use ValidationsRepairHelper hack on ActiveModel anymore, Model.reset_callbacks(:validate) is enough. However, tests in ActiveRecord are still coupled, so moved ValidationsRepairHelper back there.
2009-12-23 13:30:58 +01:00
José Valim
e31077c9aa
Small clean up in Naming and TTranslation tests.
2009-12-23 12:28:02 +01:00
José Valim
44cd9e0e71
ActiveRecord::Validations are now built on top of Validator as well.
2009-12-23 12:14:00 +01:00
Joshua Peek
74b2e00ce8
Require rack-mount 0.3.3
...
Fixes "Rack-mount boot time is slow as shit" [#3567 state:resolved]
2009-12-22 19:44:38 -06:00
David Heinemeier Hansson
e7ef57dd0d
Merge
2009-12-22 17:31:29 -08:00
David Heinemeier Hansson
ec095456d8
Dont auto require rubygems, move dep on rack-test to Gemfile
2009-12-22 17:29:25 -08:00
David Heinemeier Hansson
fe5f660413
Dont encourage __FILE__ bullshit
2009-12-22 17:25:34 -08:00
José Valim
279067639f
validates_each uses a BlockValidator.
2009-12-23 01:38:15 +01:00
José Valim
977a5c43b1
Added check_validity! to EachValidator and refactor existing ones.
2009-12-23 01:08:27 +01:00
Joshua Peek
f737c2d69b
All AMo modules are safe to defer
2009-12-22 17:39:41 -06:00
José Valim
f1085f4128
Move validations in ActiveModel to validators, however all validatity checks are still in the class method.
2009-12-23 00:36:51 +01:00
Joshua Peek
22752ec27c
All ARes modules are safe to defer
2009-12-22 17:36:29 -06:00
Joshua Peek
2e4e8d156c
All AM modules are safe to defer
2009-12-22 17:33:00 -06:00
Joshua Peek
ace20bd25e
Flip deferrable autoload convention
2009-12-22 17:27:37 -06:00
Joshua Peek
b1aee9f4ee
All AD modules are "deferrable"
2009-12-22 17:11:21 -06:00
Joshua Peek
2d0c703c92
Use Rack::Runtime middleware so the reported time includes the entire middleware stack
2009-12-22 16:18:22 -06:00
José Valim
2476c5312d
Validator is simply sent to validate method. However, the API needs to change, so validate accepts a record.
2009-12-22 23:12:21 +01:00
Joshua Peek
df7faef68e
Referer and user agent are in Rack::Request
2009-12-22 16:09:41 -06:00
Joshua Peek
a1bf2f96ce
AD::StatusCodes support is now part of rack
2009-12-22 16:08:03 -06:00
Joshua Peek
17b6053083
Float on rack/master in preparation for rack 1.1 gem release
2009-12-22 15:46:15 -06:00
José Valim
4964d3b02c
Make ActionMailer::Base inherit from AbstractController::Base
...
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local >
2009-12-22 11:29:06 -08:00
José Valim
4b8330d2d5
Merge branch 'master' of git://github.com/rails/rails
2009-12-22 08:26:00 +01:00
David Heinemeier Hansson
8e48a5ef0c
Add test for root
2009-12-21 21:49:36 -08:00
Joshua Peek
1de95077dc
Merge branch 'master' of github.com:rails/rails
...
Conflicts:
railties/test/initializer/initialize_i18n_test.rb
railties/test/initializer/path_test.rb
2009-12-21 20:41:25 -06:00
Joshua Peek
426348b484
Update routes.rb template to use App name
2009-12-21 20:15:27 -06:00
Jeremy Kemper
2e571e8f99
Blog -> Blog::Application. Leave the toplevel module up for grabs.
2009-12-21 17:03:21 -08:00
David Heinemeier Hansson
76e732a7be
Fix the documentation for root :to. It should use a fully qualified controller#action syntax ( Closes #3606 )
2009-12-21 16:54:04 -08:00
Carlhuda
be225adafb
Fix ActionMailer. The fact that ActionMailer::Base does not inherit from AbstractController::Base is either a bug or we need to re-evaluate the requirements of the mixins.
2009-12-21 16:49:21 -08:00
David Heinemeier Hansson
a43a9c81cf
Dont need to specify password_confirmation, that happens automatically
2009-12-21 16:41:02 -08:00
Carlhuda
d982fe2b2f
Replace reopening the class with App.configure as an alias to class_eval
2009-12-21 16:35:54 -08:00
Carlhuda
b0b4ae970c
test.rb, dev.rb, and production.rb just reopen the Application class; no more hax required
2009-12-21 16:03:26 -08:00
David Heinemeier Hansson
a110ff0fca
Dont introspect inline templates for the logger and cleanup a few styling issues
2009-12-21 16:03:04 -08:00
David Heinemeier Hansson
36624b2c70
Give the builtin controllers their own routes.rb now that the legacy catch-all is gone
2009-12-21 15:55:59 -08:00
David Heinemeier Hansson
fee07b9da0
Merge branch 'master' of github.com:rails/rails
2009-12-21 15:50:19 -08:00
David Heinemeier Hansson
cf66d16bdf
Its cookie_verifier_secret
2009-12-21 15:49:52 -08:00
Joshua Peek
880688a499
Default route was removed from default route config, patch up failing tests.
2009-12-21 17:47:03 -06:00
Joshua Peek
715dd10961
Less annoying RoutingError message
2009-12-21 17:34:53 -06:00
Joshua Peek
f82e1046f8
reset_session needs to be a real method so flash can override it
2009-12-21 17:29:59 -06:00
Joshua Peek
3e33985e19
Update CI bundler
2009-12-21 17:27:30 -06:00
David Heinemeier Hansson
81c3b0403d
Merge branch 'master' of github.com:rails/rails
2009-12-21 15:25:51 -08:00
Jeremy Kemper
bf03ddc636
Missed changelog entry for :inverse_of
2009-12-21 13:18:11 -08:00
David Heinemeier Hansson
fa8849a573
Merge branch 'master' of github.com:rails/rails
2009-12-21 11:28:16 -08:00
José Valim
5f34421c77
Merge branch 'master' of git://github.com/rails/rails
2009-12-21 11:21:27 +01:00
David Heinemeier Hansson
f09ad263ca
Turn filter_parameter_logging on by default for password and password_confirmation and remove contentless comments
2009-12-20 20:50:25 -08:00
David Heinemeier Hansson
f9a4cf1562
Show the new short-form in an example
2009-12-20 20:45:18 -08:00
David Heinemeier Hansson
3ff9e9ee14
Its now possible to use match 'stuff' => 'what#stuff' instead of using the :to for simple routes
2009-12-20 20:37:36 -08:00
David Heinemeier Hansson
8763b78f89
Merge branch 'master' of github.com:rails/rails
2009-12-20 19:41:05 -08:00
David Heinemeier Hansson
3506cb730b
Mark the wild controller route as legacy an comment it out
2009-12-20 19:40:18 -08:00
Joshua Peek
15f95621d5
We don't need AD parse_config
2009-12-20 21:11:42 -06:00
Yehuda Katz
17f66473bc
AC::Head now doesn't have an unfulfilled Rendering dependency, and instead works just fine standalone (which means that ConditionalGet also doesn't have a Rendering dependency)
2009-12-20 18:50:54 -08:00
David Heinemeier Hansson
eeda059818
Just a little tidying
2009-12-20 18:37:09 -08:00
David Heinemeier Hansson
91ce8d8b7f
Merge branch 'master' of github.com:rails/rails
2009-12-20 18:32:35 -08:00
David Heinemeier Hansson
cf9d6a95e8
Added ActionDispatch::Request#authorization to access the http authentication header regardless of its proxy hiding [DHH]
2009-12-20 18:30:50 -08:00
David Heinemeier Hansson
36c13cc07a
Rename RenderOptions to Renderers
2009-12-20 18:15:20 -08:00
Joshua Peek
29c8a43056
Rename RackConvenience => RackDelegation
2009-12-20 20:05:26 -06:00
Joshua Peek
0f8a5c7954
Merge Session stuff into RackConvenience
2009-12-20 20:00:04 -06:00
Yehuda Katz
b4ecb55551
Missing acts_like dependency
2009-12-20 17:38:28 -08:00
David Heinemeier Hansson
9b41e1e4d8
Renamed Redirector to Redirecting (its a module, not a class)
2009-12-20 17:25:13 -08:00
David Heinemeier Hansson
83f4d86a93
Rename the RenderingController module to just plain Rendering
2009-12-20 17:15:31 -08:00
Joshua Peek
bdccffc40e
Remove annoying and useless meta comments
2009-12-20 19:04:54 -06:00
Joshua Peek
2e9c775998
Use instance_eval for schema block
2009-12-20 19:04:53 -06:00
Joshua Peek
c0ad3f6cc6
Rename define_schema => schema
2009-12-20 19:04:53 -06:00
Joshua Peek
669c5eec44
Rename SchemaDefinition => Schema
2009-12-20 19:04:53 -06:00
Taryn East
fc9b3e4a45
define_schema for Active Resource
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-12-20 19:04:53 -06:00
Yehuda Katz
33a6bd390a
Fixes Dependency bug in ActiveSupport
2009-12-20 17:03:38 -08:00
David Heinemeier Hansson
c06aff0a7e
Added cookies.permanent, cookies.signed, and cookies.permanent.signed accessor for common cookie actions [DHH]
2009-12-20 14:33:13 -08:00
Yehuda Katz
e48b4c2dd0
:to => redirect() can take a String using 1.9-style interpolation or proc that takes the path parameters as a Hash
2009-12-20 14:07:32 -08:00
Yehuda Katz
8b4735fbd9
Add active_support/ruby/shim to the default requirements for AP components
2009-12-20 14:06:40 -08:00
Joshua Peek
2419fae092
Pending tests for AD Response
2009-12-17 22:10:37 -06:00
Joshua Peek
3b44f35e24
Don't need response prepare!
2009-12-17 22:10:37 -06:00
David Heinemeier Hansson
44fb54fecd
Models with no attributes should just have empty hash fixtures [Sam] ( Closes #3563 )
2009-12-17 17:53:16 -08:00
David Heinemeier Hansson
fa575973b1
Added alert/notice from 2-3-stable and refactored redirect_to into just living in Redirector [DHH]
2009-12-17 16:37:11 -08:00
David Heinemeier Hansson
2bfa477128
Fix deprecated :vendored_at option
2009-12-17 12:02:19 -08:00
Mikel Lindsaar
8950346f8a
Updating requirement for mail to 1.3.4
2009-12-17 13:17:35 +11:00
Mikel Lindsaar
f176c94663
Updating requirement for mail to 1.3.3
2009-12-17 12:35:07 +11:00
Mikel Lindsaar
63b124b043
Merged in latest changes from rails/master
2009-12-17 12:23:08 +11:00
Mikel Lindsaar
418639b4cf
Fixes for working with 1.9.1-head
2009-12-17 12:00:32 +11:00
Mikel Lindsaar
186cd7bc53
Merge branch 'rails'
...
Conflicts:
actionmailer/lib/action_mailer.rb
actionmailer/lib/action_mailer/delivery_method/smtp.rb
2009-12-17 11:24:02 +11:00
Joshua Peek
b9d4ceb43c
Need to lazy realize middleware options so they can be modified in
...
the environment
2009-12-16 16:12:04 -06:00
Joshua Peek
7217d64f61
Use AbstractController error constants
2009-12-16 16:11:42 -06:00
Joshua Peek
7ee5843c3c
Fully expand relative rails framework paths and make sure we aren't
...
adding any to the load path more than once.
2009-12-16 11:56:51 -06:00
Joshua Peek
1ab35020c1
Hush AMo test suite
2009-12-16 11:05:48 -06:00
Joshua Peek
c4df013852
ARes rake task should not worry about AS being in path
2009-12-16 11:03:40 -06:00
Joshua Peek
e1ee13e5fb
Hush ARes test suite
2009-12-16 11:03:13 -06:00
Joshua Peek
1ca567e634
Hush AM test suite
2009-12-16 10:56:10 -06:00
Joshua Peek
ee51ddcc27
Hush AS test suite
2009-12-16 10:52:52 -06:00
Will
bf6af5f719
When passing force_reload = true to an association, don't use the query cache [ #1827 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-12-16 10:49:53 -06:00
Carl Lerche
1b27f5c4f7
Add the ability for plugins to set default configuration settings.
2009-12-15 22:13:52 -08:00
Joshua Peek
f0bbc647c2
Procs don't call themselves
...
Fixes dev mode reloading [#3574 state:resolved]
2009-12-15 10:48:56 -06:00
Geoff Buesing
a4b19277b2
Add test for TimeWithZone#to_i with wrapped DateTime
2009-12-15 08:28:24 -06:00
Serguei Filimonov
2ae8300489
Added #to_i to DateTime in ActiveSupport so #to_yaml works correctly on ActiveRecord models with DateTime attributes.
2009-12-15 08:15:21 -06:00
David Heinemeier Hansson
7b61541ea5
Add Enumerable#exclude? to bring parity to Enumerable#include? and avoid if !x.include?/else calls [DHH]
2009-12-14 18:00:14 -08:00
Joshua Peek
5f8e48cbd2
Move route reloading into railties
2009-12-14 17:54:41 -06:00
Joshua Peek
ce970a8bb9
Remove route loading tests since it should be tested by railties
2009-12-14 16:52:22 -06:00
Joshua Peek
ec99eca013
Fix loading plugin and engine route sets
2009-12-14 16:51:13 -06:00
Joshua Peek
70c3e825fc
Fix response_body warning in AC
2009-12-14 16:07:46 -06:00
Joshua Peek
bcb686054a
Hush loading AR unless it fails
2009-12-14 16:01:23 -06:00
Joshua Peek
819a353c44
Hush AP test suite
2009-12-14 15:55:05 -06:00
Joshua Peek
1c52bca266
Fix warning in AC flash
2009-12-14 15:54:27 -06:00
Joshua Peek
2130566acf
Fix warnings in AD::Response
2009-12-14 15:47:52 -06:00
Joshua Peek
f70079efb1
Fix warnings in railties configuration and initializeable
2009-12-14 15:42:48 -06:00
Yehuda Katz
ffb351713e
Modify backtrace test to take implementations with slightly different backtrace output into consideration.
2009-12-13 10:40:00 -05:00
Yehuda Katz
0f7f90d25b
Extract descendents a bit so it can take advantage of Rubinius' __subclasses__.
2009-12-13 10:39:10 -05:00
Joshua Peek
25bb301d9c
Forgot to revert tests from that last commit
2009-12-12 21:03:45 -06:00
Joshua Peek
8a50f8a545
Revert "Fix instance_eval calls to association proxies"
...
I think it may of broke the build. Lets see.
This reverts commit 49e943c4f0 .
Conflicts:
activerecord/test/cases/associations/has_many_associations_test.rb
2009-12-12 19:58:54 -06:00
Joshua Peek
39b708be96
rendering controller needs base
2009-12-12 19:50:12 -06:00
Joshua Peek
71cd5b9568
Don't require AD test_case
2009-12-12 19:44:52 -06:00
Joshua Peek
289c9a24fc
Nearly all AC modules can be deferred
2009-12-12 19:41:58 -06:00
Joshua Peek
9cc9949817
All AbstractController modules are deferrable
2009-12-12 19:28:03 -06:00
Joshua Peek
4b4e517bf1
Relocate AbstractController exceptions into their proper parent modules
2009-12-12 18:48:34 -06:00
Joshua Peek
018dafe574
Allow autoloads to opt out of eager loading
2009-12-12 18:41:26 -06:00
Joshua Peek
ee395fe626
TestProcess belongs in AD
2009-12-12 18:09:44 -06:00
José Valim
cf7b94c013
Merge branch 'master' of git://github.com/rails/rails
2009-12-11 19:24:32 -02:00
John Pignata
96deabace7
Fix postgresql AR test failure
...
Due to the ordering of the returning result set, the test fails under the postgresql adapter. Order results by id prior to checking the first item
[#3542 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-12-11 15:15:12 -06:00
Joshua Peek
2297eaed5b
"new" and "edit" name routes always need to be prepend to the
...
named_route [#3561 state:resolved]
2009-12-11 12:46:50 -06:00
Joshua Peek
61e9f2023b
Use rackmounts recognize api and don't piggyback recognize_path on
...
top of rack call
2009-12-11 00:11:16 -06:00
Joshua Peek
588225f885
Remove fancy method not allowed resource exceptions since they are
...
too much of a hack
2009-12-11 00:01:22 -06:00
Joshua Peek
2f90d70049
Kill RouteSet#recognize
2009-12-10 23:45:04 -06:00
Joshua Peek
d1191507bc
Cleanup generate_extras build/parse mess
2009-12-10 22:57:07 -06:00
Joshua Peek
1b82590c36
Reduce usage of interpret_status. It should also return a integer
...
not a string.
2009-12-10 22:02:50 -06:00
Nathan Weizenbaum
c517a4fb9a
Add autoloads for ActionView::Template* classes, and an ActionView::TemplateError alias for ActionView::Template::Error.
...
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local >
2009-12-10 13:11:21 -08:00
Yehuda Katz
8b9275340f
Merge branch 'master' of github.com:rails/rails
2009-12-10 13:11:15 -08:00
Joshua Peek
ec5434c3c2
Check block arity passed to routes draw so you don't need to use
...
|map|
2009-12-09 20:46:32 -06:00
Joshua Peek
b2ef6d13f0
Fixed old routing mapper example in generated routes.rb
2009-12-09 20:39:42 -06:00
Joshua Peek
0fec53f243
Scaffolding generates new routing dsl examples
2009-12-09 18:57:16 -06:00
Carlhuda
f9d570bdd8
Simpler RenderOption API -- removes the need for registering the types and extending a module
2009-12-09 13:40:49 -08:00
Joshua Peek
9fbde11b8b
More test porting
2009-12-08 17:41:00 -06:00
Joshua Peek
511cef296b
Tack format onto resource routes
2009-12-08 17:19:49 -06:00
Joshua Peek
2be5e088d2
Use new routing dsl in tests
2009-12-08 16:52:26 -06:00
Joshua Peek
ac711043ec
Fix ambiguous access_token scoping example
2009-12-08 16:15:25 -06:00
Joshua Peek
ce5f27b04b
Remove double scoping blocks and just use one
2009-12-08 16:13:00 -06:00
Joshua Peek
c4df6332a4
Seperate scope level for nesting resources
2009-12-08 16:06:46 -06:00
Joshua Peek
33658ea1ae
Don't use name prefix by itself unless as is an empty string
2009-12-08 15:50:44 -06:00
Joshua Peek
3d91d7f0a2
Routes added under resource collection should be prefixed with
...
resource collection name
2009-12-08 15:31:56 -06:00
Joshua Peek
1fc58a889d
Fixed named prefix scope in resource member and collection actions
2009-12-07 20:57:01 -06:00
Joshua Peek
0c34e3f41a
Ignore name_prefix unless there is an explicit name
2009-12-07 20:11:57 -06:00
Joshua Peek
81d7227c9b
Move base mapper methods into Base module so plugins can easily
...
extend the mapper
2009-12-07 19:59:23 -06:00
Joshua Peek
e86a82c52c
Move name_prefix merging into Scoping concern
2009-12-07 19:50:13 -06:00
Joshua Peek
e600b41c7f
Cleanup resource scoping by passing down the parent resource object
...
in the scope
2009-12-07 19:47:47 -06:00
Joshua Peek
5835447b6f
named_prefix doesn't join with "_"
2009-12-07 19:31:29 -06:00
Joshua Peek
e8489b43e2
Allow name_prefix to be pass into scope
2009-12-07 19:24:33 -06:00
Joshua Peek
40ad54e381
Allow scope to take :path and :controller options
2009-12-07 18:28:02 -06:00
Joshua Peek
66375434b6
Pass symbol in as route name when match is used with a symbol
2009-12-07 17:22:09 -06:00
José Valim
2ecfa817c9
Responder redirects to resource if destroy fails.
...
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local >
2009-12-07 15:05:27 -08:00
José Valim
324fa688fc
Make controller.flash public to be used in responders.
...
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local >
2009-12-07 15:05:12 -08:00
Joshua Peek
48127c637c
Deprecate recalling generation params when the defaults are nil
2009-12-06 20:40:07 -06:00
Jeremy Kemper
63e435955e
Ruby 1.9.2: explicitly raise NoMethodError for explicit coercion attempts
2009-12-06 18:22:09 -08:00
Jeremy Kemper
071af66e9e
Ruby 1.9.2: explicitly raise NoMethodError for explicit coercion attempts. Calling super gives us NameErrors.
2009-12-06 18:03:18 -08:00
Jeremy Kemper
adc2115132
Remove assert_raises usage that only test-unit 1 supports. Breaks minitest and test-unit 2.
2009-12-06 17:23:43 -08:00
Joshua Peek
4663f75f6b
Update rackmount to fix some pending tests
2009-12-05 13:10:00 -06:00
Gabe da Silveira
32395899d7
Replace reset_counter_cache with reset_counters that has API inline with existing update_counters method
...
[#1211 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-12-03 23:25:11 -08:00
Ben Marini
e55284e825
Add support for Mysql column positioning via #add_column and #change_column
...
add_column and change_column in the Mysql adapter now accept some
additional options:
:first => true # Put the column in front of all the columns
:after => column_name # Put the colmn after 'column_name'
add_column :new_col, :string, :first => true
add_column :another_col, :integer, :default => 0, :after => :new_col
[#3286 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-12-03 23:09:57 -08:00
Yehuda Katz
96e0638ce2
Should fix a few Sam Ruby fails.
2009-12-03 09:06:01 -08:00
Carlhuda
c1304098cc
Reorganize autoloads:
...
* A new module (ActiveSupport::Autoload) is provide that extends
autoloading with new behavior.
* All autoloads in modules that have extended ActiveSupport::Autoload
will be eagerly required in threadsafe environments
* Autoloads can optionally leave off the path if the path is the same
as full_constant_name.underscore
* It is possible to specify that a group of autoloads live under an
additional path. For instance, all of ActionDispatch's middlewares
are ActionDispatch::MiddlewareName, but they live under
"action_dispatch/middlewares/middleware_name"
* It is possible to specify that a group of autoloads are all found
at the same path. For instance, a number of exceptions might all
be declared there.
* One consequence of this is that testing-related constants are not
autoloaded. To get the testing helpers for a given component,
require "component_name/test_case". For instance, "action_controller/test_case".
* test_help.rb, which is automatically required by a Rails application's
test helper, requires the test_case.rb for all active components, so
this change will not be disruptive in existing or new applications.
2009-12-02 20:01:08 -08:00
José Valim
6e55b32e98
Merge branch 'master' of git://github.com/rails/rails
2009-12-02 22:29:34 -02:00
Joshua Peek
399909b11c
Use to_query in route query string generation
2009-12-02 15:23:26 -06:00
Joshua Peek
856d2fd874
Quick fix for not escaping []s (not ideal)
2009-12-02 15:17:08 -06:00
Joshua Peek
1ee9b40b18
Failing tests for to_param/to_query not escaping "[]"
2009-12-02 15:08:42 -06:00
Mat Brown
49e943c4f0
Fix instance_eval calls to association proxies
...
In the current stable, ActiveRecord::Associations::AssociationProxy#method_missing calls yield() if a block is given, causing the block to always be evaluated in its calling context. However, in the case of instance_eval, correct behavior requires that the block be passed directly to the @target, rather than being evaluated inside a different block. Incidentally, this also simplifies the code slightly.
[#3412 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-12-02 12:47:09 -08:00
Mike Breen
50c28e78c7
Implement ActiveRecord#reset_counter_cache
...
[#1211 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-12-02 12:20:00 -08:00
Joshua Peek
de2cd8e39f
Merge branch 'master' of github.com:rails/rails
2009-12-02 14:12:35 -06:00
Joshua Peek
8db038227c
Move controller namespace tracking into route set so it gets
...
reloaded in dev mode
2009-12-02 14:10:22 -06:00
Carlhuda
c446b1b12b
Ignore all pkg files
2009-12-02 11:35:48 -08:00
Carlhuda
6680f9c4d7
Fix an ivar name conflict in Rails::Server
2009-12-02 11:35:47 -08:00
Carlhuda
fe41c7030b
Stop evalling the environment file in favor of require + setting a Kernel#config. This will fix the bug where reopening classes caused them to be overwritten.
2009-12-02 11:35:47 -08:00
Carlhuda
39034997d1
Add support for bare ActiveSupport via config.active_support.bare
2009-12-02 11:35:47 -08:00
Carlhuda
8ff310aef4
Break up rails and railties:
...
* rails is now a metagem (gem install rails works as it does now)
* railties includes the glue layer, so you can easily declare dependencies
on railties, actionpack, and actionmailer and not get ActiveRecord's rake
tasks, initializers, etc.
2009-12-02 11:35:47 -08:00
Carlhuda
abfc4dad3e
Remove global Rails initializers
2009-12-02 11:35:47 -08:00
Joshua Peek
4dee277a9b
Stop escaping "[]" in query string
2009-12-02 12:46:14 -06:00
Joshua Peek
c0949cc8f6
Rackmount 0.3.0
2009-12-02 12:38:25 -06:00
Joshua Peek
84be6cfb64
Fork rack build nested query to support to_param
2009-12-02 12:33:33 -06:00
Jeremy Kemper
de40bc033a
Ensure Cache-Control max-age is an integer
2009-12-02 03:23:00 -08:00
Joshua Peek
ad26f066fe
Response#write is defined twice (this is why -w is good)
2009-12-01 23:29:28 -06:00
Joshua Peek
f22db809c9
Response#cache_control is defined later
2009-12-01 23:27:40 -06:00
Joshua Peek
e12380e787
Remove concat before overriding it
2009-12-01 23:25:24 -06:00
Joshua Peek
70d0b7c87a
Fix parens warning in ajax test
2009-12-01 23:19:41 -06:00
Joshua Peek
75ae5bb022
cache_store and page_cache_directory are already defined in caching
...
and pages
2009-12-01 23:14:03 -06:00
Joshua Peek
5d9af09563
Silence known internal AM deprecation calls
2009-12-01 23:01:21 -06:00
Joshua Peek
97be8537eb
Fix @renderer warning
2009-12-01 22:58:56 -06:00
Joshua Peek
2fbd6f46fd
Simply track controller namespaces instead of a complete list of
...
possible controllers to route to
2009-12-01 22:48:42 -06:00
Joshua Peek
7fe19d415a
Make recognize try to constantize controller to see if it exists
2009-12-01 22:22:48 -06:00
Joshua Peek
30ae3538a3
Some basic route discovery tests
2009-12-01 21:19:20 -06:00
José Valim
28657e4f41
Update vendored thor and ensure that content is completely modified before checking file collisions.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-12-01 17:51:10 -08:00
Jeremy Kemper
74be70039f
Avoid using unrequired core extensions
2009-12-01 15:07:41 -08:00
Jeremy Kemper
544de09631
rails:update:configs updates boot.rb and the rest of config/*
2009-12-01 13:37:29 -08:00
Jeremy Kemper
df9f5e771b
Reinstate rails:update:configs task removed in e1fdc8b
2009-12-01 13:37:29 -08:00
Jeremy Kemper
fe319103db
Fix rails:update:scripts
2009-12-01 13:37:29 -08:00
Joshua Peek
44587b7fae
Merge branch 'master' of github.com:rails/rails
2009-12-01 14:53:39 -06:00
Joshua Peek
61a31f3d3d
Fix generating params with optional defaults [ #3404 state:resolved]
2009-12-01 14:52:19 -06:00
Jeremy Kemper
0c4990b5f4
Fix caching test to ensure notifications are all delivered
2009-12-01 12:19:42 -08:00
José Valim
6e30361260
Allow ActionController::Responder to have a common entry point for all formats.
...
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local >
2009-12-01 08:23:43 -08:00
José Valim
c2e97cb410
Merge branch 'master' of git://github.com/rails/rails
2009-12-01 13:00:34 -02:00
Joshua Peek
6ac32a8328
Define a welcome controller in mailer tests
2009-11-29 18:28:45 -06:00
Joshua Peek
075f50d62c
Fix some nested resource generation tests
2009-11-29 18:17:14 -06:00
Joshua Peek
f69f9820ee
Wrap up http related routing helpers
2009-11-29 17:45:12 -06:00
Joshua Peek
312c3bfa24
Break down long match routing method
2009-11-29 17:39:37 -06:00
Joshua Peek
5da01a92c7
Make use of extract_options!
2009-11-29 17:01:14 -06:00
Joshua Peek
40ae2070d5
Extract Resource and SingletonResource helper objects
2009-11-29 16:59:44 -06:00
Joshua Peek
8815fefd16
Bump required rack-mount version to 0.2.3
2009-11-29 15:34:46 -06:00
Joshua Peek
b87c13242c
Remove rackmount submodule
2009-11-29 15:26:55 -06:00
Joshua Peek
3f025e6408
Resource collection should be defined before member routes
2009-11-29 15:23:27 -06:00
Jeremy Kemper
327545c3ae
Notifications: synchronous fanout queue pushes events to subscribers rather than having them concurrently pull
2009-11-29 02:30:35 -08:00
Bryan Helmkamp
bb84cab2fc
Update reference to deprecated constant to avoid warnings
2009-11-28 23:41:03 -08:00
Yehuda Katz
45d8ff08a4
Remove reference to class that doesn't exist (ht: brynary)
2009-11-28 21:36:58 -08:00
Jeremy Kemper
4f2a04cc08
Notifications: extract central Notifier, cordon off the internal Fanout implementation, and segregate instrumentation concerns
2009-11-28 12:50:09 -08:00
Jeremy Kemper
02893d1705
Remark that Listener is an implementation detail
2009-11-28 12:50:09 -08:00
Jeremy Kemper
ddf681ce1d
Expose a simple Queue#wait to block until all notifications are drained
2009-11-28 12:50:09 -08:00
Jeremy Kemper
6f7fc5824f
Revert "Create SyncListener. Since they do not rely on Thread, they can be used on Google App Engine."
...
Take a step back on this API direction.
This reverts commit 8104f65c32 .
2009-11-28 12:50:09 -08:00
Jeremy Kemper
eeb1afa200
Expand path relative to __FILE__
2009-11-28 12:50:09 -08:00
Michael Koziarski
7e0aa35c20
avoid generating invalid SMTP commands in ruby pre 1.9
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
Conflicts:
actionmailer/lib/action_mailer/base.rb
2009-11-28 13:34:05 +13:00
José Valim
fc3629f6ca
Merge branch 'master' of git://github.com/rails/rails
2009-11-25 23:25:32 -02:00
Carl Lerche
02c3c9dfbc
Fix the application.rb generator
2009-11-25 14:52:56 -08:00
Carl Lerche
25b8e996bd
Fix the rackup test to correctly use Rack::Builder.parse_file
2009-11-25 14:45:12 -08:00
Carl Lerche
34eac1cf1c
Load application specific rake tasks in the application object
2009-11-25 14:29:28 -08:00
Jeremy Kemper
71a6b0465b
Revert "macruby: no format_datetime or msg2str"
...
Obviated by fix in macruby trunk.
This reverts commit 6d91e7dca1 .
2009-11-24 17:15:35 -08:00
Carlhuda
530b8ff5ae
Have script/* and Rakefile use the application object
2009-11-24 14:36:30 -08:00
Carlhuda
a2cb90c0c2
Refactor script/dbconsole into an object
2009-11-24 13:05:21 -08:00
Jeremy Kemper
d8c5ea76bc
Use Rails.env after loading environment
2009-11-24 10:46:16 -08:00
Joshua Peek
fa007e591d
Quieter rake test runner
2009-11-24 12:04:36 -06:00
José Valim
41e607dee2
Merge branch 'master' of git://github.com/rails/rails
2009-11-24 09:24:40 -02:00
Mikel Lindsaar
5f2395041d
Merge branch 'master' of git://github.com/rails/rails into rails_master
2009-11-24 21:45:14 +11:00
Jeremy Kemper
e62e6d4099
Add a dead --irb option mentioning upgrade path
2009-11-23 22:09:36 -08:00
Jeremy Kemper
0088ceb6fa
Set RAILS_ENV before loading config/environment
2009-11-23 22:07:37 -08:00
Joshua Peek
59dbae145b
Privatize Routing.possible_controllers and fix brittle url helper
...
controller test loading.
2009-11-23 21:50:21 -06:00
Joshua Peek
15ab3a98a1
Find all controllers in memory to use for routing
2009-11-23 20:20:50 -06:00
Joshua Peek
f987e8561c
with_controllers is no longer used
2009-11-23 19:45:42 -06:00
Joshua Peek
8d351eac07
Extract Routing.controller_constraints
2009-11-23 19:44:43 -06:00
Carlhuda
53d7acdf4f
Refactor script/console into an object and use IRB.start instead of calling exec.
2009-11-23 17:28:50 -08:00
Carlhuda
a080323cb0
Refactor script/server into an object that inherits from Rack::Server
2009-11-23 17:28:50 -08:00
Carlhuda
58dec09353
Update rails application root detection to take into consideration a callstack that includes the rack library
2009-11-23 17:28:50 -08:00
Carlhuda
c102db9367
Updates notifications tests in railties to reflect changes to the notifications API
2009-11-23 17:28:50 -08:00
Joshua Peek
350d3daa88
Remove inflection reloads routes test
2009-11-23 19:25:39 -06:00
Joshua Peek
01c9f99c53
Kill dead routing internals helpers
2009-11-23 19:17:53 -06:00
Joshua Peek
ef771552b7
Don't really care about reloading routes when inflections are
...
changed.
2009-11-23 18:59:48 -06:00
José Valim
16cf25e717
Merge branch 'master' of git://github.com/rails/rails
2009-11-23 22:40:55 -02:00
Jeremy Kemper
eeb1f472a5
RAILS_ENV falls back to RACK_ENV
2009-11-23 16:10:51 -08:00
Joshua Peek
0ddba7cf66
Require rackmount >= 0.2.2
2009-11-23 18:07:18 -06:00
José Valim
4ff66b6b85
Merge branch 'master' of git://github.com/rails/rails
2009-11-23 22:04:18 -02:00
Yehuda Katz
934bb012ba
Fixes remote errors in isolation tests
2009-11-23 15:42:25 -08:00
Jeremy Kemper
ada895e8ca
Merge branch 'master' into mail
2009-11-23 15:32:41 -08:00
Jeremy Kemper
671538cd6e
Merge commit 'mikel/master' into mail
...
Conflicts:
actionmailer/lib/action_mailer.rb
2009-11-23 15:29:35 -08:00
Mikel Lindsaar
3a72923e27
Change require mail version to 1.3.0
2009-11-24 09:38:00 +11:00
Mikel Lindsaar
2e453d930d
Changed deprecation to use ActiveSupport::Deprecation
2009-11-24 09:33:05 +11:00
Jeremy Kemper
f8d06e62a9
Pending test now passing
2009-11-23 14:07:54 -08:00
David Heinemeier Hansson
35eda7d6d2
Fixed that the debugger wouldn't go into IRB mode because of left-over ARGVs [DHH]
2009-11-23 15:36:48 -06:00
Jeremy Kemper
78790e47b8
Revert "Revert "Assert primary key does not exist in habtm when the association is defined, instead of doing that everytime a record is inserted.""
...
This reverts commit 2b82708b0e .
[#3128 state:resolved]
Conflicts:
activerecord/lib/active_record/associations.rb
activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
2009-11-23 10:42:32 -08:00
Jeremy Kemper
ca5de16ddc
Add mail dep to AM gemspec
2009-11-23 09:57:53 -08:00
José Valim
d0aa0cfbd7
Ensure generator fallbacks work even when a context is given.
...
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local >
2009-11-23 09:08:48 -08:00
José Valim
d6f10126eb
Also load generators at lib/rails_generators.
...
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local >
2009-11-23 09:08:33 -08:00
José Valim
8104f65c32
Create SyncListener. Since they do not rely on Thread, they can be used on Google App Engine.
...
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local >
2009-11-23 09:08:17 -08:00
Mikel Lindsaar
906e308220
Fixed up incompatible encoding problem for Ruby 1.9 in test suite
2009-11-23 20:58:22 +11:00
Mikel Lindsaar
cc391c3022
Deprecating attachment :body => 'string' in favour of attachment :data => 'string'
2009-11-23 20:53:07 +11:00
Mikel Lindsaar
a6eed86c33
Removing utils, and updating requires to match
2009-11-23 20:50:49 +11:00
Jeremy Kemper
d98fee67e2
Never require jcode
2009-11-22 15:41:29 -08:00
Jeremy Kemper
e6bce95580
Rely on gemspec and bundled env for gem dependency. We just require it.
2009-11-22 15:08:01 -08:00
Jeremy Kemper
0f9029ec48
Explicit source no longer needed, default gems source points to gemcutter.
2009-11-22 14:34:11 -08:00
Jeremy Kemper
c5509a056c
Bundle mail 1.2.8
2009-11-22 13:00:31 -08:00
Jeremy Kemper
e68bc3f14e
Merge commit 'origin/master' into mail
2009-11-22 10:31:47 -08:00
Mikel Lindsaar
3cb46b40a0
Opps.. need to require it as well as gem mail :)
2009-11-22 23:36:30 +11:00
Mikel Lindsaar
06c5270343
Adding mail as a gem load
2009-11-22 23:34:39 +11:00
Mikel Lindsaar
747d56881a
131 tests, 309 assertions, 0 failures, 0 errors
2009-11-22 23:20:57 +11:00
Jeremy Kemper
6d91e7dca1
macruby: no format_datetime or msg2str
2009-11-21 19:11:50 -08:00
Jeremy Kemper
e1935e3c0c
Fix Rails::Rack::Static deprecated constant proxy
2009-11-21 10:45:42 -08:00
Mikel Lindsaar
f6f70540bb
Updating tests for Mail gem
2009-11-22 00:04:36 +11:00
Mikel Lindsaar
0e38f5bdcc
131 tests, 266 assertions, 9 failures, 6 errors
2009-11-21 23:55:53 +11:00
Mikel Lindsaar
6456a08334
Down to 13 failures, 14 errors
2009-11-20 22:01:40 +11:00
Mikel Lindsaar
a5e6295d72
Down to 30 failures total
2009-11-20 21:19:10 +11:00
Mikel Lindsaar
539d9b355f
More updates... 45 errors left to get it working with Mail gem
2009-11-20 14:10:57 +11:00
Jeremy Kemper
0ce9206541
Update gemspec also
2009-11-19 18:31:50 -08:00
Joshua Peek
74a0fb9722
Should be rackmount 0.2
2009-11-19 18:08:38 -08:00
Joshua Peek
4236473e31
Depend on rack-mount 0.0.2
2009-11-19 17:59:26 -08:00
Joshua Peek
6e67f88a11
Extended and case insensitive regexp routes aren't that important.
...
Mark them as pending till I figure it out.
2009-11-19 17:58:57 -08:00
Joshua Peek
4b325fcd1a
Update routing for rackmount 0.2 api changes
2009-11-19 17:58:57 -08:00
Jeremy Kemper
c7c39f52dc
Revert "Final steps toward clean rails "foo"; cd foo; gem bundle; script/server working"
...
Broke stuff.
This reverts commit 520b8b5911 .
2009-11-19 15:24:00 -08:00
Joshua Peek
5df26dd7a9
Add basic nested named route support to new routing dsl. Also add a
...
bunch of pending tests.
2009-11-19 09:04:53 -08:00
Jeremy Kemper
0dfd993e77
Fix test bleed
2009-11-18 17:54:27 -08:00
Yehuda Katz + Carl Lerche
520b8b5911
Final steps toward clean rails "foo"; cd foo; gem bundle; script/server working
2009-11-18 16:28:37 -08:00
Jeremy Kemper
4403dfac6c
Check whether another lib has implemented ruby 1.9 string interp syntax
2009-11-18 11:33:41 -08:00
Jeremy Kemper
e1385be025
Extract form_authenticity_param instance method so it's overridable in subclasses
2009-11-17 23:40:06 -08:00
Gabe da Silveira
ea290e77e6
Insert generated association members in the same order they are specified when assigning to a has_many :through using the generated *_ids method
...
[#3491 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-11-17 22:25:40 -08:00
Jeremy Kemper
fb61fbd352
Revert "Ensure Model#destroy respects optimistic locking"
...
[#1966 state:open]
This reverts commit 0d922885fb .
Conflicts:
activerecord/lib/active_record/locking/optimistic.rb
2009-11-17 15:35:35 -08:00
Joshua Peek
f8877d4b2a
Merge remote branch 'Fingertips/master'
2009-11-16 21:03:27 -06:00
Yehuda Katz
c2997017f7
Make script/server work with correct application.rb
2009-11-16 13:58:08 -08:00
Yehuda Katz
2675ba9ef4
Require action_dispatch, not action_controller
2009-11-16 12:37:43 -08:00
Yehuda Katz
c1f5168073
Temporarily add submodules to the Rails repo for Arel and Rack::Mount. These submodules will be removed once we add proper Gemfile following to bundler
2009-11-16 12:30:06 -08:00
Will Read
7fadb3f261
Allow explicit placement of hidden id element for nested models.
...
[#3259 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-11-15 21:47:57 +01:00
Jeremy Kemper
7601d482bd
Ruby 1.9: skip pg locking test for 1.9.1 also
2009-11-15 10:28:58 -08:00
Yehuda Katz
cc011bc2be
Add TimeZone dependency
2009-11-14 19:33:58 -08:00
Jeremy Kemper
bc1538e995
Repair time dependencies
2009-11-14 11:37:06 -08:00
Jeremy Kemper
74e1ff9dc2
Loosen optional gem deps from ~> to >=
2009-11-14 03:32:35 -08:00
Jeremy Kemper
3ee9b8f2b2
Remove Gemfile deps duplicated from AP gemspec
2009-11-14 03:27:18 -08:00
Jeremy Kemper
795213a5f4
Just use abstract_unit
2009-11-14 03:27:18 -08:00
Jeremy Kemper
313a7ea9d6
Fix bundler environment check
2009-11-14 03:27:18 -08:00
Jeremy Kemper
61843595ea
No need for test stub
2009-11-14 03:27:18 -08:00
Jeremy Kemper
364a8f3902
No need to check for generated method, just redispatch
2009-11-14 01:51:52 -08:00
Jeremy Kemper
6ebb061b18
Ruby 1.9.2: use recursive flatten
2009-11-14 01:50:47 -08:00
Jeremy Kemper
f0f4dffd3b
Skip pg locking test due to connection checkout deadlock detection
2009-11-14 01:22:36 -08:00
Jeremy Kemper
7eb4f2ecc5
Consolidate date & time landscape: require 'active_support/time'
2009-11-14 01:13:54 -08:00
Jeremy Kemper
92253829de
Ruby 1.9.2: fix flatten_deeper to preserve nils
2009-11-14 01:12:49 -08:00
Jeremy Kemper
58c0d31487
Notifications: queue.drained? for testability in place of brittle sleeps
2009-11-13 20:58:38 -08:00
Jeremy Kemper
66fda6b894
Fix duration check for longer sleep
2009-11-13 19:28:59 -08:00
Jeremy Kemper
7ab78b9ccd
CI: slow down brittle notifications tests
2009-11-13 18:57:10 -08:00
Jeremy Kemper
7b3d85db4c
Revert "Split arel_table into method to get a relation and another to memoize the default relation."
...
This reverts commit bd51790895 .
2009-11-13 15:30:51 -08:00
Jeremy Kemper
3f54f3100b
Ruby 1.9.2: StringIO no longer has #path
2009-11-13 13:10:28 -08:00
Jeremy Kemper
2841a14f4b
Ruby 1.9.2: fix broken to_ary expectation
2009-11-13 12:42:49 -08:00
Jeremy Kemper
9acc824d96
Ruby 1.9.2: disallow explicit coercion via method_missing. Only give friendly nil errors for Array and Active Record methods.
2009-11-13 12:25:54 -08:00
Jeremy Kemper
0214d337b3
Rescue handlers should never need array wrapping. Bug if so.
2009-11-13 11:00:18 -08:00
Jeremy Kemper
bd51790895
Split arel_table into method to get a relation and another to memoize the default relation.
2009-11-13 10:53:19 -08:00
Jeremy Kemper
0da71980cd
Missing customers fixture
2009-11-13 10:38:23 -08:00
Jeremy Kemper
3fd2624be4
Uses Hash#reverse_merge
2009-11-13 10:31:05 -08:00
Jeremy Kemper
fbbf0086ca
Ruby 1.9.2: avoid #flatten
2009-11-13 09:52:53 -08:00
Jeremy Kemper
18d4976516
Prefer Array.wrap to Array()
2009-11-13 09:52:53 -08:00
Jeremy Kemper
f07bcf015e
Ruby 1.9.2: work around Array allowing method_missing for to_ary
2009-11-13 09:52:53 -08:00
Jeremy Kemper
c0ebc21493
Test that Array.wrap works with proxy objects and structs
2009-11-13 09:52:52 -08:00
José Valim
2cb47c742f
Split mime responder into smaller chunks and allow action to be configured.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-11-13 09:52:52 -08:00
Joshua Peek
a28d0ea33e
Remove rackmount const usage
2009-11-12 23:33:30 -06:00
Jeremy Kemper
2da432dde3
Always bundle pg and mysql for AR tests
2009-11-12 11:26:55 -08:00
David Vrensk
af44b07649
Rdoc for changes introduced in e2ed1a1ca, 36058f450.
...
[#3451 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-11-12 11:21:44 -08:00
Mikel Lindsaar
15d7cac282
Starting again on actionmailer integration with mail
2009-11-12 16:08:50 +11:00
Yehuda Katz + Carl Lerche
82b9b151ff
Refactor plugins
2009-11-11 18:09:16 -08:00
José Valim
01ae99c681
Merge branch 'master' of git://github.com/rails/rails
2009-11-11 08:16:25 -02:00
Jeremy Kemper
fca32eb6c5
Update AR logger subscriber for Notifications subscriber args change
2009-11-11 01:43:58 -08:00
Jeremy Kemper
322b6b29c2
test-unit 2: filter_backtrace is private
2009-11-10 21:04:00 -08:00
Jeremy Kemper
0df1dc5a72
CI: yeah, run those tests
2009-11-10 17:19:39 -08:00
Jeremy Kemper
486a63c258
CI: short-circuit at first failing task. Chmod 755 bin, vendor, vendor/gems
2009-11-10 17:13:43 -08:00
Jeremy Kemper
1ac8e0662f
Rack: HTTPS is either 'on' or 'off' as of 9b7a0569e4067d0c23a00fc24273436e85c56d7f
2009-11-10 16:57:55 -08:00
Jeremy Kemper
215fa16734
CI: list bundled gems in build environment
2009-11-10 16:54:15 -08:00
Jeremy Kemper
bbb3e5a858
Unify test:isolated across components and run by default at toplevel
2009-11-10 16:50:15 -08:00
Jeremy Kemper
e02bff2634
CI: missed mysql gem in bundle
2009-11-10 16:50:12 -08:00
Jeremy Kemper
13280a049e
Back to rack master, rack-1.0 reverts the kind_of? String fix
2009-11-10 16:34:04 -08:00
Jeremy Kemper
631a27d6a5
Revert "Revert "Eliminate warning with layout is unset""
...
This reverts commit d8fd0499bf .
2009-11-10 16:15:43 -08:00
Jeremy Kemper
8cd486da80
test-unit 2 compat: assert_raise doesn't support regexp second arg to match exception message
2009-11-10 16:14:10 -08:00
Jeremy Kemper
d8fd0499bf
Revert "Eliminate warning with layout is unset"
...
This reverts commit 1fcf32f8fe .
2009-11-10 16:09:52 -08:00
Jeremy Kemper
c626be796c
CI: rearrange build order, AR last
2009-11-10 16:08:02 -08:00
Jeremy Kemper
60558cc753
CI: no system gems required
2009-11-10 15:59:39 -08:00
Jeremy Kemper
819bdd0f4a
Bundle rack-1.0 branch
2009-11-10 15:51:01 -08:00
Jeremy Kemper
1fcf32f8fe
Eliminate warning with layout is unset
2009-11-10 15:48:03 -08:00
Jeremy Kemper
f14eb686ef
CI: bundle test-unit on 1.9
2009-11-10 15:46:32 -08:00
Jeremy Kemper
6480850d37
Revert "Eliminate warning with layout is unset"
...
This reverts commit 90be80361f .
2009-11-10 15:43:37 -08:00
Jeremy Kemper
e889f315c8
CI: return result of last rake task
2009-11-10 15:40:54 -08:00
Jeremy Kemper
907858c1fe
CI: shush complaints about 777 perms
2009-11-10 15:32:09 -08:00
Jeremy Kemper
aef7e214bd
Use an env var to expand the CI bundle. Using bundler's 'only' includes this stuff for everybody, oops.
2009-11-10 15:28:25 -08:00
Jeremy Kemper
a7dc7cd0c4
Ruby 1.9: don't bundle fcgi at all for CI
2009-11-10 15:24:37 -08:00
Jeremy Kemper
ec2b2654e5
Make root_dir a method so rails can call it
2009-11-10 15:18:21 -08:00
Jeremy Kemper
a4aa95ba0c
Bump AR.gemspec Arel dep too
2009-11-10 15:13:38 -08:00
Jeremy Kemper
74306b9526
Use bundled bin/rake
2009-11-10 14:59:59 -08:00
Jeremy Kemper
0247262833
Rely on bundler for gem deps instead of geminstaller
2009-11-10 14:59:46 -08:00
Jeremy Kemper
a584b4c13d
Get rack from rails/rack.git. Introduce ci-only deps.
2009-11-10 14:59:22 -08:00
Jeremy Kemper
457940e684
Bump CI mocha to 0.9.8 and rack to 1.0.1
2009-11-10 14:17:40 -08:00
Jeremy Kemper
d887e46c29
Be sure to invoke the super chain! And initialize response body.
2009-11-10 14:14:17 -08:00
Jeremy Kemper
be664392c0
Eliminate warning by initializing nil formats
2009-11-10 14:13:54 -08:00
Jeremy Kemper
90be80361f
Eliminate warning with layout is unset
2009-11-10 14:13:21 -08:00
Jeremy Kemper
3bdfda0730
Bump arel dep to 0.2.pre
2009-11-10 13:52:25 -08:00
Jeremy Kemper
1874a88765
Ruby 1.9: bump CI mysql from 2.7 -> 2.8.1
2009-11-10 11:57:56 -08:00
Jeremy Kemper
5fa497abf5
Ruby 1.9: fix Relation respond_to? and method_missing
2009-11-10 11:00:50 -08:00
Jeremy Kemper
77478f21af
Resolve deadlock in pooled connections test
2009-11-10 11:00:29 -08:00
Jeremy Kemper
7ad6e9bc78
Fix generated performance test helper requires
2009-11-10 01:52:40 -08:00
Joshua Peek
38e8d5b10c
Enable warnings for mailer tests
2009-11-09 23:42:46 -06:00
Matt Jones
d625312fe1
delete correct records for a has_many with :primary_key and :dependent => :delete_all
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-11-10 18:41:37 +13:00
Joshua Peek
11e798ae0f
Avoid adding component lib/ to load path multiple times
2009-11-09 23:28:36 -06:00
Joshua Peek
23229d5ad4
Remove preflight lib check during AP tests. Bundler resolves this issue
2009-11-09 22:59:30 -06:00
Joshua Peek
22b581e04c
Always add AS lib/ to path when running its test suite
2009-11-09 22:56:49 -06:00
Joshua Peek
a31ecff554
Don't warn me if I'm not using bundler to run tests
2009-11-09 22:51:48 -06:00
Joshua Peek
94058c689a
Remove automatic rubygems loading from AS test runner
2009-11-09 22:44:28 -06:00
Joshua Peek
335c0e62cd
Fix railties isolated tests if bundler environment doesn't exist
2009-11-09 22:36:30 -06:00
Joshua Peek
f03bcf2495
Don't load all of railties just for Rails::Version
2009-11-09 22:30:26 -06:00
Joshua Peek
e9d21ca903
Add pending test for generating routes with optional params that recall last
...
request
2009-11-09 22:18:51 -06:00
Jeremy Kemper
3ce6a10b67
Contortions to work around brittle naming dependency
2009-11-09 20:10:10 -08:00
Joshua Peek
763489ce06
Add pending test for route generation with default param
2009-11-09 21:54:50 -06:00
Joshua Peek
1004fcb767
Fixed AD assertion autoloads [ #3470 state:resolved]
2009-11-09 21:38:01 -06:00
Jeremy Kemper
08f7c4dd89
Revert "the REXML security fix is not needed for Ruby >= 1.8.7"
...
Still required on older 1.8.7 patchlevels.
This reverts commit a48f49e56b .
2009-11-09 19:30:02 -08:00
Jeremy Kemper
703d31c20a
Clarify failed assertion
2009-11-09 17:01:57 -08:00
Jeremy Kemper
feaa762e40
Ditto
2009-11-09 16:59:38 -08:00
Jeremy Kemper
eeac054d59
Fix missing dependency
2009-11-09 16:57:10 -08:00
Jeremy Kemper
0ac88af998
Remark when bundled env require fails
2009-11-09 16:10:37 -08:00
Jeremy Kemper
a66449d852
Ruby 1.9.2: work around inherited hook being called before yielding to block
2009-11-09 14:36:49 -08:00
Jeremy Kemper
7a68554291
Merge commit 'fxn/master'
2009-11-09 13:56:49 -08:00
Jeremy Kemper
d5fd09246e
Bump AP gem dependencies to upgrade Rack to 1.0.1 and to include rack-mount and erubis.
2009-11-09 13:29:15 -08:00
Xavier Noria
a48f49e56b
the REXML security fix is not needed for Ruby >= 1.8.7
2009-11-09 22:16:51 +01:00
Xavier Noria
db2c0d79e3
Enumerable#none? is not needed for Ruby >= 1.8.7
2009-11-09 22:16:51 +01:00
Xavier Noria
329e7f4441
Integer#even? and Integer#odd? are not needed for Ruby >= 1.8.7
2009-11-09 22:16:51 +01:00
Xavier Noria
b6598c683b
String#each_char is not needed for Ruby >= 1.8.7
2009-11-09 22:16:51 +01:00
Xavier Noria
c0bb4c6ed2
String#start_with? and String#end_with? are not needed for Ruby >= 1.8.7, leaves their plural aliases though
2009-11-09 22:16:51 +01:00
Xavier Noria
004db18cb0
String#bytesize is not needed for Ruby >= 1.8.7
2009-11-09 22:16:51 +01:00
Xavier Noria
f8e713f488
Object#tap is not needed for Ruby >= 1.8.7
2009-11-09 22:16:51 +01:00
Xavier Noria
1979e9c855
Symbol#to_proc is not needed for Ruby >= 1.8.7
2009-11-09 22:16:51 +01:00
Xavier Noria
d4513ac699
Object#instance_variable_defined? is not needed for Ruby >= 1.8.7
2009-11-09 22:16:51 +01:00
Bryan Helmkamp
047007fa9d
Silence warning: discarding old h
2009-11-09 15:44:36 -05:00
Jeremy Kemper
3b0b6dfc86
Merge branch 'master' of github.com:rails/rails
2009-11-09 12:00:08 -08:00
Jeremy Kemper
c74cddc919
Merge commit 'brynary/fix-master-warnings'
2009-11-09 11:58:57 -08:00
Bryan Helmkamp
17dee01b6f
Fix Ruby warning: method redefined; discarding old breakpoint
2009-11-09 14:49:12 -05:00
Bryan Helmkamp
afc129e270
Fix some Ruby warnings: `*' interpreted as argument prefix
2009-11-09 14:46:29 -05:00
Yehuda Katz
0f1da1cb5c
Revert "Bundle I18n 0.2.0."
...
This reverts commit 83f329f5f3 .
2009-11-09 11:33:47 -08:00
José Valim
4a1f438781
Change mailer subjects lookup.
2009-11-09 10:57:53 -08:00
José Valim
83f329f5f3
Bundle I18n 0.2.0.
2009-11-09 10:57:53 -08:00
Yehuda Katz
790c062280
Merge branch 'master' of github.com:rails/rails
2009-11-09 10:57:20 -08:00
Jeremy Kemper
3039912886
Silence spurious warning
2009-11-09 05:09:04 -08:00
Jeremy Kemper
76b2d3e337
Ruby 1.9.2: URI.parse and .decode are deprecated
2009-11-09 05:07:58 -08:00
Jeremy Kemper
6d808cf494
Remove reliance on string access core extension
2009-11-09 04:59:26 -08:00
Jeremy Kemper
7f0fcadd36
Revert "Ruby 1.9.2: avoid Array#to_s and Array(nil)"
...
This reverts commit 7ad461b44d .
2009-11-09 04:05:22 -08:00
Jeremy Kemper
a038b3d1bc
Make Rakefile usable outside of base dir
2009-11-09 03:31:59 -08:00
Jeremy Kemper
ee0d41c38d
Remove string access core extension dependency
2009-11-09 03:18:54 -08:00
Jeremy Kemper
b1164adda1
Fix arg destructure
2009-11-08 23:29:33 -08:00
Jeremy Kemper
8e32830412
Fix unresolved string extension dependencies
2009-11-08 22:49:31 -08:00
Jeremy Kemper
deddd55086
Work around assert_raise limitation
2009-11-08 22:02:57 -08:00
Jeremy Kemper
20cdaddfd2
Ruby 1.9.2: work around changes to flatten and nil.to_str
2009-11-08 22:02:57 -08:00
Jeremy Kemper
7ad461b44d
Ruby 1.9.2: avoid Array#to_s and Array(nil)
2009-11-08 22:02:49 -08:00
Jeremy Kemper
c44fb4ced5
Ruby 1.9: use method_name to work around miniunit API changes
2009-11-08 21:30:34 -08:00
José Valim
51fe6d05e7
Refactor generators a little bit.
...
Signed-off-by: Yehuda Katz <wycats@mobile-166-129-219-135.mycingular.net >
2009-11-08 18:41:44 -08:00
José Valim
216e8c6bfa
Update Rails Generators to use Thor 0.12.0.
...
Signed-off-by: Yehuda Katz <wycats@mobile-166-129-219-135.mycingular.net >
2009-11-08 18:41:44 -08:00
Joshua Peek
c10f4ae01d
Merge remote branch 'Fingertips/master'
2009-11-08 16:03:15 -06:00
Jeremy Kemper
a595abff21
Unknown :format param should result in empty request.formats
2009-11-08 12:12:58 -08:00
Yehuda Katz
103b29831e
Since we require 1.8.7 we don't need to shim instance_exec anymore
2009-11-07 11:23:34 -08:00
Yehuda Katz
e1b5e3cc70
Break up inflector to reduce the dependency burden on dependency-les methods like constantize.
2009-11-07 11:23:21 -08:00
Eloy Duran
f125a34501
Define autosave association callbacks when using accepts_nested_attributes_for.
...
This way we don't define all the validation methods for all associations by
default, but only when needed.
[#3355 state:resolved]
2009-11-07 00:42:42 +01:00
Chris Hapgood
c2cfb20198
Share ActionView::TestCase's output_buffer with view for concat support.
...
[#3467 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-11-07 00:42:07 +01:00
Chris Hapgood
b43964d606
Make some assertions in the ActionView::TestCase tests actually do something.
...
[#3468 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-11-07 00:39:39 +01:00
Nathan Weizenbaum
cbded53671
When rendering layouts with blocks, use #capture to avoid assuming that the return value is the block's content.
...
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local >
2009-11-05 20:08:04 -08:00
Jeremy Kemper
cb9a1759c0
Fix generators tests that expect a class name
2009-11-05 16:12:02 -08:00
Jeremy Kemper
1c047be0fc
If class doesn't have a name, there's no implied layout name, so don't set up a _layout method
2009-11-05 16:12:02 -08:00
Jeremy Kemper
60911c3933
Ruby 1.9: Rack apps must *always* take an env arg on 1.9
2009-11-05 16:12:02 -08:00
Jeremy Kemper
73a36b599a
Shush
2009-11-05 16:12:02 -08:00
Yehuda Katz
b12f194c39
Update AC::Middleware to play better with the normal AC::Metal stack. This required stopping to use #call for non-rack-related stuff
2009-11-05 15:38:25 -08:00
Yehuda Katz
b0dfd1d19b
Update Ruby version check to 1.8.7
2009-11-05 15:38:25 -08:00
Yehuda Katz + Carl Lerche
4369426993
Add the ability to merge initializers from various objects in order.
2009-11-05 14:45:53 -08:00
Yehuda Katz + Carl Lerche
897164ddb7
Conceptually unify instance & global initializers
2009-11-05 14:44:29 -08:00
Chris Hapgood
6c59e5a558
Fix OrderedHash#replace
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-11-05 21:17:13 +13:00
Jeremy Kemper
a8ed10546d
Ruby 1.9: don't assume params are US-ASCII. Hands off the encoding.
2009-11-04 16:27:54 -08:00
Jeremy Kemper
dc1816da30
Ruby 1.9: fix number precision test
2009-11-04 16:10:24 -08:00
Jeremy Kemper
425a02cece
Ruby 1.9: resolve constant lookup issues
2009-11-04 15:41:50 -08:00
Jeremy Kemper
0ff8f81adc
Ruby 1.9: more constant lookup badness :(
2009-11-04 15:00:19 -08:00
Jeremy Kemper
52e2bbd5c0
Ruby 1.9: work around constant resolution behavior change :(
2009-11-04 14:51:54 -08:00
Jeremy Kemper
d2d3464fcc
Turn off --debug for gem bundle. Force gem update.
2009-11-04 14:49:15 -08:00
Jeremy Kemper
726a2fc8d2
Give useful test:isolated failures
2009-11-04 12:44:06 -08:00
Jeremy Kemper
03dc66444e
Add bundler 0.6.0 to CI geminstaller
2009-11-04 11:57:21 -08:00
Jeremy Kemper
d64e87edd6
Try to remotely troubleshoot bundler issue in CI
2009-11-04 11:50:52 -08:00
Manfred Stienstra
0e64eab6a2
Autoload Multibyte features.
2009-11-04 10:15:03 +01:00
Manfred Stienstra
da3a228a93
Make ActiveSupport::Chars#limit run on Ruby 1.9.
2009-11-04 10:14:49 +01:00
Manfred Stienstra
62a022891b
Improve performance of Multibyte::Utils.
...
Replace explicit for-loops by faster enumeration methods.
[#3158 state:committed]
2009-11-04 10:12:06 +01:00
Manfred Stienstra
935bd0fef8
Add ActiveSupport::Multibyte::Chars#limit.
...
The limit method limits the number of bytes in a string. Useful when the
storage space of the string is limited, for instance in a database column
definition.
Sharpen up the implementation of translate offset.
[#3192 state:committed]
2009-11-04 10:12:03 +01:00
Jeremy Kemper
a3d5274e67
Configure generator when needed rather than during initialization
2009-11-03 18:58:40 -08:00
José Valim
d627c932bd
Pass config.generators options along when RAILS_GENERATORS is set and show --force-plural message just once.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-11-03 18:22:05 -08:00
Jeremy Kemper
e5211e3bd0
Improve Gemfile commentary
2009-11-03 16:36:19 -08:00
José Valim
3b8e29fe56
Remove --freeze (since Rails will come bundled in all new apps) and update gem action to change Gemfile instead of config.environment.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-11-03 16:32:47 -08:00
José Valim
3fb548cac3
Ensure ActiveRecord is loaded on revoke/destroy.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-11-03 16:32:47 -08:00
José Valim
e15b5eda2b
Avoid duplicated names on help description and show proper error message if trying to load a Rails 2.x generator.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-11-03 16:32:47 -08:00
Joshua Peek
f950d0b4af
Fix simple resource named routes for new routing dsl
2009-11-03 11:23:22 -06:00
Jeremy Kemper
aaa5a692a3
Use spoofed version bump to ensure git is preferred
2009-11-03 00:25:15 -08:00
Jeremy Kemper
8ed82dfeb9
Force gemcutter source to ensure a consistent arel version
2009-11-02 20:26:44 -08:00
Jeremy Kemper
ca990b03cc
Work around rebundling issue
2009-11-02 20:08:43 -08:00
José Valim
d226f17507
Ensure that generators can be invoked from any directory.
...
Signed-off-by: Engine Yard <engineyard@Engine-Yards-MacBook-Pro.local >
2009-11-02 18:20:16 -08:00
Matias Flores
2378085023
Fix chars.reverse for multibyte decomposed strings
...
[#597 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-11-02 17:57:55 -08:00
Jeremy Kemper
e93c2da141
Arel::In -> Arel::Predicates::In
2009-11-02 17:50:12 -08:00
Jeremy Kemper
36a9644b86
Clarify date/time dependencies
2009-11-02 17:50:12 -08:00
Jeremy Kemper
b540eca588
Consolidate Object#to_param and #to_query core extensions
2009-11-02 17:50:12 -08:00
Jeremy Kemper
8935854375
Ruby 1.9.2: rational.rb is deprecated
2009-11-02 17:50:12 -08:00
Jeremy Kemper
a2de13e1e0
Ruby 1.9.2: URI.escape is obsolete
2009-11-02 17:50:12 -08:00
Jeremy Kemper
36121d29a5
Ruby 1.9 doesn't recognize EM SPACE as whitespace, breaking String#strip
2009-11-02 17:50:12 -08:00
Jeremy Kemper
13004c37e6
Give useful test:isolated failures
2009-11-02 17:50:11 -08:00
José Valim
d002826e54
Merge branch 'master' of git://github.com/rails/rails
2009-11-02 23:46:00 -02:00
Yehuda Katz
14370e1aab
CI breakage
...
This reverts commit a288b74f1c .
2009-11-02 17:12:01 -08:00
José Valim
976c264724
Extracted localized_cache.rb from ActionController, added it to AbstractController and made ActionMailer use it.
2009-11-01 02:23:49 +01:00
José Valim
a107103e85
Allow :instance_reader to be given to superclass_delegating_accessor as well.
2009-11-01 02:23:49 +01:00
José Valim
2aafdc8396
Use I18n on ActionMailer subjects by default.
2009-11-01 02:23:49 +01:00
José Valim
81c416b72e
More refactoring on ActionMailer::Base.
2009-11-01 02:23:49 +01:00
José Valim
e9667ad1f0
Make tests run without deprecation warning (just one left).
2009-11-01 02:23:48 +01:00
José Valim
418c3f801c
Another refactoring on AM. body is deprecated, use render instead.
2009-11-01 02:23:48 +01:00
José Valim
0396004861
Add some basic render_test to AbstractController.
2009-11-01 02:23:48 +01:00
José Valim
0cf16ddb88
Improve AbstractController layouts coverage.
2009-11-01 02:23:48 +01:00
José Valim
2d514e5352
Move some of helper tests to AbstractController.
2009-11-01 02:23:48 +01:00
José Valim
43d5504f0a
Move all render and layout pieces required in ActionMailer from ActionController to AbstractController.
2009-11-01 02:23:48 +01:00
José Valim
684c2dc208
Remove ActionMailer helpers and rely on AbstractController one.
2009-11-01 02:23:48 +01:00
José Valim
a9751a7034
Refactor ActionMailer layout and remove legacy one.
2009-11-01 02:23:47 +01:00
Matthew Rudy Jacobs
f4f76772fb
abstract all of the ActionMailer delivery methods into their own classes. thereby the following are equivalent
...
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.delivery_method = ActionMailer::DeliveryMethod::Smtp
we could equally set our own custom object
as long as it provides the instance method :perform_delivery(mail)
eg.
class MySmsDeliveryMethod
def perform_delivery(mail)
Sms.send(mail['to'], mail['body'])
end
end
MySmsMailer.delivery_method = MySmsDeliveryMethod.new
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-11-01 02:23:47 +01:00
Tim Carey-Smith
3f56038612
Remove the random line at the beginning of every new log file
2009-10-29 08:05:41 +01:00
Yehuda Katz
51c24ae3e3
Caching refactoring
2009-10-29 00:44:12 -04:00
José Valim
a288b74f1c
Generators should use Rails.root instead of Dir.pwd [ #3408 status:resolved]
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-10-28 16:54:38 -04:00
Yehuda Katz
8dcf91ca11
First pass at cleaning up action caching
2009-10-28 16:54:00 -04:00
José Valim
427a7385eb
Make polymorphic_url work with symbols again and refactor it [ #1384 status:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-10-28 14:13:48 -05:00
Yehuda Katz
f51ac9e780
Array.wrap(struct) needs to return the wrapped struct
2009-10-28 06:51:25 -07:00
Yehuda Katz
c9487ed6af
Change Event#thread_id to #transaction_id. Defaults to one "transaction" per thread but you can explicitly declare the start of a new one. This makes it possible for each request to have it own id.
2009-10-28 01:58:33 -07:00
Yehuda Katz
03d3824d96
Make it possible to have IDs per request
2009-10-28 01:50:59 -07:00
Yehuda Katz
654b33afc5
New semantics eliminate the need for __send__
2009-10-28 01:43:46 -07:00
Yehuda Katz
a0fc92f455
This is all that's needed in 1.8.7+
2009-10-28 01:43:33 -07:00
Yehuda Katz
c5e73b8976
Reduce TextTemplate cost for simple cases
2009-10-28 00:13:08 -07:00
Yehuda Katz
0b2dd7afd9
Reorganize CSRF a bit
2009-10-28 00:12:35 -07:00
Yehuda Katz
cbcb947b00
AS::Notifications.subscribe blocks are now yielded the arguments to pass to AS::Notifications::Event.new
2009-10-27 21:04:53 -07:00
Phil Ross
9b67b7ba2f
Edinburgh TimeZone references "Europe/London" instead of "Europe/Dublin" [ #3310 state:resolved]
2009-10-27 21:13:13 -05:00
Geoff Buesing
057f0d3c16
Bundle Tzinfo 0.3.15
2009-10-27 21:13:13 -05:00
Geoff Buesing
37c9ec3add
Tzinfo bundling task: unpack tzinfo with lib directory preserved
2009-10-27 21:13:12 -05:00
Yehuda Katz
86596975be
Tests pass again
2009-10-27 19:05:47 -07:00
Joshua Peek
07da304ff8
Some more generation tests
2009-10-27 21:02:21 -05:00
Joshua Peek
43e0bc1c9f
Extract routing controller stub helper into abstract unit
2009-10-27 21:02:20 -05:00
Joshua Peek
e296ea056e
Enable named route tests
2009-10-27 21:02:20 -05:00
Joshua Peek
759f2ccc4c
Start migrating AC routing tests into dispatch folder
2009-10-27 21:02:20 -05:00
Jeremy Kemper
c2a17217d0
Fix test failures due to requiring rails without AS in load path
2009-10-27 18:35:41 -07:00
Yehuda Katz + Carl Lerche
df95f16570
Update initializable
2009-10-27 17:01:33 -07:00
Yehuda Katz + Carl Lerche
da62a7c536
Duplicate AS code no longer needed
2009-10-27 17:01:33 -07:00
José Valim
c28a45ad8b
Fix rake dev and update vendored Thor.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-10-27 16:46:19 -07:00
Jeremy Kemper
b30294b54a
Fix broken tests
2009-10-27 09:34:17 -07:00
Yehuda Katz
c3fa20883e
#include should be #extend
2009-10-27 09:21:01 -07:00
Yehuda Katz
b3a198041b
Some optimizations on AS::Notifications. This does not change the public-facing API.
2009-10-27 09:15:41 -07:00
Yehuda Katz
4653719aa6
Clean up flash a bit
2009-10-27 09:15:41 -07:00
Jeremy Kemper
58555d0c8b
Remove old per-component bundled environments first
2009-10-27 02:03:25 -07:00
Jeremy Kemper
b3012bbd16
Tweak CI for toplevel gem bundle
2009-10-27 01:55:27 -07:00
Yehuda Katz
df06e0bd86
Clean up flash a bit
2009-10-26 23:11:52 -07:00
Yehuda Katz
2bdd8fa863
Clean up parameter logging some
2009-10-26 21:31:37 -07:00
Yehuda Katz
000d593621
Clean up and update cookies
2009-10-26 18:01:09 -07:00
Yehuda Katz
e1786ee6eb
Fixes expires_now and cleans things up a bit
2009-10-26 17:32:42 -07:00
Yehuda Katz
d7499f8ee8
Extract #head into its own module and simplify it
2009-10-26 17:13:43 -07:00
Yehuda Katz
60cc86136b
Base setup for config object in AC.
2009-10-26 15:47:08 -07:00
Joshua Peek
55ae53baad
Fix rake routes method name output [ #3422 state:resolved]
2009-10-26 11:23:39 -05:00
Joshua Peek
6083a87d63
Splat calls to_a not to_ary [ #3423 state:resolved]
2009-10-26 11:16:17 -05:00
Joshua Peek
a840c8afbf
Restore rake routes [ #3402 state:resolved]
2009-10-24 18:08:54 -05:00
Jeremy Kemper
a0049a6b42
Use rails/rack-mount
2009-10-22 20:13:46 -07:00
Carl Lerche
8a0f456443
Refactored railties' isolation tests to be able to run script/* scripts.
2009-10-21 15:46:22 -07:00
Joshua Peek
3e35d30c0c
Always add actionpack/lib to load path for isolated tests
2009-10-21 11:32:31 -05:00
José Valim
9fbb2c571b
Fix error_messages_for when instance variable names are given.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-10-21 11:18:36 -05:00
José Valim
e714b499cc
Move validator, human_name and human_attribute_name to ActiveModel, remove deprecated error messages and add i18n_scope and lookup_ancestors.
...
Signed-off-by: Carl Lerche <carllerche@mac.com >
2009-10-20 17:52:32 -07:00
Yehuda Katz + Carl Lerche
4f6d6f7031
Have all the tests running off a single Gemfile
2009-10-20 16:34:44 -07:00
Joshua Peek
a5c82a9dfb
Start rewriting some internal tests to use the new routing dsl
2009-10-20 16:03:55 -05:00
Joshua Peek
207d0483e5
Run bundler before AM and AMo tests
2009-10-20 15:28:34 -05:00
Joshua Peek
a1ce52effc
New routing dsl
2009-10-20 12:31:23 -05:00
Joshua Peek
df68cae0c0
Group together all the old routing dsl logic
2009-10-20 10:46:27 -05:00
Joshua Peek
35576a237e
Add arel to AMo gemfile
2009-10-20 10:16:19 -05:00
Joshua Peek
a74022ecd3
Move Routing into AD
2009-10-20 10:14:46 -05:00
Joshua Peek
3895e2ccb3
Donate tests I wrote for rackmount rails integration
2009-10-20 09:52:59 -05:00
Joshua Peek
fa1926ddaa
Exclude gem backtrace filter if rubygems is not loaded
2009-10-20 09:32:26 -05:00
Joshua Peek
80a3983b7b
Add rackmount to railties gemspec
2009-10-20 09:27:37 -05:00
Joshua Peek
e994bf0c81
Add rackmount to actionmailer gemspec
2009-10-20 09:27:06 -05:00
Joshua Peek
a1df259074
Replace decaying routing internals w/ rack-mount
2009-10-19 23:32:17 -05:00
Jeremy Kemper
cbedcb0615
Missed cherry-pick from 2e37effd72
2009-10-19 21:03:37 -07:00
Jeremy Kemper
248d84f2e6
Simplify path expansions
2009-10-19 21:00:22 -07:00
Joshua Peek
6c581f5fd5
Kill routing tests expecting path to be unescaped. Most rack servers already escape PATH_INFO.
2009-10-19 22:42:11 -05:00
Joshua Peek
33258d713a
Fix brittle query string comparisons
2009-10-19 22:42:11 -05:00
Jeremy Kemper
16d245e796
Missed Gemfile commits
2009-10-19 19:25:52 -07:00
Jeremy Kemper
4f6d8ceb04
Bundle for railties tests too
2009-10-19 19:22:23 -07:00
Jeremy Kemper
2767036392
Use bundled env for tests only
2009-10-19 19:00:48 -07:00
Jeremy Kemper
c9cd10c4fa
Bundle arel for AR integration tests
2009-10-19 19:00:17 -07:00
Jeremy Kemper
418ce487c4
Only undef to_json if it's defined
2009-10-19 18:46:59 -07:00
Jeremy Kemper
acb1624f27
Merge commit 'josevalim/fixes'
...
Conflicts:
railties/test/generators/app_generator_test.rb
2009-10-19 18:37:19 -07:00
Jeremy Kemper
7ab30599a6
Error message references application.rb instead of environment.rb
2009-10-19 18:33:57 -07:00
Jeremy Kemper
66c4f28bd6
Bump arel requirement to 0.1.1
2009-10-19 18:33:38 -07:00
Jeremy Kemper
4afe70790c
Check for environment.rb
2009-10-19 18:12:29 -07:00
Jeremy Kemper
3072bf7555
Check for bundler environment or 2.x-style vendor/rails + rubygems
2009-10-19 18:10:14 -07:00
Jeremy Kemper
a49c3b0365
Merge branch 'master' of github.com:rails/rails
2009-10-19 12:33:36 -07:00
Pratik Naik
1ac5cf4788
Make sure boot.rb requires rubygems only when needed
2009-10-19 15:06:54 -02:00
Mike Gunderloy
77bb129fdb
Fix bad assumption in BacktraceCleaner test [ #3249 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-10-18 17:17:09 -02:00
Joshua Peek
51e1260b18
Rails info tests needs use_controllers
2009-10-18 11:13:57 -05:00
Joshua Peek
91726c201b
Relax generation requirements and only enforce the requirements used in the path segment
2009-10-18 11:05:24 -05:00
Joshua Peek
01e04a446c
Use Rails.root in railties tests
2009-10-18 10:53:43 -05:00
Joshua Peek
f74e04c21d
RAILS_GEM_VERSION is obsolete
2009-10-18 10:44:05 -05:00
Joshua Peek
3ccaabc6c6
Need to use "use_controllers" for nonexistent controller in AM test
2009-10-18 10:39:21 -05:00
Eric Chapweske
2831996483
Fixed: #without_typecast should only disable typecasting on the duplicated attributes [ #3387 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-10-18 10:22:22 -05:00
Joshua Peek
6873b1d658
Don't use use_controllers in routing tests
2009-10-18 00:26:36 -05:00
Joshua Peek
2c3ca9ae80
This is routing error message test is tightly coupled to the implementation. Just test that it raises an exception.
2009-10-17 21:56:43 -05:00
Joshua Peek
f1767c1513
Drop legacy support for case insensitive controller recognition
2009-10-17 21:21:34 -05:00
Joshua Peek
cc0103fe83
Fix brittle query string comparisons
2009-10-17 19:18:18 -05:00
Joshua Peek
e900a8437a
Fix brittle query string comparisons
2009-10-17 17:35:21 -05:00
Joshua Peek
702df0d238
Fix standalone run of routing test. Only reference controllers that are provided in fake_controllers
2009-10-17 17:35:21 -05:00
Joshua Peek
6c2a73909e
Stop using with_controllers in tests
2009-10-17 17:35:20 -05:00
Joshua Peek
e00f57e208
No longer need this special routing exception message because these kinds of ambiguous generations are deprecated
2009-10-17 17:35:20 -05:00
Joshua Peek
20f0b33035
Drop support for routing :generate_all
2009-10-17 17:35:20 -05:00
Joshua Peek
d50413826f
Invalid route requirements should always raise an exception even if they are unused
2009-10-17 17:35:19 -05:00
Carl Lerche
d0f4d93df8
Remove some remnants of config.gem
2009-10-17 14:38:40 -07:00
José Valim
1f9d234a6b
By default use ActiveModel API in controller generators, unless otherwise specified [ #3123 status:resolved]
2009-10-17 15:56:44 -03:00
José Valim
03c5a0e5c4
Make app generatoor specs green once again.
2009-10-17 15:54:58 -03:00
Eric Chapweske
f936a1f100
Refactoring attributes/types [ #3348 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-10-17 12:37:15 -05:00
José Valim
cb87302689
Bring agnosticism to error_messages_for.
2009-10-17 13:03:28 -03:00
José Valim
2e37effd72
Unify class_inheritable_accessor and extlib_inheritable_accessor and allow responder to be set in the class level.
2009-10-17 12:54:03 -03:00
Joshua Peek
e13d232150
Add stub for configuring your package manager
2009-10-16 20:57:46 -05:00
Carl Lerche
e1fdc8bba3
Remove config.gem in favor of using the bundler. This makes config/boot.rb obsolete.
...
The bundler library is at: http://github.com/wycats/bundler/ and is a rubygem.
2009-10-16 18:10:52 -07:00
Joshua Peek
29ba9c0307
Use Rails.root in statistics rake task
2009-10-16 19:40:59 -05:00
Joshua Peek
7593e8b8b5
Rakefile doesn't need initializers to be ran
2009-10-16 19:40:08 -05:00
Jeremy Kemper
028911ad00
Use rails/rack
2009-10-16 17:39:12 -07:00
Joshua Peek
c7bf1058d3
Fix incorrect path in script/runner template
2009-10-16 19:33:25 -05:00
Joshua Peek
f1640a1653
script/runner should require environment
2009-10-16 19:33:25 -05:00
Joshua Peek
8f2d8f4528
script/performance/profiler should require environment
2009-10-16 19:33:24 -05:00
Joshua Peek
2f7217c76a
script/performance/benchmarker should require environment
2009-10-16 19:33:24 -05:00
Joshua Peek
7635c9f4c0
script/generate should require environment
2009-10-16 19:33:24 -05:00
Yehuda Katz
7e9e370e03
Make encodings work with Erubis and 1.9 again
2009-10-16 17:28:44 -07:00
Joshua Peek
a22394295c
Ignore log folder created by tests
2009-10-16 19:25:21 -05:00
Joshua Peek
c40f79f330
script/about should require environment
2009-10-16 19:24:19 -05:00
Joshua Peek
4cebd41d9e
Fix Rails root in sqlite adapter
2009-10-16 19:08:09 -05:00
Joshua Peek
c1261b5484
Use Rails.application where we want a valid rack app
2009-10-16 19:04:28 -05:00
Joshua Peek
d859402696
Use Rails.initialize! where we just want to run the initializers and aren't concerned about the config
2009-10-16 18:58:35 -05:00
Joshua Peek
92bfc693f2
Rackup file should require environment
2009-10-16 18:46:34 -05:00
Joshua Peek
3971d972c3
Expand paths in i18n initializer tests
2009-10-16 18:42:55 -05:00
Carl Lerche
c296b33ef1
Make the railties tests pass
2009-10-16 16:31:05 -07:00
Carl Lerche
591eaf3b2c
Get apps generated with working again.
2009-10-16 16:03:14 -07:00
Joshua Peek
2ca93403a2
Ruby 1.9: qualify toplevel File reference since config.ru could be eval'd in a different scope
...
Restores accidentally-reverted commit.
2009-10-16 14:21:27 -07:00
Carl Lerche
2110a524a4
Deprecate RAILS_ROOT in favor of Rails.root (which proxies to the application's object root)
2009-10-16 12:51:02 -07:00
Joshua Peek
6094e65169
We won't be publishing tars and zips anymore
2009-10-16 13:56:59 -05:00
Yehuda Katz
a565c19c5b
Fix a bug where templates with locales were not being sorted correctly
2009-10-16 11:26:19 -07:00
Nick Sieger
471a394215
Modify connection pool callbacks to be compatible w/ new style
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-10-16 10:34:52 -07:00
Jeremy Kemper
b0f55dc1f8
Remove framework subscriber tests which depends on AR, which isn't loaded
2009-10-15 21:51:24 -07:00
José Valim
9ba83cce03
Merge branch 'master' of git://github.com/rails/rails
2009-10-16 01:08:18 -03:00
Jeremy Kemper
ef75d05829
Get rid of stray require again
2009-10-15 17:39:19 -07:00
Jeremy Kemper
71f7e75d95
Merge branch 'master' into orchestra
2009-10-15 17:36:54 -07:00
Yehuda Katz
ef70ad5538
Fix a few more 1.9 bugs. Rack 1.0.1 is required for 1.9 compliance but not release, so bundling 1.0.1 from git
2009-10-15 17:16:42 -07:00
Yehuda Katz
c44d560145
Rack responses need to wrap Strings in 1.9
2009-10-15 16:37:27 -07:00
Yehuda Katz
e9d6bcd19f
Update MetalTest for constant scoping change in 1.9
2009-10-15 16:33:47 -07:00
Yehuda Katz
4869b74aee
Fix test to correctly handle 1.9 Array#to_s behavior
2009-10-15 16:27:26 -07:00
Yehuda Katz
b71f83c9cc
Work around apparent bug in 1.9
2009-10-15 16:03:30 -07:00
Carl Lerche
97296b11e2
Have config/application.rb contain the application definition and require that file instead of config/boot.rb or config/environment.rb in script/*.
2009-10-15 14:54:12 -07:00
José Valim
2d7abe245e
Renamed Orchestra to Notifications once again [ #3321 state:resolved]
2009-10-15 18:51:51 -03:00
Yehuda Katz
e1490d4e4c
Change config implementation in AV slightly
2009-10-15 14:41:59 -07:00
José Valim
5988b87c30
Added parent_of? method to help tracing events.
2009-10-15 18:19:25 -03:00
José Valim
11f9f556b8
Make Orchestra specs run on isolation.
2009-10-15 18:19:25 -03:00
José Valim
a15e02d44a
Unify benchmark APIs.
2009-10-15 18:19:25 -03:00
José Valim
aeaabc6d2d
Configure Orchestra on initialization.
2009-10-15 18:19:25 -03:00
José Valim
8f59d7a8d8
Instrument cache store events only if required.
2009-10-15 18:19:24 -03:00
José Valim
af0d1fa892
Update Orchestra instrumentations and move part of logging to Orchestra.
2009-10-15 18:18:44 -03:00
José Valim
5d0f8abc00
Orchestra listeners have their own queue.
2009-10-15 18:18:44 -03:00
José Valim
7b7796e23d
Events are created inside threads.
2009-10-15 18:18:44 -03:00
José Valim
7b5225a529
Abstract publishing, subscribing and instrumenting in Orchestra.
2009-10-15 18:18:43 -03:00
José Valim
a60bdd7d29
Added queue abstraction to Orchestra.
2009-10-15 18:18:43 -03:00
José Valim
8b340ab2f6
Revert "Rename Orchestra to Notifications [ #3321 state:resolved]"
...
This reverts commit 8cbf825425 .
2009-10-15 18:06:15 -03:00
Yehuda Katz
02b76862e1
Bundle AMo
2009-10-15 14:04:18 -07:00
Yehuda Katz
cb8b0f4a5a
Make this less brittle and work on 1.8
2009-10-15 13:35:22 -07:00
Jeremy Kemper
428c0bd4ba
Kill rake bundle
2009-10-15 00:29:21 -07:00
Jeremy Kemper
d5de94d6b7
Fix AM tests by configuring AV
2009-10-15 00:22:15 -07:00
Jeremy Kemper
deafa10e6c
AP tests depend on AR
2009-10-15 00:22:15 -07:00
Michael Koziarski
b1201792a7
Make the erubis implementation easier for plugins to change.
2009-10-15 17:54:01 +13:00
Michael Koziarski
cc1ad46ead
Add a read-only method which plugin authors can use to determine if xss escaping.
...
This doesn't provide a way to turn off the escaping, but alternative template engine authors
can figure out what their default should be by calling this. Avoids a messy version + plugin check.
2009-10-15 17:22:50 +13:00
Jeremy Kemper
4484f0bccf
Don't push siblings on load path if using bundled env
2009-10-14 20:59:45 -07:00
Jeremy Kemper
5b8e6279ac
AV expects options[:locals] to be a Hash
2009-10-14 20:59:33 -07:00
Jeremy Kemper
e19ab99134
CI bundles Active Record dependencies before running (pulls in Arel)
2009-10-14 19:36:55 -07:00
Jeremy Kemper
c09a5ffea7
Merge branch 'arel'
2009-10-14 19:32:09 -07:00
Jeremy Kemper
6eee1dd62c
Clarify AR dependency
2009-10-14 19:31:29 -07:00
Jeremy Kemper
6be5f45019
Fix env path
2009-10-14 19:30:06 -07:00
Jeremy Kemper
9c52f96acb
Include bundled env in toplevel require, if present
2009-10-14 19:15:33 -07:00
Jeremy Kemper
df55781458
No more toplevel arel sibling
2009-10-14 19:05:06 -07:00
Jeremy Kemper
a9f9ae385e
Explicitly require logger
2009-10-14 18:03:07 -07:00
Joshua Peek
bc1a18d7bd
Punt on ConcurrentHash [ #3322 state:resolved]
2009-10-14 19:53:52 -05:00
Joshua Peek
8cbf825425
Rename Orchestra to Notifications [ #3321 state:resolved]
2009-10-14 19:50:36 -05:00
Jeremy Kemper
5ad0e315e4
Merge branch 'master' into arel
2009-10-14 17:24:17 -07:00
Jeremy Kemper
4cbd3f050b
Move from git submodule to gem bundle
2009-10-14 17:19:24 -07:00
Carl Lerche
bf9819f73d
Have Rails.root be based off of config.ru
2009-10-14 16:40:25 -07:00
Jeremy Kemper
00eb09e016
Revert "Get AS TestCase off deprecated callbacks"
...
This reverts commit 29b280666b .
2009-10-14 16:12:57 -07:00
Jeremy Kemper
efdc062454
Revert "Rewrite AS::TestCase setup/teardown as a single callback chain"
...
This reverts commit 610e94c097 .
2009-10-14 16:12:57 -07:00
Michael Koziarski
d5d242660c
Avoid warning spam by flipping to the new callbacks mechanism. These callbacks are actually never called by rails itself, merely there for plugins
2009-10-15 11:21:53 +13:00
George Ogata
3de8b44b26
Make IntegrationTest::Runner propagate method_missing to ancestors.
...
Fixes RSpec integration example groups, which mixes its Matchers
module into ActiveSupport::TestCase.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-10-15 11:01:42 +13:00
Craig Smith
316f4704ea
Test cases should see all the cookies, not just cookies that have been set in the controller.
...
Previously this example would always pass, even when cookies.delete was not called.
@request.cookies['foo'] = 'bar'
get :delete_cookie
assert_nil cookies['foo']
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2768 state:committed]
2009-10-15 10:58:55 +13:00
Jacob Lauemoeller
fc46c9b220
Added CDATA support to the XmlMini LibXML engine, adjusted whitespace handling to closer match that of the REXML engine, and added a LibXML engine test
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-10-15 10:54:30 +13:00
Jeremy Kemper
3fa7e2fc98
Revert "Missing requires"
...
These rely on constant autoloads.
This reverts commit d39f397dc6 .
2009-10-14 14:48:43 -07:00
Jeremy Kemper
3e62503903
Fix tests
2009-10-14 14:47:11 -07:00
Michael Koziarski
d39f397dc6
Missing requires
2009-10-15 10:42:18 +13:00
pivotal
945d999aad
Digest auth option for ActiveResource.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-10-15 10:37:04 +13:00
Michael Koziarski
1d01bad3ce
Make sure non-escaped urls aren't considered safe
2009-10-15 09:58:35 +13:00
Michael Koziarski
5d5e34fa52
Use ERB::Util.h over CGI.escapeHTML as the former is safety aware and the latter isn't
2009-10-15 09:58:17 +13:00
Phil Darnowsky
1b3195b63c
ActionView.url_for doesn't escape by default
...
ActionView::Helpers::UrlHelper#url_for used to escape the URLs it generated by
default. This was most commonly seen when generating a path with multiple
query parameters, e.g.
url_for(:controller => :foo, :action => :bar, :this => 123, :that => 456)
would return
http://example.com/foo/bar?that=456&this=123
escaping an ampersand that shouldn't be escaped. This is both wrong and
inconsistent with the behavior of ActionController#url_for, and is changed.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-10-15 09:49:07 +13:00
Yehuda Katz
a41c6c35ca
Start adding configuration to ActionView instead of using constants.
...
By using config rather than hardcoded constants, we can evolve the
configuration system over time (we'd just need to update the config
method with more robust capabilities and all consumers would get
the capabilities with no code changes)
2009-10-14 13:36:41 -07:00
Jeffrey Hardy
a8dc9fd27b
CookieJar#delete should return the key's value, consistent with a Hash
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-10-14 11:50:51 -07:00
Carl Lerche
ff8be66f24
Finish porting over the initializers to the app object and fix all the tests
2009-10-14 11:47:37 -07:00
Yehuda Katz + Carl Lerche
5ffb877d3a
Add Gemfile to the rails application generator
2009-10-14 11:18:45 -07:00
Yehuda Katz + Carl Lerche
d56984c016
Make rails configuration's path object's root lazy
2009-10-14 11:18:45 -07:00
Emilio Tagua
5da109d105
Merge commit 'rails/master'
2009-10-14 09:50:23 -03:00
Joshua Peek
7ec947d59c
Refactor AS concern to avoid hacking the "include" method.
...
Ruby Magic!
2009-10-13 23:32:32 -05:00
Joshua Peek
7b169ed1bb
Extend Callbacks and Rescuable with AS concern
2009-10-13 23:30:06 -05:00
Emilio Tagua
06ad817f92
Use ActiveSupport::Callbacks instead of
...
ActiveSupport::DeprecatedCallbacks.
2009-10-13 15:15:00 -03:00
Emilio Tagua
991d1bc200
Merge commit 'rails/master'
2009-10-13 15:06:43 -03:00
Yehuda Katz
9cd50e7752
Make logger work again (h/t Sam Ruby)
2009-10-13 10:43:28 -07:00
Joshua Peek
610e94c097
Rewrite AS::TestCase setup/teardown as a single callback chain
2009-10-12 23:23:02 -05:00
Joshua Peek
29b280666b
Get AS TestCase off deprecated callbacks
2009-10-12 23:03:02 -05:00
Joshua Peek
4552dabba7
Add erubis gem to ci
2009-10-12 22:23:29 -05:00
Joshua Peek
eff61fcfa8
Insert a deprecation warn notice when using AS::DeprecatedCallbacks.
...
We are still using DeprecatedCallbacks in AS and AR. This is meant to annoy the
shit out of Rails core until we fix it.
2009-10-12 22:18:41 -05:00
Joshua Peek
21e7b84621
Callbacks, DeprecatedCallbacks = NewCallbacks, Callbacks
2009-10-12 22:15:43 -05:00
Joshua Peek
9bc8defe38
Use "run_callbacks :foo" since it is the public api for callbacks [ #3329
...
state:resolved]
2009-10-12 21:58:49 -05:00
Joshua Peek
2a5c92c101
Kill unused SafelyMemoizable [ #3323 state:resolved]
2009-10-12 21:44:30 -05:00
Jeremy Kemper
cbb70c896c
Bundle with system gem sources rather than gems.rubyforge.org default
2009-10-11 12:35:01 -07:00
Jeremy Kemper
7b8f9d254a
Fix generators load paths
2009-10-11 12:35:01 -07:00
José Valim
0cd7d4d8cf
Fix rake dev.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-10-11 12:35:01 -07:00
Joshua Peek
8b46c50eac
Kill mock routing assertion that tests router implementation
2009-10-10 21:30:51 -05:00
Joshua Peek
e61bc8e29f
Fix failing safe buffer test. We don't patch CGI.escapeHTML, only ERB:Util.
2009-10-10 21:30:51 -05:00
Joshua Peek
1610cd0827
Move safe buffer into test/template
2009-10-10 21:30:51 -05:00
Joshua Peek
21be1dcffa
Relative url generations are covered more thoroughly by url rewriter tests
2009-10-10 21:30:50 -05:00
Joshua Peek
673f73b538
Add define another "stuff" controller to support routing tests
2009-10-10 21:30:50 -05:00
Joshua Peek
5d071b4bc2
Drop implementation specific routing test assertions
2009-10-10 21:30:50 -05:00
Joshua Peek
7bc5e3bd02
Add define a "stuff" controller in fixtures to support routing tests
2009-10-10 21:30:50 -05:00
Yehuda Katz
b9ce8216fa
Fix a bug where render :text could not handle yield :symbol. Fixes guides generation
2009-10-10 00:31:12 -10:00
Jeremy Kemper
6395c7bed2
Mark html safety
2009-10-09 18:36:58 -07:00
Jeremy Kemper
ed139730ff
Uses fileutils
2009-10-09 18:31:30 -07:00
Jeremy Kemper
c23d28e2b3
To unmarshal MissingSourceFile from child
2009-10-09 18:31:30 -07:00
Pratik Naik
68d416a58f
Add a :limit option to specify the maximum number of records that can be processed by accepts_nested_attributes_for
2009-10-09 16:08:11 +01:00
Pratik Naik
e94caf0788
Store entire options hash in the class var rather than just the reject_if proc for the nested attributes
2009-10-09 15:47:10 +01:00
Pratik Naik
987d501182
Mute log info coming from the local_cache strategy
2009-10-09 15:03:18 +01:00
Yehuda Katz
16a48a95e3
Fix issue with standalone ActionView
2009-10-09 00:55:00 -10:00
Yehuda Katz
2954cf1369
Avoid super in define_method for Rubinius
2009-10-09 00:54:12 -10:00
Yehuda Katz
ee37ff46e9
Get rid of constant name usage for stack trace help in favor of overriding #inspect and .name.
2009-10-09 00:53:48 -10:00
Pratik Naik
69aa5e8a86
Ensure MessageVerifier raises appropriate exception on tampered data
2009-10-09 02:26:18 +01:00
Carl Lerche
992c2db76c
Finish porting over the initializers to the app object and fix all the tests
2009-10-08 18:12:28 -07:00
Carl Lerche
5c42157cd8
Even more initializers ported over
2009-10-08 15:30:17 -07:00
Carl Lerche
ed77e84c4b
Ported over more initializers
2009-10-08 15:08:08 -07:00
Carl Lerche
7faa52a424
Add a test that ensures that Rails::Initializable can be used with modules
2009-10-08 12:31:09 -07:00
Carl Lerche
feb04bf897
Move the ensure_tmp_directories_exist initializer to the application object
2009-10-08 12:31:09 -07:00
Carl Lerche
e4d7e5090c
Moving more initializers into the application object
2009-10-08 12:31:09 -07:00
Carl Lerche
6d6ae0841c
Start moving the initializers into the application object
2009-10-08 12:31:09 -07:00
Carl Lerche
d096589245
Remove the old initializer file.
2009-10-08 12:31:09 -07:00
Joshua Peek
3b6bdfc105
API change: content_tag_for outputs prefixed class name
2009-10-08 14:13:49 -05:00
Emilio Tagua
0cf4662ec5
Merge commit 'rails/master'
2009-10-08 15:05:18 -03:00
Emilio Tagua
c3f9d51a00
Updated ARel commit version.
2009-10-08 15:04:27 -03:00
Carl Lerche
665c7ad29d
Fix warning spew for 1.9
2009-10-08 10:58:04 -07:00
Chad Woolley
6e7b02b21a
Fix for Ruby 1.9 - define_method throws an exception under 1.9 if given incorrect number of args
...
Signed-off-by: Carl Lerche <carllerche@mac.com >
2009-10-08 10:48:47 -07:00
Chad Woolley
32cea98c3b
Ruby 1.9: Fix ActiveResource::ConnectionError#to_s when @response does not respond to #code or #message
...
Signed-off-by: Carl Lerche <carllerche@mac.com >
2009-10-08 10:45:00 -07:00
Michael Koziarski
28bd0873ff
Don't need h in there now that XSS protection is on by default
2009-10-08 14:34:15 +13:00
Pratik Naik
0c27d0886e
Use indifferent access attributes instead of stringifying them
2009-10-08 00:15:36 +01:00
Michael Koziarski
c352ec060c
error procs have to be safe too
2009-10-08 12:13:48 +13:00
Pratik Naik
572323135f
Allow accepts_nested_attributes_for :reject_if option accept symbols for using a method
...
Conflicts:
activerecord/lib/active_record/nested_attributes.rb
2009-10-07 23:50:30 +01:00
Michael Koziarski
9415935902
Switch to on-by-default XSS escaping for rails.
...
This consists of:
* String#html_safe! a method to mark a string as 'safe'
* ActionView::SafeBuffer a string subclass which escapes anything unsafe which is concatenated to it
* Calls to String#html_safe! throughout the rails helpers
* a 'raw' helper which lets you concatenate trusted HTML from non-safety-aware sources (e.g. presantized strings in the DB)
* New ERB implementation based on erubis which uses a SafeBuffer instead of a String
Hat tip to Django for the inspiration.
2009-10-08 09:31:20 +13:00
José Valim
f27e7ebc0e
Do not ignore .empty_directory files.
...
Signed-off-by: Carl Lerche <carllerche@mac.com >
2009-10-07 11:00:17 -07:00
Emilio Tagua
9a958a3d7d
Relations: Added offset when finding with associations. Delegate array instance
...
methods to to_a.
2009-10-07 12:43:04 -03:00
Emilio Tagua
aadb09b13b
Merge commit 'rails/master'
2009-10-07 12:23:23 -03:00
Emilio Tagua
f13a7bf4e1
Don't send table_name when updating attributes, use the class arel_table.
2009-10-07 12:21:52 -03:00
Emilio Tagua
942d4b2e4f
Don't send table_name when there's no need to.
2009-10-07 12:17:51 -03:00
Emilio Tagua
1d5854826b
Allow preload and eager_load to work on relations at the same time.
2009-10-07 11:57:59 -03:00
Joshua Peek
ff56f3d5e1
Rewrite ActiveModel::Lint as a simple TU mixin
2009-10-07 09:24:51 -05:00
Sam Pohlenz
4df96338ed
Fixed behavior of attribute_methods_generated? [ #3220 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-10-07 09:07:39 -05:00
Sam Pohlenz
f8e91bda9c
Don't share attribute matchers between classes [ #3216 state:resolved]
...
Allows separate models that include ActiveModel::AttributeMethods to
use different sets of attribute matchers.
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-10-07 09:07:39 -05:00
Yehuda Katz
3916f0340e
Not calling a private method anymore
2009-10-07 00:33:13 -10:00
Yehuda Katz
e57197a967
Fix warning spew
2009-10-06 22:36:14 -10:00
Paul Gillard
6361d4234c
Call initialize_copy when cloning [ #3164 state:resolved]
...
Cloned AR objects are now instantiated through initialize_copy rather than
new/initialize. This allows AR classes to override initialize_copy in order to
implement deep cloning.
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-10-06 16:25:51 -05:00
Emilio Tagua
c3b4da7796
Merge commit 'rails/master'
2009-10-06 16:17:02 -03:00
Michael Koziarski
126f623711
don't ignore all bin directories
2009-10-06 15:53:25 +13:00
Jeffrey Hardy
9212138ad0
MessageVerifier#verify raises InvalidSignature if the signature is blank
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-10-05 13:38:26 -07:00
Joshua Peek
b480da5cd6
Coerce all out going body parts to Strings
2009-10-05 13:58:43 -05:00
Emilio Tagua
97aba353c8
Merge commit 'rails/master'
2009-10-05 15:33:59 -03:00
Emilio Tagua
23c168a4fd
Initial documentation to Base#all.
2009-10-05 15:27:40 -03:00
Emilio Tagua
1daceeb838
Merge branch 'associations_2'
2009-10-05 15:25:06 -03:00
Emilio Tagua
65f055a3ed
Added eager loading support to Relation and ActiveRecord#all.
2009-10-05 15:24:08 -03:00
Emilio Tagua
3747f896a1
Moved relation's test to relation_test.
2009-10-05 14:39:20 -03:00
Joshua Peek
570f055c44
Yank FCGI Handler from core
...
http://github.com/rails/fcgi_handler
2009-10-05 11:16:24 -05:00
Joshua Peek
20d6938453
Rewrite FCGI handler test
2009-10-05 10:36:05 -05:00
Joshua Peek
7de5f69cc6
Try to load lib before trying to activate the gem for testing
2009-10-05 10:01:46 -05:00
Joshua Peek
444ba150bd
Put test in place for deprecated dispatcher
2009-10-05 09:42:35 -05:00
Joshua Peek
635aa91224
More robust console test
2009-10-05 09:41:08 -05:00
Emilio Tagua
9a71b6d29d
Merge commit 'rails/master'
2009-10-05 11:30:18 -03:00
Joshua Peek
76d823677f
Revert "Revert "Fix Dispatch.new so passenger works" as it broke the build"
...
This reverts commit 49b52cadc2 .
2009-10-05 09:17:51 -05:00
Michael Koziarski
49b52cadc2
Revert "Fix Dispatch.new so passenger works" as it broke the build
...
This reverts commit c97c31b096 .
2009-10-05 17:23:37 +13:00
Joshua Peek
c97c31b096
Fix Dispatch.new so passenger works
2009-10-04 12:45:53 -05:00
Joshua Peek
86d0590022
Only draw default route once
2009-10-03 23:55:35 -05:00
Joshua Peek
86ed58d912
Use with_routing helper in tests instead of modifying global route set
2009-10-03 23:31:38 -05:00
Joshua Peek
61411f2aeb
Redraw default routes on all internal integration tests. We don't need SimpleRouteCase anymore
2009-10-03 23:18:32 -05:00
Joshua Peek
8287a112c9
Avoid creating new controller constants during test runtime. All routable controllers should be defined beforehand.
2009-10-03 23:03:08 -05:00
Joshua Peek
2a938ad5e7
Run AP isolated tests on CI
2009-10-03 22:14:58 -05:00
Joshua Peek
f5cba5e6b1
Moved shared form helper models into fake_models
2009-10-03 22:14:50 -05:00
Joshua Peek
31319b471b
NumberHelper depends on big decimal extensions
2009-10-03 22:06:25 -05:00
Joshua Peek
7eaed071a2
Changing directories during the test breaks file loading when ran by itself
2009-10-03 22:02:51 -05:00
Joshua Peek
660eb068d3
Don't load rubygems for isolated tests
2009-10-03 21:51:34 -05:00
Joshua Peek
75a2f00c97
Move improved isolated test runner to AP
2009-10-03 21:33:06 -05:00
Joshua Peek
018b79dd36
File extra test folders into controller, dispatch, or template
2009-10-03 21:05:51 -05:00
Joshua Peek
84e94551f6
Add custom "with_routing" to internal tests to fix reseting session after using
...
with_routing. This only affects our internal AP tests.
2009-10-03 20:45:49 -05:00
Emilio Tagua
61c959ab0d
Merge commit 'rails/master'
2009-10-03 18:23:06 -03:00
Joshua Peek
89630a7c2c
Cleanup whitespace introduced in 8377646 and f4f6888
2009-10-02 10:19:30 -05:00
Taryn East
8377646d68
add indifferent access to the attributes
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-10-02 10:13:40 -05:00
Taryn East
f4f68885ef
update_attribute(s) added to Active Resource
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-10-02 10:13:01 -05:00
Emilio Tagua
29457a21c0
Merge commit 'rails/master'
2009-10-02 10:52:55 -03:00
Carl Lerche
420004e030
Initialize a new instance of Rails.application during integration tests
...
This is to fix the AWDWR tests until the application object is refactored to be a singleton.
2009-09-30 12:39:26 -07:00
Carl Lerche
2370e87ae0
Remove all calls to Rails::Initializer from boot.rb
...
This is starting a refactor of the rails initialization process. The boot.rb file will not remain the same.
2009-09-30 12:05:34 -07:00
Carl Lerche
34aae6d739
Remove a duplicate initializer
2009-09-29 17:46:33 -07:00
Carl Lerche
c9d4529c9d
Change Rails::Application to a class that is inherited from.
...
This is still very experimental.
2009-09-29 17:33:17 -07:00
Carl Lerche
d1a63b15e3
Remove unneeded files from the railties test directory
2009-09-29 16:12:45 -07:00
Carl Lerche
6b086449be
Fix the broken railties isolation tests
2009-09-29 16:07:29 -07:00
Yehuda Katz + Carl Lerche
6f6a589d4b
Create the application object from config/environment.rb
...
This is preliminary and not necessarily reflective of the
full plan.
2009-09-28 18:00:26 -07:00
Erik Ostrom
8ffc2e3b8d
Ported the new ActionView::TestCase from 2-3-stable to master [ #3260
...
state:resolved]
The test case now mimicks the template environment more closely, so it's
possible to use render, load helper dependencies.
This also fixes assert_select, and similar assertions. Because view tests
and helpers generally don't render full templates assert_select looks
first in rendered and then in output_buffer to find the rendered output.
Additional `master'-only changes: Made the Action Pack Rakefile run the
ActionView::TestCase tests, and made ActionView::Rendering#_render_text
always return a string.
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-09-28 13:31:30 -05:00
Mike Gunderloy
1696039f29
Remove SQLite2 from CI setup
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-09-28 14:51:40 +13:00
Luciano G Panaro
4168f87623
Make has_one with :conditions hash scope build or creation of the associated object with those conditions
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#3088 state:committed]
2009-09-28 14:50:33 +13:00
Jay Pignata
d48ebeade2
Escaping symbol passed into Memoizable's flush_cache for query methods to allow them to be cleared
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#3138 state:committed]
2009-09-28 14:48:13 +13:00
John Trupiano
e01f99786a
Allow PKG_NAME env variable to control the directory name used when 'rake dev' is used to generate a new rails app.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#3278 state:committed]
2009-09-28 14:41:17 +13:00
Matias Flores
173ee14c3d
Prefer tap to returning
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#3280 state:committed]
2009-09-28 14:38:24 +13:00
John Trupiano
c9318e9010
Introduce :almost keyword for distance_of_time_in_words. Make 1.75 days - 2 days return '2 days'.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#3266 state:committed]
2009-09-28 14:37:31 +13:00
Jay Pignata
8ef1cd9733
Enhancing distance_of_time_in_words to prefix year output with over and about depending upon how many months have elapsed
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#3106 state:committed]
2009-09-28 14:36:38 +13:00
Joshua Peek
a6757a02e1
Move middleware and route configuration from AC::Dispatcher to Rails application object
2009-09-26 21:59:28 -05:00
Joshua Peek
14866fa3d8
Allow setting a default application for all integration tests
2009-09-26 21:38:48 -05:00
Joshua Peek
b0506b086f
Create separate middleware stack for initializer
2009-09-26 21:07:49 -05:00
Joshua Peek
acfeec5151
Allow integration test rack app to be set with "@app" ivar instead of using open_session
2009-09-26 20:51:05 -05:00
Joshua Peek
02413baabb
Fix skipping memcache tests if a memcache server isn't running
2009-09-26 20:02:47 -05:00
Joshua Peek
198081a639
Remove deprecated calls to Dispatcher.to_prepare
2009-09-26 19:57:36 -05:00
Joshua Peek
1f72700575
Move default middleware stack into initializer
2009-09-26 13:41:32 -05:00
Joshua Peek
71b33ec482
AC::Dispatcher is the default app, don't need to set it
2009-09-26 13:02:34 -05:00
Joshua Peek
0c638b3406
Clean up session integration tests so they don't reference AC::Dispatcher
2009-09-26 12:56:53 -05:00
Joshua Peek
db65bb5a31
Pull middleware for Rails info from the initializer instead of ActionController
2009-09-26 12:41:17 -05:00
Chad Woolley
438ff3b5b9
include nokogiri gem, so activesupport nokogiri tests run
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-09-26 12:23:30 -05:00
Joshua Peek
15cffe6fbc
ruby 1.9: Qualify toplevel File reference since config.ru could be eval'd in a different scope
2009-09-26 11:52:37 -05:00
Joshua Peek
ef58194129
Move Rails::Static into ActionDispatch
2009-09-26 11:37:42 -05:00
Joshua Peek
dbb32115ef
Enable static asset server by default
2009-09-26 11:24:56 -05:00
Joshua Peek
79a4d505fa
Add gem filter for default gem path since it maybe different than the set of gem paths
2009-09-26 11:04:08 -05:00
Joshua Peek
5eeed9f00a
Move tmp directory creation from server to initializer
2009-09-26 10:56:36 -05:00
Joshua Peek
c83c0f6936
Remove config.ru generation from --with-dispatchers option
2009-09-25 23:15:49 -05:00
Joshua Peek
5fba5409f7
Fix railties tests
2009-09-25 22:54:41 -05:00
Joshua Peek
85e0a6cd7d
Set const for application object. "Basecamp::Application"
2009-09-25 22:35:54 -05:00
Joshua Peek
968c994c3b
Initializer.run returns an application object
2009-09-25 22:28:09 -05:00
Joshua Peek
dfbd3b9409
Extract "parse_config" into AD
2009-09-25 21:40:55 -05:00
Joshua Peek
accd9b4634
Restore "Start Rails::Application object
...
This reverts commit f14ad41456 .
2009-09-25 21:32:28 -05:00
Joshua Peek
bace497aea
Remove relative url configuration from script/server
2009-09-25 21:17:38 -05:00
Joshua Peek
382870f763
Generate a config.ru stub
2009-09-25 21:10:00 -05:00
Joshua Peek
f14ad41456
Revert "Start Rails::Application object"
...
This reverts commit 4129449594 .
2009-09-25 20:41:40 -05:00
Yehuda Katz + Carl Lerche
4129449594
Start Rails::Application object
2009-09-25 17:42:53 -07:00
Joshua Peek
088ce2904d
Fix generic url rewriter in integration tests
2009-09-25 11:10:39 -05:00
Joshua Peek
24ac3a8d8e
Wrap isolated test runner in a test suite
2009-09-25 01:16:52 -05:00
Jeremy Kemper
a6a0904fcb
Nah, test SHA1, but skip the test and whine if OpenSSL is borked up
2009-09-24 23:13:56 -07:00
Jeremy Kemper
55f132ab82
Test with MD5 digest in an attempt to mollify CI
2009-09-24 23:10:05 -07:00
Jeremy Kemper
38e056ee2a
Use ActiveModel::TestCase base class
2009-09-24 22:56:30 -07:00
Joshua Peek
f430d6b63e
Make gemspecs the authoritative source instead of generating them from the Rakefile
2009-09-25 00:46:13 -05:00
Jeremy Kemper
0a692e48ae
Use OpenSSL::Digest.const(...).new instead of OpenSSL::Digest::Digest.new(...)
2009-09-24 22:44:40 -07:00
Jeremy Kemper
5d24827e39
Explicitly require String#bytesize extension
2009-09-24 22:44:40 -07:00
Joshua Peek
897b9ac43b
Make activesupport.gemspec the authoritative source instead of generating it from the Rakefile
2009-09-25 00:24:34 -05:00
Joshua Peek
bb6ca25d03
Check if the lib is in the load path and requirable before attempting to activate the gem version
2009-09-24 23:57:14 -05:00
Jeremy Kemper
018ba27701
Skip addition to load path if an externally-provided lib is already in place. Just to keep the path shorter.
2009-09-24 19:10:31 -07:00
Jeremy Kemper
0bd6e933c0
Restore split between require-time and runtime load path mungery. Simplifies vendor requires.
2009-09-24 18:38:18 -07:00
Jeremy Kemper
772a32a22d
Convert the other vendored libs to avoid pulling in old gems. Works even if rubygems isn't loaded.
2009-09-24 17:29:59 -07:00
Jeremy Kemper
0039c0344c
Avoid inadvertently loading an old tzinfo gem
2009-09-24 17:21:14 -07:00
Yehuda Katz + Carl Lerche
f0dd77c6be
Move railties/lib/* into railties/lib/*
2009-09-24 16:11:41 -07:00
Joshua Peek
610b81beca
Clean up log output for rendered templates
2009-09-24 12:30:13 -05:00
Joshua Peek
9f96708f53
Resurrect AC::Benchmarking [ #3140 state:resolved]
2009-09-24 12:13:09 -05:00
Joshua Peek
c2f8b4e92f
Remove dead requries to AC integration. Rely on autoloads instead
2009-09-24 09:41:46 -05:00
Joshua Peek
3fb623fa90
SessionRestoreError belongs in AD
2009-09-23 23:37:31 -05:00
Joshua Peek
542ddde5d4
Move helpers specific to functional tests out of TestProcess into AC::TestCase
2009-09-23 23:03:24 -05:00
Joshua Peek
4a55d1de8d
Move integration test runner into ActionDispatch
2009-09-23 22:38:19 -05:00
Mike Gunderloy
3600c3840e
More places to bump rack-test version [ #3250 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-09-23 09:21:44 -05:00
Joshua Peek
a9c8995ac2
Bump rack-test required version to 0.5
2009-09-22 14:09:24 -05:00
Emilio Tagua
5f9540e483
Merge commit 'rails/master'
2009-09-22 15:08:45 -03:00
José Valim
2407479603
Fixes Sam Ruby tests suite.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-09-21 17:56:24 -07:00
Yehuda Katz
1bbb9b2db0
Merge commit 'jose/orchestra'
2009-09-21 12:05:28 -07:00
Emilio Tagua
a294d8362b
Merge commit 'rails/master'
2009-09-21 14:57:24 -03:00
lakshan
e2d0b0ee61
fixed ActiveModel::Lint typos [ #3236 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-09-21 09:49:43 -05:00
José Valim
4215e9ab93
Instrumenting cache stores.
2009-09-20 12:07:21 -03:00
José Valim
09f798ba18
Instrument create and deliver in ActionMailer.
2009-09-20 11:09:17 -03:00
José Valim
a0233dd3b2
Use NewCallbacks on ActionDispatch::Callbacks.
2009-09-20 10:56:38 -03:00
José Valim
7cc1c2e71d
Add Orchestra instrumentation to fragment and page caching.
2009-09-20 10:56:38 -03:00
José Valim
8f47f311b7
Instrument process_action, render and sql.
2009-09-20 10:56:38 -03:00
José Valim
3c9a37c9c4
Added Orchestra.
2009-09-20 10:56:38 -03:00
Joshua Peek
762d761673
All tests should be ran under isolated_test too
2009-09-19 13:26:54 -05:00
Joshua Peek
d5cfc72f55
Merge "test_new_base" runner into standard "test_action_pack"
2009-09-19 13:22:58 -05:00
Joshua Peek
f5ace625fe
Ensure changes to I18n locale get reset during tests
2009-09-19 13:22:09 -05:00
Joshua Peek
f1c8f07be8
Follow short name convention for test folder and just call it "abstract"
2009-09-19 13:14:22 -05:00
Joshua Peek
69192bee2d
Merge bundler helper into abstract_unit
2009-09-19 13:12:54 -05:00
Joshua Peek
0540781539
Namespace TestControllers inside their test case class
2009-09-19 13:04:12 -05:00
Joshua Peek
db0af8075d
Avoid conflict with a "MetalTest" module used in tests
2009-09-19 12:52:52 -05:00
Joshua Peek
355e2350ca
All on one base, don't need this
2009-09-19 12:51:28 -05:00
Joshua Peek
12b3799448
Avoid conflicts with another ContentTypeController used in testing
2009-09-19 12:50:14 -05:00
Joshua Peek
f05b1e5eb1
All on one abstract_unit
2009-09-19 12:10:41 -05:00
Joshua Peek
a6f19a155a
There is only one base now
2009-09-19 11:57:56 -05:00
Joshua Peek
5bc47a93b7
Make sure caching test is using a generatable url
2009-09-19 11:56:11 -05:00
Yehuda Katz
81c421386c
1.9 fix for changes to #to_s. By Sam Ruby. [ #3228 state:resolved]
2009-09-18 10:35:42 -07:00
Brian Donovan
f183288050
Fix typo.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-09-17 18:30:28 -07:00
Jeremy Kemper
3fc2d1ebd9
Extract class-finder method from instantiate
2009-09-17 17:26:29 -07:00
Jeremy Kemper
7701c6f1c0
Collapse nested conditional
2009-09-17 16:15:04 -07:00
Aaron Patterson
636624fbf2
making nokogiri to hash less clever, more fast O_o
...
[#2243 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-17 11:50:58 -07:00
Jeremy Kemper
b5dd1b6599
Fix brittle content-type check. [ #1956 state:committed]
2009-09-17 11:34:40 -07:00
Justin Bailey
c9d3c48dc6
Enable use of MySQL stored procedures by default.
...
[#3204 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-17 10:57:03 -07:00
Developer
0d762646c4
Allow Nokogiri XmlMini backend to process cdata elements
...
[#3219 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-17 10:28:10 -07:00
Joshua Peek
23e72d4cc8
Forward all methods to delayed log
2009-09-16 22:34:44 -05:00
Yehuda Katz
6be6fae59a
Adds patch to CI
2009-09-15 17:56:20 -07:00
José Valim
befec8a0d8
Remove unused code in ActionView.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-09-15 16:18:10 -07:00
Joshua Peek
52aeb8d2e7
Beef up AD::Rescue to replace global exception handling lost in ApplicationController
2009-09-15 16:33:15 -05:00
Joshua Peek
90d7ae23c6
Remove global exception catching from ApplicationController.
...
It was severely broken since it was ported to NewBase and is causing problems with normal exception catching. A replacement is coming soon.
2009-09-15 10:05:46 -05:00
Emilio Tagua
378b02d3aa
Updated ARel version.
2009-09-14 17:37:26 -03:00
Jeremy Kemper
d58ee23008
Require rubygems in generators test so Action Dispatch can find rack
2009-09-14 13:04:43 -07:00
Jeremy Kemper
b8e914709c
Require active_support after autoload setup
2009-09-14 13:04:43 -07:00
Jeremy Kemper
4b8576a0c6
Style bikeshed: prefer obvious string paths with / separator to args lists with ', ' separator
2009-09-14 13:04:43 -07:00
Jeremy Kemper
697dda5f29
Fix deprecated gem-name requires
2009-09-14 13:04:43 -07:00
Jeremy Kemper
70d2640700
Cherry-pick core extensions. Don't explicitly require rubygems. Use load path for vendored thor.
2009-09-14 13:04:43 -07:00
Jeremy Kemper
51d202e6f3
Remove premature active_support/mini
2009-09-14 13:04:43 -07:00
Jeremy Kemper
af68eb99c1
Uses extlib_inheritable_accessor
2009-09-14 13:04:43 -07:00
Emilio Tagua
24260dc0c8
Merge commit 'rails/master'
2009-09-14 09:47:55 -03:00
Joshua Peek
181cd109d9
Lookup ruby bin name too
2009-09-14 00:51:31 -05:00
Joshua Peek
c5a6de50bb
Use rbconfig instead of rubygem detection
2009-09-14 00:47:09 -05:00
Joshua Peek
ec01cc4510
For testing, only load rubygems if mocha is missing
2009-09-14 00:41:04 -05:00
Joshua Peek
27458464d6
Forgot to update load path dir for vendored memcache
2009-09-14 00:09:34 -05:00
Jeremy Kemper
ec36edff2d
Use abort
2009-09-13 21:52:18 -07:00
Jeremy Kemper
fa1e6dc577
Skip parent isolation tests too
2009-09-13 21:37:31 -07:00
Joshua Peek
988a614dd2
Don't run gem bundle by default
2009-09-13 23:33:54 -05:00
Joshua Peek
a42c8958f9
Bump vendored memcache to 1.7.5
2009-09-13 23:30:32 -05:00
Joshua Peek
b2f0b8cbda
Rollback AS bundler work and improve activation of vendored dependencies
2009-09-13 22:55:46 -05:00
Joshua Peek
6f9e449830
Callbacks need to require reporting
2009-09-13 21:56:10 -05:00
Joshua Peek
8c8e09c305
Restore AS vendor file until we get things sorted out in railties
2009-09-13 21:07:35 -05:00
Joshua Peek
a0e43073e2
Rewrite resource routing tests that are coupled to the router implementation
2009-09-13 18:43:16 -05:00
Joshua Peek
a3fcfd819b
Need to reset session for AP rescue tests after altering the route set
2009-09-13 17:52:33 -05:00
Joshua Peek
213c920e4f
Define weblog controller for url helper test
2009-09-13 17:28:44 -05:00
Joshua Peek
67eb892e94
AV::UrlHelper depends on Array#second
2009-09-13 17:25:40 -05:00
Joshua Peek
8491b77f55
Omit PATH_INFO in integration test so rack mock will properly override it
2009-09-13 17:15:35 -05:00
Joshua Peek
076d7f885e
AP tests: detect missing dependencies and automatically run bundler
2009-09-13 16:37:30 -05:00
Joshua Peek
6d214c953b
Merge abstract_controller/test_helper and new_base/test_helper since they are expected to run in the same testing sandbox
2009-09-13 16:30:27 -05:00
Joshua Peek
199a423f42
Don't eager require mocha, AS unit needs to set stuff up first
2009-09-13 16:12:33 -05:00
Joshua Peek
48c81f52d4
Remove dead old base abstract unit
2009-09-13 15:34:17 -05:00
Joshua Peek
a01bf41c61
Lazy require memcache for session middleware
2009-09-13 15:30:55 -05:00
Joshua Peek
fff3f0ae0c
Detect missing dependencies and automatically run bundler
2009-09-13 15:10:29 -05:00
Joshua Peek
ef38e67562
Ignore bundled gems
2009-09-13 14:36:20 -05:00
Joshua Peek
5b8373da29
Shush interpolation warnings
2009-09-13 14:34:59 -05:00
Joshua Peek
3b6bb4664f
Forget about old memoize immutable behavior
2009-09-13 13:08:12 -05:00
Joshua Peek
25f4129151
Need to declare optional dependencies from AS
2009-09-13 12:58:49 -05:00
Joshua Peek
870bf8950f
Load vendored i18n if its not found since its a real requirement
2009-09-13 12:49:22 -05:00
Joshua Peek
ec0d4efd79
Avoid referencing rubygems
2009-09-13 12:47:37 -05:00
Joshua Peek
a9f5f4bb45
Don't force test suite to use bundler
2009-09-13 12:42:13 -05:00
Joshua Peek
f3f2e0b00d
Move AS vendor support into bundler.
...
Run `rake bundle` before running tests.
2009-09-13 12:24:50 -05:00
Joshua Peek
3b325d624c
require reporting before attempting to "shush"
2009-09-13 10:53:12 -05:00
Jeremy Kemper
941e990410
Shush, new_callbacks
2009-09-13 06:06:20 -07:00
Jeremy Kemper
c2018b4b7b
Shush, rexml
2009-09-13 05:57:44 -07:00
Jeremy Kemper
7e6652edbf
Prefer not to shadow a local
2009-09-13 05:56:21 -07:00
Jeremy Kemper
98f96a0809
Ignore isolation test tests for test-unit 2 also
2009-09-13 05:52:18 -07:00
Jeremy Kemper
053a0f6ac4
Clean up spurious JSON decoding test failure
2009-09-13 05:43:02 -07:00
Jeremy Kemper
7d2add8c96
Ruby 1.9 compat: fix regexp slice test
2009-09-13 05:31:43 -07:00
Jeremy Kemper
cce2112f12
Silence warning for Encoding.default_external=
2009-09-13 04:48:40 -07:00
Jeremy Kemper
91ffddca57
Use Encoding.default_external, not _internal
2009-09-13 04:43:41 -07:00
sdsykes
dbe9fa03df
Ruby 1.9 compat: corrected instance_methods check
...
[#3156 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-13 02:57:53 -07:00
Jeremy Kemper
091486fb98
activesupport -> active_support
2009-09-13 02:45:37 -07:00
Aaron Patterson
f959758687
making secure_compare faster
...
[#3195 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-13 02:44:52 -07:00
Michael Koziarski
e590508a9b
Dup the arguments to string compare so we can use force_encoding.
2009-09-13 10:36:04 +12:00
Michael Koziarski
81cba78e9e
Merge commit 'alloy/master-nested_attributes_and_autosave'
2009-09-13 10:32:24 +12:00
Yehuda Katz
76cd4cb27e
Memoize in the endpoint.
2009-09-12 15:38:34 -05:00
Yehuda Katz
ddb4600ce6
Get ActionPack's test running on bundled gems. This should make running tests on new machines, as well as CI, work well.
2009-09-12 15:22:11 -05:00
Yehuda Katz
a8a336cbfc
Revert "ruby 1.9 friendly secure_compare" because it breaks CI and Sam Ruby's suite
...
This reverts commit 5de75398c4 .
2009-09-12 14:35:03 -05:00
Yehuda Katz
7152a4e9a6
Add per-controller middleware
2009-09-12 13:51:15 -05:00
Eloy Duran
26639e8a45
Removed the version of ActiveRecord::Base#destroyed? that was added in a44a1257d8.
...
Because José Valim was cheeky enough to already add it to the master branch.
2009-09-12 16:16:48 +02:00
Eloy Duran
a144b41cbc
Removed some superfluous conditionals from the autosave association validation methods.
...
Which are unneeded now that we only define them when needed.
2009-09-12 16:04:47 +02:00
Alexey Kovyrin
938c0ee045
Define autosave association validation methods only when needed. [ #3161 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-09-12 16:04:36 +02:00
Eloy Duran
580ec0dccd
Added some documentation about setting :autosave => false on an association.
2009-09-12 16:04:25 +02:00
Eloy Duran
65f98951ac
During autosave, ignore records that already have been destroyed. [ #2537 state:resolved]
2009-09-12 16:04:07 +02:00
Graeme Porteous
c01be9de32
Fix has_one with foreign_key and primary_key association bug which caused the associated object being lost when saving the owner. [ #1756 state:resolved]
...
Mixed in a bit from patch by ransom-briggs. [#2813 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-09-12 16:03:32 +02:00
José Valim
3091252aba
Rename nested attributes _delete to _destroy to reflect its actual behavior and DSL (:allow_destroy). Deprecation warning added. [ #2889 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-09-12 15:59:32 +02:00
Dmitry Polushkin
845f62f473
Fix autosave association to skip validation if it is marked for destruction. [ #2064 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-09-12 15:56:01 +02:00
Eloy Duran
6cc0b9638f
Explicitely setting `autosave => false' should override new_record autosaving. [ #2214 state:resolved]
...
Original author is Jacob.
2009-09-12 15:53:15 +02:00
Andrew France
1b78e9bba3
Allow fields_for on a nested_attributes association to accept an explicit collection to be used. [ #2648 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-09-12 15:50:05 +02:00
Lance Ivy
a44a1257d8
Don't cascade autosave validation to destroyed children. [ #2761 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-09-12 15:40:45 +02:00
Mike Breen
bcd0ef710e
Raise an exception with friendlier error message when attempting to build a polymorphic belongs_to with accepts_nested_attributes_for. [ #2318 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-09-12 15:37:54 +02:00
sdsykes
3180619c0d
Fix habtm associations when using multiple databases
...
[#3128 ]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-12 02:57:29 -07:00
Jeremy Kemper
8682d76cc9
Revert "Allow frameworks to be required by their gem name"
...
This has just been confusing. Better to educate than band-aid.
This reverts commit 18a24274ec .
Originally from http://dev.rubyonrails.org/ticket/8845 [drnic]
2009-09-12 02:41:01 -07:00
Akira Matsuda
3ce16b4c5f
Ruby 1.9 compat: Avoid using the return value of FileUtils.mkdir_p, as it does not return a String but an Array in Ruby 1.9
...
[#2018 state:committed milestone:2.3.5]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-11 19:20:57 -07:00
Akira Matsuda
0990a13500
Ensure validation errors to be ordered in declared order
...
[#2301 state:committed milestone:2.3.5]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-11 18:52:22 -07:00
Akira Matsuda
68b2b730e4
Fix default_error_messages back to the original message
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-11 18:34:12 -07:00
Jakub Kuźma
b22c951e7a
ruby 1.9 friendly secure_compare
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-09-12 12:48:34 +12:00
Shugo Maeda
ff2eb2d808
Removed the copyright notice not to show it in the result of 'ri ActiveRecord'.
2009-09-11 15:33:20 -07:00
Joshua Peek
72721c6725
Add gem load paths after loading environment
2009-09-11 10:31:31 -05:00
Nathaniel Talbott
f024aabee3
Fix filtering parameters when there are Fixnum or other un-dupable values.
...
[#3184 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-10 18:53:50 -07:00
Beau Harrington
38d65b03d6
Remove redundant checks for valid character regexp in ActiveSupport::Multibyte#clean and #verify.
...
[#3181 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-10 17:36:54 -07:00
Emilio Tagua
0489f0c582
Merge commit 'rails/master'
2009-09-08 15:39:33 -03:00
Emilio Tagua
670281c6b2
Merge commit 'rails/master'
...
Conflicts:
activerecord/lib/active_record/associations.rb
2009-09-08 15:38:51 -03:00
José Valim
af5b12c64c
Fix callbacks on ActionPack.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-09-08 10:28:28 -07:00
José Valim
2ea1d684d9
Refactor new callbacks and AR implementation.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-09-08 10:26:39 -05:00
José Valim
4f37b97033
Changed ActiveRecord to use new callbacks and speed up observers by only notifying events that are actually being consumed.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-09-08 10:26:39 -05:00
Jeremy Kemper
aeab739bd5
Ruby 1.9: fix MessageVerifier#secure_compare
2009-09-08 14:05:33 +09:00
Joshua Peek
47aebacd51
Please 1.8.6 CI
2009-09-07 21:56:53 -05:00
Joshua Peek
b7c1fbc050
Start running AS isolated tests on CI
2009-09-07 21:13:25 -05:00
Joshua Peek
1a0f822037
Use draw/connect mapper api instead of directly using add_named_route
2009-09-06 23:21:04 -05:00
Joshua Peek
314e18aba2
Need to reset session for AR session tests after altering the route set
2009-09-06 23:09:47 -05:00
Joshua Peek
2ae84e04aa
Add fake controllers for url rewriter tests
2009-09-06 23:02:55 -05:00
Joshua Peek
c531bd6665
Cleanup hacky routing with controller_path in url helper tests. This doesn't work in real life anyway.
2009-09-06 22:29:29 -05:00
Joshua Peek
ab8aac09d6
Need to reset session in internal integration tests after altering the route set
2009-09-06 22:01:58 -05:00
Joshua Peek
9f47f8d892
Fix isolated running of AddressesTest
2009-09-06 21:42:05 -05:00
Joshua Peek
1c02fc295d
Fix isolated running of ActionPackAssertionTest
2009-09-06 21:19:29 -05:00
Joshua Peek
c3accd7ded
Fix failing isolated routing test
2009-09-05 19:39:33 -05:00
Joshua Peek
59d1b23ea1
Fix failing ARes isolated tests
2009-09-05 19:24:43 -05:00
Joshua Peek
6dc9ad80e6
Fix warnings in AMo
2009-09-05 19:10:21 -05:00
Joshua Peek
c6e0923245
Fix failing AMo isolated tests
2009-09-05 18:54:19 -05:00
Joshua Peek
fe68cf2784
Fix failing AS isolated tests
2009-09-05 18:31:10 -05:00
Joshua Peek
ca2f2d1800
Turn warnings on for AS isolated tests
2009-09-05 18:24:58 -05:00
Michael Koziarski
87c93da440
Fix a messed up merge commit
2009-09-04 14:28:32 +12:00
Michael Koziarski
b16e0c9223
Clean tag attributes before passing through the escape_once logic.
...
Addresses CVE-2009-3009
2009-09-04 09:25:38 +12:00
Michael Koziarski
9a73630d93
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 >
Conflicts:
activesupport/lib/active_support/multibyte.rb
2009-09-04 09:25:38 +12:00
Coda Hale
5e6dab8b34
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:25:38 +12:00
Jay Pignata
bd97c3044a
CookieStore should not be derived from Hash - reverting [ #2268 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-09-03 15:15:15 -05:00
Yehuda Katz + Carl Lerche
487ee41d2f
Test for previous commit (we wrote it first, I swear)
2009-09-03 12:58:43 -07:00
Yehuda Katz + Carl Lerche
119793a4c1
Replace :formats => ["*/*"] with the default formats set
2009-09-03 12:52:53 -07:00
Yehuda Katz + Carl Lerche
e3744166ec
Refactor ActionController to use find_template and template_exists?
2009-09-03 12:52:53 -07:00
Sam Pohlenz
4b6321efa9
Don't raise exceptions for missing javascript_include_tag or stylesheet_link_tag sources unless the :cache or :concat options are given. [ #2738 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-09-03 14:01:01 -05:00
Yehuda Katz + Carl Lerche
f61dc0ef65
Remove a useless method in the fixture template class
2009-09-03 11:40:03 -07:00
Yehuda Katz + Carl Lerche
f3fc5c4b5f
Refactor ActionView::Resolver
2009-09-03 11:18:57 -07:00
Yehuda Katz + Carl Lerche
dd34691b8d
Extract finding the template in AC to it's own method
2009-09-03 11:18:56 -07:00
Jay Pignata
e0f1a7dc19
If session_options[:id] is requested when using CookieStore, unmarshal the session to access it [ #2268 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-09-03 11:50:01 -05:00
Carl Lerche
f416f9f0ae
Vendor the latest version of the bundler
2009-09-03 09:31:04 -07:00
Carl Lerche
e3f5fd536e
Add ActiveModel's ./pkg and ./doc to .gitignore
2009-09-03 08:59:26 -07:00
Jeremy Kemper
3b6a9a020e
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 state:open]
This reverts commit da636809da .
2009-09-02 13:55:47 -07:00
Joshua Peek
723a47bfb3
Kill AMo observing wrap_with_notifications since ARes was only using it
2009-09-02 11:44:36 -05:00
Jeffrey Hardy
e870e24887
Don't try to log protected attribute removal if there's no logger defined [ #3135 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-09-02 11:21:20 -05:00
Jeffrey Hardy
41b3c912b7
Remove ClassInheritableAttributes test case, already covered by ActiveSupport [ #3114 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-09-02 11:21:20 -05:00
Yehuda Katz
847907d753
Make Sam Ruby's test suite happy
2009-09-01 19:37:49 -07:00
Yehuda Katz + Carl Lerche
66a4585f88
Fix the */* with Net::HTTP bug [ #3100 state:resolved]
2009-09-01 15:54:29 -07:00
Carl Lerche
bd53ebde72
Add required dependencies on activemodel
2009-09-01 12:26:00 -07:00
Carl Lerche
016b1d3596
Merge branch 'master' of git@github.com:rails/rails
2009-09-01 12:19:09 -07:00
Emilio Tagua
39e4e76d15
Merge commit 'rails/master'
...
Conflicts:
activerecord/lib/active_record/associations.rb
2009-09-01 15:45:43 -03:00
Emilio Tagua
c01c21b31d
Added association preload to relation.
2009-09-01 15:36:09 -03:00
José Valim
da636809da
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:15:23 -07:00
Joshua Peek
c5f6e038da
ActionPack test helpers need to activate rack gem
2009-09-01 10:27:19 -05:00
Joshua Peek
ad49895fe8
Railties test helpers need to activate rack gem
2009-09-01 10:05:17 -05:00
Geoff Buesing
cc1efe7e5a
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:22 -07:00
Bryan Helmkamp
a5588ffc08
Activate rack-test gem before it's required. This shouldn't be necessary, but should fix the build for now
2009-08-31 23:17:43 -07:00
Joshua Peek
a79790e1a5
rack-test 0.4.2 has rack 1.1.pre goodies, we'll use it instead
2009-08-31 23:08:20 -05:00
Joshua Peek
426e76ad85
Temp rack-test gem needs proper gem source
2009-08-31 21:53:24 -05:00
Joshua Peek
14870257c1
Initializer middleware helper needs to require actioncontroller
2009-08-31 21:09:39 -05:00
Yehuda Katz
67f5d611f5
Add rake gemspec and gemspecs to the repo
2009-08-31 17:20:44 -07:00
Joshua Peek
66d713fc8f
License, version, and gemspec for ActiveModel. Ship it!
2009-08-31 19:09:16 -05:00
Joshua Peek
ffd2cf1670
To make CI happy, use my edge rack-test gem (just for now)
2009-08-31 15:46:29 -05:00
Joshua Peek
b4068c12eb
Restore rack gem dependency
2009-08-31 15:40:08 -05:00
Joshua Peek
5e5e34377c
Back off rack 1.1-pre and bundle in the new testing goodies
2009-08-31 15:39:19 -05:00
Joshua Peek
8974ab2e2e
action_dispatch and action_view are just more autoloads, so its okay to require them
2009-08-31 14:49:59 -05:00
Joshua Peek
c63dac81c1
Switch over to rack-test gem
2009-08-31 14:27:10 -05:00
Joshua Peek
6f40139b53
SessionHash#update and SessionHash#delete are missing a call to load! [ #3056 state:resolved]
2009-08-31 13:39:06 -05:00
Kane
cf9f361699
added proc and symbol support to validates_numericality_of [ #3049 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-08-31 13:35:14 -05:00
Yehuda Katz
7e3abbfdc2
Merge commit 'jose/generators'
2009-08-31 11:07:37 -07:00
Jay Pignata
7316d029e6
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:02:19 -05:00
Josh Sharpe
80989437dc
I added this feature so that a Map of changed fields could be retrieved
...
after a model had been saved. This is useful in the after_save callback
when you need to know what fields changed. At present there is no way
to do this other than have code in the before_save callback that takes
a copy of the changes Map, which I thought was a bit messy.
Example.
person = Person.find_by_name('bob')
person.name = 'robert'
person.changes # => {'name' => ['bob, 'robert']}
person.save
person.changes # => {}
person.previous_changes # => {'name' => ['bob, 'robert']}
person.reload
person.previous_changes # => {}
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-08-31 12:50:27 -05:00
Jay Pignata
57f7308da4
Changing plugin loader to use blocks instead of Symbol#to_proc to ensure tests run without activesupport
...
[#3118 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-30 17:01:59 -07:00
Antonio Tapiador del Dujo
cf4846c6ae
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:36:22 -07:00
José Valim
d8d83e7821
Change div.attribute to div.field and add some _form to tests.
2009-08-30 18:49:54 +02:00
José Valim
0efedf2a30
Ensure scaffold works properly even if plural name is given. [ #3062 ]
2009-08-30 17:58:20 +02:00
José Valim
5096ba961c
Remove inline css. [ #593 status:resolved]
2009-08-30 17:04:16 +02:00
José Valim
5d645c271b
Change scaffold to use _form as partial and div's instead of paragraphs. [ #1760 status:resolved]
2009-08-30 16:53:23 +02:00
David Calavera
0fc5c59b37
Rails templates git command runs inside another directory [ #2466 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-30 16:25:07 +02:00
Rodrigo Rosenfeld Rosas
0f9675a872
Fix spelling in Rails 'generator' generator. [ #3080 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-30 16:18:21 +02:00
José Valim
72c6ea1022
Update vendored thor.
2009-08-30 16:16:53 +02:00
Chad Woolley
d8e7ff12a8
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:07 -07:00
Chad Woolley
22e946873c
Send CI notifications to core list.
...
* Only send emails on official box.
* Update CI setup docs to correct hostname instructions.
[#3063 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-29 13:09:46 -07:00
José Valim
3f78de67b5
Ensure that blocks are also handled inside the responder.
2009-08-29 18:21:19 +02:00
José Valim
684a6b3c71
Attempt to render the template inside the responder, so it can be used for caching and pagination.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-08-29 11:01:00 -05:00
Carl Lerche
22d5e3d89d
Make sure all needed files get added to the rails gem
2009-08-29 10:13:52 -05:00
Yehuda Katz
dbf20c2dbb
Initial AMo Lint implementation
2009-08-29 01:49:18 -05:00
Yehuda Katz
353157ccd9
Make rake install work
2009-08-28 18:05:02 -05:00
Jeremy Kemper
f6ca7e4e75
Prefer utf8_unicode_ci (better) over utf8_general_ci (faster)
2009-08-27 23:07:43 -07:00
Emilio Tagua
6b67df70ab
Revert "Revert "Add readonly support for relations.""
...
This reverts commit f2c0725d79 .
2009-08-27 20:03:46 -03:00
Emilio Tagua
f2c0725d79
Revert "Add readonly support for relations."
...
This reverts commit 7cce95b25a .
2009-08-27 20:00:14 -03:00
Emilio Tagua
7cce95b25a
Add readonly support for relations.
2009-08-27 18:52:14 -03:00
Emilio Tagua
d56e987757
No need to reload the relation table with a method param, just nil it.
2009-08-27 16:49:16 -03:00
Emilio Tagua
53f6c6d24e
Performance: Don't reload ARel relation on update.
2009-08-27 16:46:24 -03:00
Emilio Tagua
e204f80dbb
Performance: Don't reload the ARel relation on create, do it on
...
reset_column_information.
2009-08-27 16:42:57 -03:00
Emilio Tagua
1cc0ea826e
Performance: Don't reload the arel_table when destroying.
2009-08-27 16:30:48 -03:00
Emilio Tagua
d395391e1d
Merge commit 'rails/master'
2009-08-27 15:56:16 -03:00
Jeffrey Hardy
c10396b142
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:20:51 -07:00
Joshua Peek
ba5995dcd9
Reset session in integration tests after changing routes to reload the middleware stack
2009-08-27 12:43:26 -05:00
Yehuda Katz
f3ed0de340
Create an install task that successfully installs all Rails gems
2009-08-27 05:00:57 -05:00
Yehuda Katz
bb91beabbd
Remove some old cruft
2009-08-27 05:00:57 -05:00
Carl Lerche
6a001e925e
Require necessary active_support files in cookie store
2009-08-26 23:07:55 -07:00
Carl Lerche
4467fa7d24
Fixed stupid mistake... nothing to see here.
2009-08-26 20:51:54 -07:00
Carl Lerche
78ced08338
Add a default parameter for Resolver#initialize
2009-08-26 19:52:18 -07:00
Carl Lerche
2890760665
Set the request and response in ActionController::Middleware
2009-08-26 19:52:18 -07:00
Carl Lerche
efbd535f36
Have AbstractController::Logger#process_action return super's value
2009-08-26 19:52:17 -07:00
Jeffrey Hardy
8c05ca96f8
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:09 -07:00
Jeffrey Hardy
0821941598
Eliminate warnings from Regexp multiline extension tests
...
[#3103 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-26 14:47:29 -07:00
Jeffrey Hardy
66d8063c91
Correct Regexp#un/optionalize assertions and fix uncovered failures
...
[#3102 state:incomplete]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-26 14:46:38 -07:00
Jeffrey Hardy
05b529ca57
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:26 -07:00
Akira Matsuda
cc9af20da7
I18n: use I18n for select helpers' prompt text
...
[#2252 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-26 13:55:57 -07:00
Emilio Tagua
286f47f3b0
Remove useless var local definition.
2009-08-26 16:19:19 -03:00
Jeremy Kemper
a7ca5595a2
Revert "I18n: use I18n for select helpers' prompt text"
...
Broke CI.
[#2252 state:open]
This reverts commit adedf72821 .
2009-08-26 12:12:40 -07:00
Sven Fuchs
d672a14ee7
allow ActiveRecord#RecordInvalid exception message to be localized
...
[#2754 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-26 11:29:16 -07:00
Akira Matsuda
adedf72821
I18n: use I18n for select helpers' prompt text
...
[#2252 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-26 11:29:16 -07:00
Yehuda Katz
9408fcd2e8
Create new ActionController::Middleware class that will work as a normal Rack middleware.
...
* This initial implementation is a bit hackish, but it uses a normal middleware API
so it's future-proof when we improve the internals.
2009-08-26 00:18:52 -07:00
Joshua Peek
78129b1731
Track all AC base subclasses as possible controllers for internal testing
2009-08-25 23:34:48 -05:00
Yehuda Katz + Carl Lerche
5bc66f160d
And the same thing for Basic
2009-08-25 17:34:07 -07:00
Yehuda Katz + Carl Lerche
3a5269eba4
HTTP Auth should not depend on RenderingController
2009-08-25 17:29:48 -07:00
Yehuda Katz + Carl Lerche
303f9b8841
Redirector had an undeclared dependency on Logger.
2009-08-25 17:20:58 -07:00
Yehuda Katz + Carl Lerche
a21aaca8ea
Rework Middleware stack to match the Rack middleware protocol more closely
2009-08-25 17:04:09 -07:00
Yehuda Katz + Carl Lerche
469424c85e
Modify Digest and Basic to take a request so they can be used outside of the controller
2009-08-25 16:02:26 -07:00
Yehuda Katz + Carl Lerche
86c7b144fa
Add a TODO so we remember to fix partial layouts
2009-08-25 16:02:26 -07:00
Emilio Tagua
33746c44cb
No need to create a new relation if the argument is blank.
2009-08-25 19:47:29 -03:00
Emilio Tagua
51910106f1
Merge commit 'rails/master'
2009-08-25 19:37:41 -03:00
Jeremy Kemper
c3a0a36fc3
Fix typo
2009-08-25 13:41:48 -07:00
Yehuda Katz + Carl Lerche
c7ba911a43
ActionController::Metal can be a middleware
2009-08-25 12:14:31 -07:00
Emilio Tagua
09fde6440a
timestamps gives a created_at field not created_on.
...
[#3093 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-24 16:17:08 -07:00
Jeremy Kemper
e93d0a50c0
Ruby 1.9: fix Time#beginning_of_day inaccuracy due to subtracting a Float
2009-08-22 15:53:19 -07:00
Joshua Peek
b58acea569
Move legacy param_parsers config onto AD::ParamsParser
2009-08-21 16:49:33 -05:00
Emilio Tagua
689b89f548
Revert "Add bench script for ActiveRecord. Ignore log file and temporary cache"
...
This reverts commit 0c6aed0a09 .
2009-08-21 17:43:46 -03:00
Emilio Tagua
c57f94d730
Merge commit 'rails/master'
2009-08-21 17:43:32 -03:00
taryn
ce61a6bd55
Added first/last/all aliases for equivalent find scopes
...
Just a copy from Active Record (with tests). Each is a warpper function for
the equivalent scoped call to find eg first is a wrapper for find(:first)
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-08-21 14:49:59 -05:00
Jeremy Kemper
8bc3a14727
Benchmark script via miloops' arel fork via DataMapper's AR comparison script
2009-08-20 21:09:59 -07:00
Emilio Tagua
0c6aed0a09
Add bench script for ActiveRecord. Ignore log file and temporary cache
...
sql files.
2009-08-20 18:58:12 -03:00
Emilio Tagua
a60334fdc5
Remove useless conditionals/local var.
2009-08-19 19:36:06 -03:00
Emilio Tagua
54fcbb881d
Make sure join association methods are called once.
2009-08-19 17:45:13 -03:00
Emilio Tagua
b32474020c
Don't sanitize_sql where it doesn't make sense.
2009-08-19 16:29:26 -03:00
Emilio Tagua
ccf5f2c4a2
Remove old method and comment.
2009-08-19 16:17:16 -03:00
Emilio Tagua
3e1ef198e0
Remove useless InnerJoinDependency, inner joins are performed through
...
Arel::InnerJoin.
2009-08-19 16:08:54 -03:00
Emilio Tagua
b342728677
Merge commit 'rails/master'
2009-08-19 11:09:24 -03:00
Emilio Tagua
2048556a14
Remove whitespace.
2009-08-19 11:09:12 -03:00
taryn
328ba3b333
Added save! which raises ResourceInvalid unless valid?
...
Similar to Active Record - it will raise ActiveResouce::ResourceInvalid if
the resource is not valid (ie if <tt>valid?</tt> returns false)
However - does not raise ActiveResource::ResourceNotFound if the callbacks
fail (callbacks have not yet been implemented) - it will just try to save
and raise if the callbacks all fail.
This is not ideal behaviour - but will do until we decide to change the
behaviour of save_with_validations to actually raise (rather than catch) the
ResourceInvalid exception.
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-08-19 09:05:02 -05:00
taryn
4dc05bc8a9
Swallow ResourceNotFound error on find_every
...
Active Record does not explode with RecordNotFound if you go looking for a
collection of objects - it just returns nil. Thus Active Resource should
also not explode.
After all - finding no objects that match a set of conditions is not
exceptional behaviour - unlike looking for a specific object with a given id
(which you'd expect to exist).
I've also added documentation to +find+ to reflect this.
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-08-19 09:04:48 -05:00
taryn
079ed8fc43
Pulled find-based tests into their own test case. This matches Active Record, and allows us to have one places where all find-tests are located, which will help when adding dynamic finders later.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-08-19 09:04:14 -05:00
taryn
36bf587347
Moved all test cases into a new test/cases directory to match Active Record test directory structure.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-08-19 09:03:57 -05:00
taryn
c2f90d6530
Added validations to ActiveResource. Added a smoke test to see if we can add a validation and use it, and add a validates callback and use it.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-08-19 09:03:17 -05:00
Emilio Tagua
c36cfa7568
Remove unused quoted_record_ids, now ARel does this using ARel::In.
2009-08-18 20:03:32 -03:00
Emilio Tagua
a09215ee96
has_many nullify associations keys using ARel.
2009-08-18 20:02:14 -03:00
Emilio Tagua
a7178773d2
Remove now unused quote_table_name, ARel does that quoting now.
2009-08-18 19:53:21 -03:00
Emilio Tagua
d5476b466f
habtm insertion with ARel integration.
2009-08-18 19:51:41 -03:00
Emilio Tagua
c1f833dff4
habtm delete method integrated with ARel.
2009-08-18 19:38:34 -03:00
Emilio Tagua
0abba2813b
Call to_sql method on ActiveRecord::Relation instance not it's relation
...
attribute.'
2009-08-18 19:38:03 -03:00
Emilio Tagua
74ed123e08
Override respond_to? in ActiveRecord::Relation to go with
...
method_missing.
2009-08-18 16:35:33 -03:00
Emilio Tagua
fefb4c78ac
Cache arel_table when possible, use class method arel_table instead
...
instance method.
2009-08-18 16:28:04 -03:00
Emilio Tagua
0d6997b6e3
Cache #arel_able when possible.
2009-08-18 14:49:11 -03:00
Emilio Tagua
60926db9e0
Inline initializer setup.
2009-08-18 14:22:38 -03:00
Emilio Tagua
66fbcc1de6
Use immutable relation objects to generate queries.
2009-08-18 14:10:03 -03:00
Mike Gunderloy
ef93524058
Remove sqlite2 build from CI recipe [ #3066 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-18 13:24:39 +01:00
Emilio Tagua
ac03bc91db
Use explicit method definition instead of metaprogramming.
2009-08-18 08:27:37 -03:00
Emilio Tagua
fa8f5c2667
Relation#joins! should know what to join instead of delegating to
...
construct_join.
2009-08-18 08:18:24 -03:00
Emilio Tagua
08f6af2d53
Fix typo in test classname.
2009-08-18 08:12:35 -03:00
Emilio Tagua
79e951ca9b
Use finder options as relation method names to provide more familiar
...
naming. Use bang methods convention in methods that alter the
relation.
2009-08-18 07:50:11 -03:00
Emilio Tagua
c923409630
Clean up relation joins when finding records with included associations.
2009-08-17 20:17:40 -03:00
Emilio Tagua
4b339f44bd
Merge commit 'rails/master'
2009-08-17 19:46:32 -03:00
Emilio Tagua
c01c8967a0
Merge commit 'rails/master'
...
Conflicts:
activerecord/lib/active_record/calculations.rb
2009-08-17 19:46:06 -03:00
Pratik Naik
25e5b0c4a8
Remove support for SQLite 2.
...
If you're still using it, please install the plugin from git://github.com/rails/sqlite2_adapter.git
2009-08-17 14:54:34 +01:00
Joshua Peek
ff1b0d3c86
k, thats really slow, lets not
2009-08-16 21:21:39 -05:00
Joshua Peek
24ad9ae3d2
Cleanup route reloading in tests. Prefer with_routing over using ActionController::Routing::Routes directly
2009-08-16 21:14:26 -05:00
Emilio Tagua
770fca10fb
Remove group when building the relation, it will be added later if
...
options[:group] is given.
2009-08-16 17:27:45 -03:00
Yehuda Katz
ccf28d2499
Fixes ActionMailer regression [ #3059 state:resolved]
2009-08-15 20:38:50 -07:00
Yehuda Katz
d6d550f0cb
Missing fixture template -- fixes AP tests
2009-08-15 20:33:34 -07:00
Jay Pignata
7213da37ce
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:14:32 -07:00
Jay Pignata
cb3e669b0d
Fix calculation tests on sqlite2 [ #3053 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-15 19:14:11 -07:00
Jeremy Kemper
76335c27b6
Bump pg gem requirement to 0.8.0. Build psql db with UTF8 encoding.
2009-08-15 19:04:25 -07:00
Jay Pignata
679128da58
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:51:03 -07:00
Joshua Peek
911acc10de
Axe "best fit" generation support
2009-08-15 18:08:46 -05:00
Jeremy Kemper
df6617bc8a
Normalize route generation order: associations, yield block, then own routes.
2009-08-15 15:56:52 -07:00
Yehuda Katz
1310231c15
Got tests to pass with some more changes.
...
* request.formats is much simpler now
* For XHRs or Accept headers with a single item, we use the Accept header
* For other requests, we use params[:format] or fallback to HTML
* This is primarily to work around the fact that browsers provide completely
broken Accept headers, so we have to whitelist the few cases we can
specifically isolate and treat other requests as coming from the browser
* For APIs, we can support single-item Accept headers, which disambiguates
from the browsers
* Requests to an action that only has an XML template from the browser will
no longer find the template. This worked previously because most browsers
provide a catch-all */*, but this was mostly accidental behavior. If you
want to serve XML, either use the :xml format in links, or explicitly
specify the XML template: render "template.xml".
2009-08-15 12:32:02 -07:00
Yehuda Katz
9b552fb300
Caches and cache clearing seems to actually work, but the actual architecture is kind of messy. Next: CLEAN UP.
2009-08-15 12:32:01 -07:00
Yehuda Katz
9f5cd0156a
More cleanup of ActionView and reduction in need for blocks in some cases:
...
* only one of partial_name or :as will be available as a local
* `object` is removed
* Simplify _layout_for in most cases.
* Remove <% render :partial do |args| %>
* <% render :partial do %> still works fine
2009-08-15 12:32:01 -07:00
Yehuda Katz
27adcd1c1a
Clean up ActionView some:
...
* Call _evaluate_assigns_and_ivars at the two entry points so we don't have to
do a check at every render.
* Make template.render viable without having to go through a wrapper method
* Remove old TemplateHandler#render(template, local_assigns) path so we don't have
to set self.template every time we render a template.
* Move Template rescuing code to Template#render so it gets caught every time.
* Pull in some tests from Pratik that test render @object in ActionView
2009-08-15 12:32:01 -07:00
Jatinder Singh
a363dba790
Fix ActiveResource load test for 64bit machines [ #3051 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-15 20:29:37 +01:00
Jeremy Kemper
26e4d688ac
Skip isolation test tests when using MiniTest
2009-08-15 12:28:09 -07:00
Joshua Peek
940a391c9b
Attempt to rewrite most of the highly coupled router segments tests
2009-08-14 16:16:29 -05:00
Joshua Peek
f86a4b84dd
Kill routing timed tests
2009-08-14 14:30:19 -05:00
Emilio Tagua
796ec652ad
Don't use regular rinder on calculations since scoping order blows
...
PostreSQL.
2009-08-14 15:59:55 -03:00
Emilio Tagua
48c1e6d584
Merge commit 'rails/master'
2009-08-14 12:34:38 -03:00
Emilio Tagua
9ac01fad19
Use ARel's joins when building a query for finding records with included
...
associations.
2009-08-14 12:33:05 -03:00
Joshua Peek
c6bc8e6626
Break up concerns for choosing what attributes should be serialized and the actual serializer
2009-08-13 22:27:36 -05:00
Joshua Peek
7a26c21d8e
Use safe tmp dir
2009-08-13 21:03:25 -05:00
José Valim
8692b11e81
Merge branch 'master' of git://github.com/rails/rails
2009-08-13 10:27:53 +02:00
José Valim
4f9047ecc8
Ensure collections are not treated as nested resources.
2009-08-13 10:27:41 +02:00
Chad Woolley
f413a703ba
make mysql and postgresql rebuild databases on every CI build, to prevent breakages such as collation and character set changing
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-08-12 00:11:16 -07:00
Yehuda Katz
ba67e256b8
Remove submodule
2009-08-11 23:44:44 -07:00
Yehuda Katz
27e880729e
Made benchmarks submodule so it's easier to keep in sync
2009-08-11 16:49:27 -07:00
Yehuda Katz
ccd1c5e521
Allow superclass_delegating_accessor to take a block for initial set.
2009-08-11 15:03:53 -07:00
Yehuda Katz
4bf516e072
More perf work:
...
* Move #set_cookie and #delete_cookie inline to optimize. These optimizations should
almost certainly be sent back upstream to Rack. The optimization involves using
an ivar for cookies instead of indexing into the headers each time.
* Was able to use a bare Hash for headers now that cookies have their own joining
semantics (some code assumed that the raw cookies were an Array).
* Cache blankness of body on body=
* Improve expand_cache_key for Arrays of a single element (common in our case)
* Use a simple layout condition check unless conditions are used
* Cache visible actions
* Lazily load the UrlRewriter
* Make etag an ivar that is set on prepare!
2009-08-11 15:03:53 -07:00
Yehuda Katz
0adbeeb0c9
Got overhead down from 127 to 85. All tests pass:
...
* Tentatively replaced HeaderHash with SimpleHeaderHash, which does not preserve
case but does handle converting Arrays to Strings in to_hash. This requires
further discussion.
* Moved default_charset to ActionDispatch::Response to avoid having to hop over
to ActionController. Ideally, this would be a constant on AD::Response, but
some tests expect to be able to change it dynamically and I didn't want to change
them yet.
* Completely override #initialize from Rack::Response. Previously, it was creating
a HeaderHash, and then we were creating an entirely new one. There is no way to
call super without incurring the overhead of creating a HeaderHash.
* Override #write from Rack::Response. Its implementation tracks Content-Length,
and doing so adds additional overhead that could be mooted if other middleware
changes the body. It is more efficiently done at the top-level server.
* Change sending_file to an instance_variable instead of header inspection. In
general, if a state is important, it should be set as a property of the response
not reconstructed later.
* Set the Etag to @body instead of .body. AS::Cache.expand_cache_key handles
Arrays fine, and it's more efficient to let it handle the body parts, since
it is not forced to create a joined String.
* If we detect the default cache control case, just set it, rather than setting
the constituent parts and then running the normal (expensive) code to generate
the string.
2009-08-11 15:03:53 -07:00
Yehuda Katz
9e62d6d1c0
Tentatively accept the ":as or :object, but not both" solution
2009-08-11 15:03:53 -07:00
Yehuda Katz
945a7df9f8
Make large_collection 1,000 partials
2009-08-11 15:03:53 -07:00
Yehuda Katz
4945d82239
Further experimentation. Was able to cut the cost of rendering 100 partials in a collection in half.
...
To discuss: What are the desired semantics (if any) for layouts in a collection. There are no
tests for it at present, and I'm not sure if it's needed at all.
Deprecated on this branch: `object` pointing at the current object in partials. You can still
use the partial name, or use :as to achieve the same thing. This is obviously up for discussion.
2009-08-11 15:03:53 -07:00
Yehuda Katz
bef7576c09
Add a few more benches
2009-08-11 15:03:53 -07:00
Yehuda Katz
02d9dd9000
Add some more caching to the lookup
2009-08-11 15:03:52 -07:00
Yehuda Katz
04d4537cd4
This change causes some failing tests, but it should be possible to make them pass with minimal performance impact.
2009-08-11 15:03:52 -07:00
Emilio Tagua
b68ef73344
Merge commit 'rails/master'
2009-08-11 12:41:49 -03:00
Pratik Naik
0a558b36eb
Add tests for hm:t#push failures
2009-08-11 02:37:04 +01:00
Emilio Tagua
8c3a6f871e
Merge commit 'rails/master'
2009-08-10 20:51:05 -03:00
Bryan Helmkamp
d15ddf04ec
Allow delegating to nil, because the method might actually exist on it
2009-08-10 18:48:38 -05:00
Emilio Tagua
10af9fae4a
Merge commit 'rails/master'
2009-08-10 18:19:24 -03:00
Emilio Tagua
0e2fbd80e2
Merge commit 'rails/master'
...
Conflicts:
activerecord/lib/active_record/calculations.rb
activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
2009-08-10 18:07:33 -03:00
Pratik Naik
d0f891ae02
Rewrite hm:t#create tests using assert_no_difference and assert_difference
2009-08-10 21:30:44 +01:00
Pratik Naik
ad28e0037b
Remove unnecessary scoping for creating hm:t join record
2009-08-10 21:20:01 +01:00
Pratik Naik
50b83984f1
Remove unnecessary scoping and validation checks from hm:t#create
2009-08-10 21:06:49 +01:00
Pratik Naik
d9c4087a9e
Unify hm:t#create and create! implementation
2009-08-10 21:02:06 +01:00
Joshua Peek
f97dae5ebe
Extract common dirty tracking methods in AMo
2009-08-10 13:51:48 -05:00
Joshua Peek
391f978acd
AMo overrides alias_attribute and manages aliasing all known attribute method matchers
2009-08-10 11:58:44 -05:00
Joshua Peek
d574cb31f0
Centralize attr method name concatenation in AttributeMethodMatch
2009-08-10 11:53:10 -05:00
José Valim
5f7cfffc53
Use less strict rules in generators lookup, so people can lay their generators wherever they want.
2009-08-10 18:29:20 +02:00
Arthur Zapparoli
55b5cf586a
Fixed typo in test name and CHANGELOG [ #3017 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-10 16:13:18 +01:00
Pratik Naik
e202c6c814
Move :with/:without check outside the method generated by validates_format_of
2009-08-10 15:24:48 +01:00
Elliot Winkler
cccb0e6b93
Add validates_format_of :without => /regexp/ option [Elliot Winkler, Peer Allan]
...
[#430 state:resolved]
Example :
validates_format_of :subdomain, :without => /www|admin|mail/
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-10 15:22:31 +01:00
Emilio Tagua
eb3ae44cca
Merge commit 'rails/master'
...
Conflicts:
activerecord/lib/active_record/migration.rb
2009-08-10 10:40:11 -03:00
Kamal Fariz Mahyuddin
600a89f208
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:37 -07:00
codeape
8c32248acb
Introduce grouped_collection_select helper.
...
[#1249 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 23:58:43 -07:00
Erik Ostrom
7d16e94d82
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:30:41 -07:00
Cristi Balan
3e35ba2481
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:59:04 -07:00
Tim Peters
7eaed4fefe
Use table prefix and suffix for schema_migrations index.
...
[#1543 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 22:56:37 -07:00
Jeff Dean
22f3398253
Introduce validates_with to encapsulate attribute validations in a class.
...
[#2630 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 22:47:56 -07:00
Fabien Jakimowicz
797588543e
Add support for errors in JSON format.
...
[#1956 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 22:40:20 -07:00
Jay Pignata
793a9f122f
Fixing isolation test
...
[#3022 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 22:33:23 -07:00
Daniel Sheppard
b3381cacaf
Fix that JSON parser fails to read escaped backslashes.
...
[#973 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 22:30:44 -07:00
Leonardo Borges
0c391b46fb
PostgreSQL: XML datatype support
...
[#1874 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 22:24:54 -07:00
Jaime Bellmyer
9c1bac0b7f
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:19:18 -07:00
Jaime Bellmyer
f0602214e0
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:17:39 -07:00
Morgan Schweers
d2d464e26e
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:57:56 -07:00
Jeremy Kemper
47f7c936a2
Fix test dependency on taggings
2009-08-09 21:30:55 -07:00
Gabe da Silveira
7e3364ac46
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:18:16 -07:00
Jatinder Singh
5704ecffad
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:26 -07:00
Joshua Peek
734e903af5
Deprecate router generation "best match" sorting
2009-08-09 22:53:16 -05:00
Prem Sichanugrist
82dd725fc1
Fix that irregular plural inflections should not be double-pluralized: 'people'.pluralize should return 'people' not 'peoples'.
...
[#1183 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 20:28:57 -07:00
Joshua Nichols
84d24cdae8
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:18:56 -07:00
Jeremy Kemper
279b785839
pare down core_ext dependency
2009-08-09 19:32:38 -07:00
Erik Ostrom
4dda9b644d
Add rindex to ActiveSupport::Multibyte::Chars.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 19:05:19 -07:00
railsbob
e06a0b03c8
has_many :through create should not raise validation errors
...
[#2934 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 18:44:45 -07:00
jeem
e4ceea3795
make private_and_public_methods unmemoizable [ #2372 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-08-09 20:04:48 -05:00
Andrew Moreland
ca92d44e76
Support deep-merging HashWithIndifferentAccess.
...
[#2732 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 17:32:04 -07:00
Max Lapshin
0af4b0755f
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 00:58:40 +01:00
Tristan Dunn
a0f69722be
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:46:16 +01:00
Tristan Dunn
0472839d68
Prevent overwriting of table name in merging SQL conditions [ #2949 state:resolved]
2009-08-10 00:41:36 +01:00
Gabe da Silveira
00d6c76660
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:30:44 +01:00
Arthur Zapparoli
810b59a2a9
Removed duplicated tests [ #3026 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-10 00:08:40 +01:00
Arthur Zapparoli
ce2422ceaf
Model#human_attribute_name now accept symbols [ #3025 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-09 23:55:54 +01:00
Matt Duncan
920ef4e6f3
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:54:21 +01:00
Grzegorz Forysinski
e391c7a97c
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:39:38 +01:00
Vladimir Meremyanin
08ec22054f
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:23 +01:00
Jordan Brough
916b18adeb
Active Resource recognizes 410 as Resource Gone now [ #2316 state:resolved] [Jordan Brough, Jatinder Singh]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 22:56:32 +01:00
Tristan Dunn
1af9bd58a0
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:35:57 -07:00
Hugo Peixoto
202b091373
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:26:36 -07:00
Bence Nagy
e1b73b9752
path_names could be used to customize collection actions too
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 14:26:36 -07:00
Jatinder Singh
1fc1986d6d
Make ActiveResource#exists? work [ #3020 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 22:24:57 +01:00
Joshua Nichols
0ec64bea92
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:46:52 +01:00
José Valim
ae47f7575d
Improving test coverage for Range#sum [ #2489 ]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 21:46:52 +01:00
David Burger
1382f4de1f
Fix that Hash#to_xml and Array#to_xml shouldn't modify their options hashes [ #672 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 21:46:52 +01:00
Hugo Peixoto
870750ed4b
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:47 -07:00
Roy Nicholson
3e0951632c
Add ability to set SSL options on ARes connections.
...
[#2370 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 13:24:05 -07:00
Elise Huard
c5896bfd84
validate uniqueness with limit in utf8
...
[#2653 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 12:50:04 -07:00
Jeremy Kemper
87e2c1895f
Fix failing dependencies test relying on . being in LOAD_PATH
2009-08-09 12:40:16 -07:00
Jeremy Kemper
d0bcf51191
Extract repetitive method
2009-08-09 12:14:25 -07:00
Jeremy Kemper
635f68dca9
Uses &:foo
2009-08-09 12:11:50 -07:00
Jeremy Kemper
db42f1bf67
Fix standalone test missing developer fixture
2009-08-09 11:58:07 -07:00
Hugo Peixoto
ff60ec469f
Added a uniqueness validation test that uses diacritics.
...
[#2883 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 11:51:58 -07:00
Jeremy Kemper
c2f9c42719
Fix that RedCloth shouldn't be required to run tests
2009-08-09 11:02:34 -07:00
Pratik Naik
bb1e177691
.gitignore activesupport/test/fixtures/isolation_test
2009-08-09 18:18:47 +01:00
Pratik Naik
60bed59fbf
Remove unnecessary &block from Range#sum and add tests for (num..float).sum
2009-08-09 18:15:20 +01:00
Pratik Naik
97a5c7a516
Make enumerable test run stand alone
2009-08-09 18:13:03 +01:00
José Valim
e0adfa82c0
Optimize Range#sum only for integers [ #2489 ]
2009-08-09 18:05:58 +01:00
Gabe da Silveira
1185500ff0
Remove unused routeset method routes_for_controller_and_action in favour for routes_for [ #3023 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 18:02:35 +01:00
jastix
a1c289dbe4
Require test/unit in the generated test_helper for plugin [ #1878 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 17:56:41 +01:00
Matt Conway
1c9b3aabdd
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:13:22 +01:00
railsbob
076ca48bd6
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:02:19 +01:00
Felipe Talavera
654568e71b
Allow to configure trusted proxies via ActionController::Base.trusted_proxies [ #2126 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 16:56:18 +01:00
rizwanreza
7dbb2b6f83
Support passing Redcloth options via textilize helper [ #2973 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 16:41:09 +01:00
Mike Breen
7d254b5d74
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:34:53 +01:00
Pratik Naik
96b575d6dc
Get rid of parenthesize argument warnings
2009-08-09 16:00:53 +01:00
José Valim
1ea7a00bc4
Refactored create_migration on model generator.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 15:57:59 +01:00
Hugo Peixoto
3545d6b0b2
Setting usec (and nsec for Ruby 1.9) on Time#end_of_* methods [ #1255 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-09 15:56:37 +01:00
José Valim
1bd4d1c674
Optimize Range#sum to use arithmetic progression when a block is not given [ #2489 ].
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 15:56:10 +01:00
Michael Siebert
d811864e88
Fix deprecating =-methods by using send [ #2431 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-09 15:54:56 +01:00
José Valim
32bde66aa6
Make http digest work with different server/browser combinations
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 15:53:52 +01:00
Dmitry Ratnikov
314ba0433f
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:52:06 -07:00
Dmitry Ratnikov
f16008afdd
Modified Rich Bradley's test-case to fail as part of suite and with a reasonable message
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 02:40:27 -07:00
Hugo Peixoto
22b38c18c6
Fixed generating a namespaced model with table pluralization turned off. Add tests for namespaced model generation.
...
[#767 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 02:38:35 -07:00
Jeremy Kemper
a0caad5255
Setting connection timeout also affects Net::HTTP open_timeout.
...
[#2947 state:resolved]
2009-08-09 02:28:00 -07:00
Yehuda Katz
60219a13da
Add a .tmp path
2009-08-09 05:52:49 -03:00
Rich Bradley
9bb8ef9ede
Fix for nested :include with namespaced models.
...
[#260 state:committed]
2009-08-09 00:31:46 -07:00
Yehuda Katz
0d53994701
Make bench harness produce output that is easier to compare
2009-08-09 04:12:09 -03:00
Yehuda Katz
e8849203dc
Updates to benchmark harness.
2009-08-09 04:12:09 -03:00
Yehuda Katz
b05c951907
Temporary fix to get our LoadError monkey-patch working with newer JRuby. We should probably remove MissingSourceFile and just monkey-patch LoadError instead of overriding LoadError.new.
2009-08-09 04:12:09 -03:00
Yehuda Katz
e58b2769cf
Experimental: Improve performance of ActionView by preventing method cache flushing due to runtime Kernel#extend:
...
* The helper module adds a new _helper_serial property onto AbstractController subclasses
* When #helper is used to add helpers to a class, the serial number is updated
* An ActionView subclass is created and cached based on this serial number.
* That subclass includes the helper module from the controller
* Subsequent requests using the same controller with the same serial will result in
reusing that subclass, rather than being forced to take an action (like include
or extend) that will result in a global method cache flush on MRI and a flush
of the entire AV class' cache on JRuby.
* For now, this optimization is not applied to the RJS helpers, which results in
a global method cache flush in MRI and a flush of the JavaScriptGenerator class in
JRuby only when using RJS.
* Since the effects are limited to using RJS, and would only affect JavaScriptGenerator
in JRuby (as opposed to the entire view object), it seems worthwhile to apply this
now.
* This resulted in a significant performance improvement. I will have benchmarks
in the next day or two that show the performance impact of the last several
commits.
* There is a small chance this could break existing code (although I'm not sure how).
If that happens, please report it immediately.
2009-08-09 04:12:09 -03:00
Yehuda Katz
10eaba8f41
Cache controller_path on the AV instance to avoid needing to make additional calls back into the controller for each attempt (this was done because these calls were adding up significantly in partial rendering and showing up on profiles)
2009-08-09 04:12:09 -03:00
Yehuda Katz
e28e061165
Use response_body rather than performed?
2009-08-09 04:12:09 -03:00
Yehuda Katz
964bc4e855
Rendering a template from ActionView will default to looking for partials only in the current mime type.
...
* The old behavior was tested only as a side-effect of a different test--the original tests remain;
a new template in the XML mime was added.
* If you are relying on the current behavior and object to this change, please participate in
http://groups.google.com/group/rubyonrails-core/browse_thread/thread/6ef25f3c108389bd
2009-08-09 04:12:08 -03:00
Yehuda Katz
33f01fb1f6
Cache some more things to improve partial perf
2009-08-09 04:12:08 -03:00
Yehuda Katz
0ab40b039b
Went from 25% slower partials (vs. 2.3) to 10% faster. More to come.
2009-08-09 04:12:08 -03:00
Yehuda Katz
930d235981
Support a warmup for JRuby
2009-08-09 04:12:08 -03:00
Yehuda Katz
b57d94c187
Update minimal.rb to benchmark partials
2009-08-09 04:12:08 -03:00
Yehuda Katz
d7415f792c
Clean up partial object some more; replace passing around a block to a single block ivar
2009-08-09 04:12:08 -03:00
Yehuda Katz
bf412c9ec6
Clean up initializer and some of the internals of PartialRenderer
2009-08-09 04:12:08 -03:00
Jeremy Kemper
b5b1576aa9
Ruby 1.9 compat: can't implicitly set instance var using block arg
2009-08-08 23:04:25 -07:00
Tristan Dunn
791cccaeda
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:31:35 -07:00
Rob
4b7f95eb8b
Fix binary fixture test on Windows
...
[#2597 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-08 19:18:38 -07:00
Hugo Peixoto
d8041538dd
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:02:29 -07:00
Michael Koziarski
b97d293374
Merge branch 'patches'
2009-08-09 13:10:14 +12:00
Michael Koziarski
370bf1401a
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:10:08 +12:00
Jon Wood
271baf235d
Add :redirect to the testable RJS statements [ #2612 state:resolved]
...
Example :
assert_select_rjs :redirect, root_path
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 02:00:15 +01:00
Pratik Naik
89c8affe47
Use Pathname for checking if sqlite path is absolute
2009-08-09 01:54:08 +01:00
bastilian
071f48b716
Make sure db:drop doesn't fail when sqlite db is given by an absolute path [ #1789 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 01:54:08 +01:00
Marc-Andre Lafortune
29096268cc
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:09 -07:00
Matt Duncan
3b3798506b
Adding :from scoping to ActiveRecord calculations
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1229 state:committed]
2009-08-09 12:43:07 +12:00
Matt Duncan
45f5bdfbc7
Adding :from scoping to ActiveRecord calculations
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1229 state:committed]
2009-08-09 12:33:33 +12:00
Jan Schwenzien
1f6afe4a74
Fix HTTP basic authentication for long credentials [ #2572 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 01:28:43 +01:00
Steve St. Martin
618771beb5
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:16:26 -07:00
Michael Koziarski
df745ed805
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:11:34 +12:00
Adam Keys
5632b36701
Fix exclusive range patch to use begin/end instead of min/max. [ #2981 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 23:42:18 +01:00
Matt Duncan
bee3e099bd
Users can now pass :branch for git plugins and :revision for subversion plugins
...
[#2352 status:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-08 23:42:18 +01:00
José Valim
3ea091e1cc
Improved coverage for session_migration generator. [ #3008 status:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 23:42:18 +01:00
Elad Meidar
c0f828ca4f
Fixed reference to AR::SessionStore::Session.table_name in session migrations
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-08 23:42:18 +01:00
Marshall Huss
4d1552810f
HTTP proxy support
...
[#2133 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-08 15:33:55 -07:00
Emilio Tagua
9520143159
Merge commit 'rails/master'
...
Conflicts:
activerecord/test/cases/adapter_test.rb
activerecord/test/cases/method_scoping_test.rb
2009-08-08 19:14:35 -03:00
rizwanreza
5786395760
Allow content_tag options to take an array [ #1741 state:resolved] [rizwanreza, Nick Quaranto]
...
Example:
content_tag('p', "limelight", :class => ["song", "play"])
# => <p class="song play">limelight</p>
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 22:21:32 +01:00
Pratik Naik
761283ffdb
Ensure hm:t#create/create! throws ActiveRecord::RecordNotSaved when the owner is new
2009-08-08 21:51:33 +01:00
Dan Croak
00544c778f
Add test ensuring redirect_to uses the given protocol [ #2886 ]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 20:48:39 +01:00
Pratik Naik
6464d76feb
DRY migration's rollback/forward methods
2009-08-08 20:47:14 +01:00
Pratik Naik
c6fe49b009
Simplyfy validates_length_of and remove puts
2009-08-08 19:08:39 +01:00
jzw
5ab94b2595
validates_length_of with maximum should allow nil [ #2309 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-08 19:08:13 +01:00
José Valim
c34d6279a0
Allow radio buttons to work with booleans.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 18:02:07 +01:00
rizwanreza
1191e3ffaf
Add :include_blank option for select_tag [ #1987 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 17:58:27 +01:00
Pratik Naik
ed8a0a1c23
Ensure db:drop:all doesn't error out on exception [ #2997 state:resolved] [Anthony Caliendo]
2009-08-08 17:53:51 +01:00
Cristi Balan
7f84f14efa
Add rake db:forward - opposite of db:rollback [ #768 state:resolved]
...
Example:
rake db:forward # performs the next migration
rake db:forward STEP=4 # performs the next 4 migrations
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 17:41:43 +01:00
Niklas Holmgren
c284412b14
Polymorphic routes generates collection URL from model class [ #1089 state:resolved]
...
Signed-off-by: Dan Pickett <dpickett@enlightsolutions.com >
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 17:00:29 +01:00
Yehuda Katz
ad98827a78
Merge commit 'jose/responder'
2009-08-08 12:54:02 -03:00
José Valim
016ed9b429
Added rubygems to generators load_paths, but we only load generators from gems that are alraedy activated. This fixes the version problem and avoid silly conflicts.
2009-08-08 17:48:07 +02:00
José Valim
469d89dd44
Rename Rails::Generators::ActionORM to Rails::Generators::ActiveModel.
2009-08-08 17:48:07 +02:00
José Valim
6e0ac748e4
Renamed ActionController::Renderer to ActionController::Responder and ActionController::MimeResponds::Responder to ActionController::MimeResponds::Collector.
2009-08-08 17:48:07 +02:00
Yehuda Katz
efcfce50c4
Fixes "Cached fragment hit" written to log even if fragment is not cached (Erik Andrejko) [ #2917 state:resolved]
2009-08-08 12:46:44 -03:00
Bas Van Klinkenberg
0fbeaa98e4
Fixed a bug in JSON decoding with Yaml backend, where a combination of dates, escaped or unicode encoded data and arrays would make the parser fail with a ParseError exception. [ #2831 state:resolved]
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-08-08 12:44:41 -03:00
Yehuda Katz
d0301e13f4
First pass at making partial rendering an Object. More cleanup to come.
2009-08-08 12:44:26 -03:00
Steve St. Martin
a8645593a4
remove duplicate call to stringify_keys [ #2587 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-08 13:56:41 +02:00
Wolfram Arnold
73f2d37505
Add test to verify that the new :inverse_of association option will indeed fix the validation problem for a belongs_to relationship that validates_presence_of the parent, when both the parent and the child are new (in-memory) records. Also check that this works when the parents adds child via nested_attributes_for.
...
Lastly, add a require 'models/pet' to association_validation_test.rb, so that test can be run independently (was failing due to that missing dependency). [#2815 status:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-08 13:07:49 +02:00
Eric Davis
fbe6c3c195
Adds a :file delivery_method to save email to a file on disk
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2438 state:committed]
2009-08-08 16:32:17 +12:00
Josh Sharpe
54e7f5ba43
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:53:35 +12:00
Mike Breen
e8dc151396
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:38:33 +12:00
Matt Duncan
5fdc33c1a3
Default sent_on time to now in ActionMailer
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2607 state:committed]
2009-08-08 14:11:32 +12:00
wmoxam
98450fd168
Fix number_to_precision rounding error [ #2071 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 02:05:10 +01:00
Jeremy Kemper
43b406bdb0
Ruby 1.9 compat: fix route recognition encoding test
2009-08-07 17:16:34 -07:00
Jeremy Kemper
12c271d1d2
Ruby 1.9.2: implicit argument passing of super from method defined by define_method() is not supported
2009-08-07 17:04:56 -07:00
Jeremy Kemper
019ed5a7c0
Don't rely on T::U::TestCase#name
2009-08-07 17:04:19 -07:00
Jeremy Kemper
482a6f716f
Ruby 1.9.2: Object#id is gone now
2009-08-07 16:41:04 -07:00
Emilio Tagua
ae9e1e9f6d
Removed unused methods.
2009-08-07 17:55:36 -03:00
Emilio Tagua
d469ad8a49
Removed useless OR.
2009-08-07 16:41:58 -03:00
Brendan Schwartz
201387496e
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:24:02 -07:00
Jeremy Kemper
06afa48c8c
Merge branch 'oracle_enhanced'
2009-08-07 11:58:45 -07:00
Yehuda Katz
010a0c92eb
Rename find_by_parts and find_by_parts? to find and exists?
2009-08-07 15:00:12 -03:00
Emilio Tagua
6b5fab9300
Don't scope order in calculations.'
2009-08-07 14:33:35 -03:00
Emilio Tagua
04abe538ac
Merge commit 'rails/master'
2009-08-07 13:27:36 -03:00
Emilio Tagua
945ef58533
More work on removing plain SQL from associations and use ARel instead.
2009-08-07 13:16:34 -03:00
José Valim
55575e2165
Allow rails templates relative to the current path to be given.
2009-08-07 17:17:51 +02:00
José Valim
aed135d3e2
Renamed presenter to renderer, added some documentation and defined its API.
2009-08-07 17:17:51 +02:00
José Valim
1fd65c80fc
Encapsulate respond_with behavior in a presenter.
2009-08-07 17:16:16 +02:00
José Valim
7034272354
Add destroyed? to ActiveRecord, include tests for polymorphic urls for destroyed objects and refactor mime responds tests and documentation.
2009-08-07 17:16:16 +02:00
José Valim
f59984cc81
Add nagivational behavior to respond_with.
2009-08-07 17:16:15 +02:00
José Valim
c44f7e39f4
Updated vendored thor to 0.11.5
2009-08-07 17:16:15 +02:00
José Valim
e45e120af9
Merge branch 'master' of git://github.com/rails/rails into old
2009-08-07 17:13:44 +02:00
Yehuda Katz
bfe58ac05d
Get all ActionController partial rendering to use ActionView's partial code. Consequences:
...
* It is not possible to always pre-determine the layout before going to ActionView.
This was *already* broken for render :partial => @object, :layout => true. This is
now handled by overriding render_to_body in layouts.rb and manually injecting the
partial's response. This needs to be done in ActionController since ActionController
knows enough to get _layout_for_option. There is probably a better abstraction here.
* As a result, all partial rendering can correctly restrict their layouts to the mime
type of the rendered partial. This could have previously caused a bug in some edge cases.
* If other layout-like options are added, they might need to add special code for the
case of render :partial. We should try to think of an alternate solution, if possible,
but this works for the cases we know of now.
2009-08-07 11:33:54 -03:00
José Valim
dac8927b05
Merge branch 'master' of git://github.com/rails/rails into old
2009-08-07 16:10:17 +02:00
Yehuda Katz
606e950ccb
Whitespace
2009-08-07 06:32:54 -03:00
Yehuda Katz
d94ba11295
Continue reworking the partial path.
...
* TODO: Review ActionController calling render_template for certain partials.
Might we be able to save logic by always delegating to AV's render_partial?
2009-08-07 06:32:17 -03:00
Yehuda Katz
493d84ce2f
Modify various partial methods to carry along the block that can be passed in with render
...
* _render_single_template, which renders a template without layout
* _render_partial_unknown_type, which renders a partial of unknown type
(the entry method for most partial rendering; supports strings, objects, and collections)
* _render_partial_object, which renders a partial for a single object.
* extracted _render_partial_path so it can be used to render the spacer without going
through the public render :partial
2009-08-07 05:40:01 -03:00
Yehuda Katz
59e475e3a6
Some more AV work:
...
* rename _render_partial to _render_partial_unknown_type to reflect that for this call,
we don't know the type.
* Merge _render_partial_with_block and _render_partial_with_layout to _render_partial
* TODO: Check to see if any more logic can be shared
* TODO: See about streamlining block path so we can get rid of @_proc_for_layout
* Remove @exempt_from_layout as it is no longer needed
2009-08-07 03:48:28 -03:00
Yehuda Katz
0612fd0f09
Replace _render_template_with_layout with _render_template since the layout is optional
2009-08-07 03:18:45 -03:00
Yehuda Katz
b3e199f698
Some more AV refactoring:
...
* remove no longer used _array_like_objects
* _render_content_with_layout renamed to _render_content since layout it optional
* remove check for optional layout before _render_content
2009-08-07 02:46:21 -03:00
Yehuda Katz
8534c5bf19
Start cleaning up partial path
2009-08-07 01:51:50 -03:00
Yehuda Katz
9b506484f1
This is handled by the resolver now
2009-08-07 01:51:32 -03:00
Yehuda Katz
70a440aa27
Clean up render @object a bit more.
2009-08-07 00:52:13 -03:00
Yehuda Katz
4ac9d391d3
Improve a path in _render_partial
2009-08-06 23:42:11 -03:00
Yehuda Katz
0435178ff8
Remove file that doesn't seem to be used anymore
2009-08-06 22:57:42 -03:00
Yehuda Katz
71638e6760
Move AbstractController to a top-level component
2009-08-06 22:51:24 -03:00
Yehuda Katz
16c01224cb
ActionController::Metal#to_rack converted to #to_a to match normal rack convention
2009-08-06 20:05:14 -03:00
Yehuda Katz
70d779aaea
Update _render_options to reflect the fact that they're public
2009-08-06 20:03:59 -03:00
Yehuda Katz
bd6b61be88
Rename /base to /metal and make base.rb and metal.rb top-level to reflect their module locations
2009-08-06 19:52:11 -03:00
Yehuda Katz
52798fd479
rename ActionController::Http to ActionController::Metal at Josh's suggestion
2009-08-06 19:50:22 -03:00
Yehuda Katz
af375a5eb3
Replace _action_view with view_context to reflect that it is public and that it does not need to be an ActionView instance
2009-08-06 19:45:40 -03:00
Yehuda Katz
f0945409d9
replace _render_*_from_controller with render_* as they are intended to be public
2009-08-06 19:43:28 -03:00
Emilio Tagua
4e86602e11
Merge commit 'rails/master'
2009-08-06 18:57:47 -03:00
Raimonds Simanovskis
5f0c425e8d
Some databases (e.g. Oracle) does not allow "AS" between table name and table alias name, for others it is optional
2009-08-06 23:41:00 +03:00
Raimonds Simanovskis
53be10c5e6
fixed test_foreign_key_violations_are_translated_to_specific_exception to work with Oracle
2009-08-06 23:41:00 +03:00
Raimonds Simanovskis
44a7ef85eb
modifications to Oracle connection.rb setup
2009-08-06 23:41:00 +03:00
Raimonds Simanovskis
9b2309c4a8
fix schema_dumper_test for Oracle as it supports precision up to 38
2009-08-06 23:41:00 +03:00
Raimonds Simanovskis
94e761551b
changed default connection to localhost orcl database
2009-08-06 23:41:00 +03:00
Raimonds Simanovskis
8afab34a76
always sort lists by id before comparison to avoid errors because of different sorting of same results (on Oracle database)
2009-08-06 23:41:00 +03:00
Raimonds Simanovskis
8f34c96614
support for assert_queries when using Oracle adapter
...
initialize $KCODE to UTF8 when JRuby is used
2009-08-06 23:41:00 +03:00
Raimonds Simanovskis
090ec47bec
added Subject#after_initialize to be the same as Topic#after_initialize
2009-08-06 23:41:00 +03:00
Raimonds Simanovskis
01a4e07c36
Oracle can store integers with any :limit
2009-08-06 23:41:00 +03:00
Raimonds Simanovskis
04e6bc1134
Oracle adapter recourns count() as numeric (not string)
2009-08-06 23:40:59 +03:00
Raimonds Simanovskis
5d0dece6a6
Oracle adapter gets Time or DateTime value already with timezone
2009-08-06 23:40:59 +03:00
Raimonds Simanovskis
ee654e54c4
Oracle generates different ORDER BY fragment
2009-08-06 23:40:59 +03:00
Raimonds Simanovskis
3a1cbc5c3b
Oracle adapter returns Time value for DATE columns
2009-08-06 23:40:59 +03:00
Raimonds Simanovskis
42fd2a3b16
added :order to find :all as otherwise Oracle tests were failing
2009-08-06 23:40:59 +03:00
Raimonds Simanovskis
c3e1ef0b40
Oracle needs sequence value for primary key in INSERT statement
2009-08-06 23:40:59 +03:00
Raimonds Simanovskis
a12358b3a5
Oracle adapter returns numeric (not string) value after SUM
2009-08-06 23:40:59 +03:00
Raimonds Simanovskis
d40e3ea936
Oracle saves empty string as NULL
2009-08-06 23:40:59 +03:00
Raimonds Simanovskis
71c32d3cac
1=2 is invalid expression in Oracle SELECT
2009-08-06 23:40:59 +03:00
Raimonds Simanovskis
5666a3ad06
added :order option to find :first methods and associations as otherwise Oracle tests were failing
...
Oracle stores '' string as NULL
Oracle cannot have identifiers larger than 30 characters
added missing fixtures to test setup method
2009-08-06 23:40:59 +03:00
Raimonds Simanovskis
963570b51c
added additional objects necessary for OracleAdapter specific tests
...
if OracleAdapter is used then use VARCHAR2(4000) instead of CLOB datatype as CLOB data type has many limitations in
Oracle SELECT WHERE clause which causes many unit test failures
2009-08-06 23:40:59 +03:00
Raimonds Simanovskis
04fea8a07b
modified native_oracle/connection.rb to run it with oracle_enhanced adapter
2009-08-06 23:40:58 +03:00
Rob Christie
7e560d0b0d
Fixed adapter test cases that were failing in oracle because the asserts were looking for the presence of offset and limit which are not available in oracle. Changed the tests to check that the sql injection is not present in the output so that the tests are database adapter agnostic.
2009-08-06 23:40:58 +03:00
Jeremy Kemper
7f717abb0e
Merge branch 'master' of git@github.com:rails/rails
2009-08-05 17:09:56 -07:00
Akira Matsuda
230d43fbf5
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:08:02 -07:00
Pratik Naik
5ce3831faf
Use send instead of instance_eval
2009-08-06 00:11:28 +01:00
James Tucker
b7052b8dc3
Dont require thin as the thin rack adapter is now upstream
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-05 23:00:33 +01:00
Emilio Tagua
ae175a5354
Merge commit 'rails/master'
2009-08-05 14:52:07 -03:00
James Hill
cfd421daa2
Allow validations to use values from custom readers [ #2936 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-08-05 11:45:01 -05:00
Matthew Rudy Jacobs
64268a0b06
Make sure javascript_include_tag/stylesheet_link_tag does not append ".js" or ".css" onto external urls [ #1664 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-05 15:58:55 +01:00
Geoff Buesing
bfafe8c405
Revert "fallback_string_to_date sets Date._parse comp arg to true, so that strings with two-digit years, e.g. '1/1/09', are interpreted as modern years" [ #2019 state:wontfix]
...
This reverts commit 55d1d12c32 .
2009-08-05 08:26:12 -05:00
Joshua Peek
f8d3c72c39
Extract generic attribute method generation to AMo
2009-08-04 23:36:05 -05:00
Joshua Peek
64eecdd131
whitespace
2009-08-04 16:28:44 -05:00
Paul Gillard
bada18dc36
Added reset_attribute! method to ActiveRecord::AttributeMethods::Dirty which will reset an attribute to its original value should it have changed.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-08-04 16:23:08 -05:00
Paul Gillard
c30a0ce3c8
Modified ActiveRecord::AttributeMethods to allow classes to specify attribute method prefixes and/or suffixes. Previously only suffixes were allowed.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-08-04 16:19:19 -05:00
Joshua Peek
aad5a30bf2
Add simple support for ActiveModel's StateMachine for ActiveRecord
2009-08-04 11:03:57 -05:00
Matt Ganderup
55d1d12c32
fallback_string_to_date sets Date._parse comp arg to true, so that strings with two-digit years, e.g. '1/1/09', are interpreted as modern years [ #2019 state:resolved]
2009-08-03 22:41:56 -05:00
Geoff Buesing
6f97ad07de
quoted_date converts time-like objects to ActiveRecord::Base.default_timezone before serialization. This allows you to use Time.now in find conditions and have it correctly be serialized as the current time in UTC when default_timezone == :utc [ #2946 state:resolved]
2009-08-03 22:03:47 -05:00
Emilio Tagua
f8eb4434d6
Added collection iteration to AR::Relation.
2009-08-03 14:15:47 -03:00
Emilio Tagua
31c83534d6
Don't use local vars before testing its conditional.
2009-08-03 13:59:34 -03:00
Emilio Tagua
62296a51c8
Merge commit 'rails/master'
2009-08-03 13:12:51 -03:00
Joshua Peek
9b68877897
Track generated attribute methods in a separate module
2009-08-02 21:06:35 -05:00
Yehuda Katz
b53f006901
Remove legacy processing and content_length
...
* convert_content_type! is handled by assign_default_content_type_and_charset!
* set_content_length! should be handled by the endpoint server. Otherwise
each middleware that modifies the body has to do the expensive work of
recalculating content_length.
* convert_language! appears to be legacy. There are no tests for this
* convert_cookies! should be handled by the new HeaderHash in Rack
* Use an integer for .status's internal representation to avoid needing to
do String manipulation just to find out the status
2009-08-02 19:39:33 -04:00
Yehuda Katz
503ce1d01c
Update cache_control to be a Hash of options that is used to build the header.
...
* Significantly simplifies setting and modifying cache control in other areas
2009-08-02 19:39:33 -04:00
Jeremy Kemper
f2a35723c8
Ruby 1.9: fix encoding for test_file_stream
2009-08-01 20:26:05 -07:00
Sava Chankov
ec94c2550d
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:25:59 -07:00
Jeremy Kemper
a606727606
Extract String#bytesize shim
2009-08-01 18:34:41 -07:00
Jeremy Kemper
cdf60e46cc
SQLite: drop support for 'dbfile' option in favor of 'database.'
2009-08-01 18:22:12 -07:00
José Valim
072c87b532
Merge branch 'respond_with'
2009-07-31 21:49:29 +02:00
Emilio Tagua
3de59e916d
Merge commit 'rails/master'
...
Conflicts:
activerecord/lib/active_record/associations.rb
2009-07-31 16:21:07 -03:00
Emilio Tagua
c1cbf02e31
Added ActiveRecord::Relation tests. Allow Relation to accept conditional
...
hashes and arrays like #find does.
2009-07-31 16:08:22 -03:00
José Valim
b2d24baf79
Added tests for nested resources.
2009-07-31 20:56:53 +02:00
José Valim
5b7e81efec
Allow respond_with to deal with http verb accordingly.
2009-07-31 11:59:05 +02:00
Joshua Peek
62fd1d3716
Start separating primary key concerns
2009-07-30 17:54:02 -05:00
Joshua Peek
ded3d97c5a
Make sure we use send for the default attribute method body because the suffix maybe an invalid method name
2009-07-30 17:54:02 -05:00
Joshua Peek
1ae7eb5200
Make sure to reset defined methods after calling attribute_method_suffix
2009-07-30 17:54:02 -05:00
Joshua Peek
d599ea27c5
Move attribute_types_cached_by_default into attribute methods reading concern
2009-07-30 17:54:02 -05:00
Joshua Peek
89e9efcbe2
Don't need to pass attr_name to evaluate_attribute_method anymore
2009-07-30 17:54:01 -05:00
Joshua Peek
2c30c9fe6c
Undefine id and let it automatically be generated
2009-07-30 17:54:01 -05:00
Joshua Peek
f8d2c77c90
Redirect method missing for primary key to read_attribute
2009-07-30 17:54:01 -05:00
Joshua Peek
9cdcfb4fc5
ditto for id=
2009-07-30 17:54:01 -05:00
Joshua Peek
831c38ffc7
Don't define id_before_type_cast, just let it be generated on its own
2009-07-30 17:54:01 -05:00
Joshua Peek
1841fd54e6
Move id attribute methods into their related concern
2009-07-30 17:54:01 -05:00
Joshua Peek
3e58f8e191
Restore DangerousAttributeError
2009-07-30 17:54:00 -05:00
Joshua Peek
e129c5673a
Wrap up attribute method reset concerns in 'undefine_attribute_methods'
2009-07-30 17:54:00 -05:00
Joshua Peek
586baf8ffe
read_attribute is always available through attribute
2009-07-30 17:54:00 -05:00
Joshua Peek
bd07c5ca8e
cache_attributes is related to attribute reading
2009-07-30 17:54:00 -05:00
Joshua Peek
94dabf9b4b
Generate methods for all suffixes
2009-07-30 17:54:00 -05:00
Joshua Peek
c2b075bed0
Concernify AR AttributeMethods
2009-07-30 17:53:59 -05:00
José Valim
7a4a679dba
Remove any resource logic from respond_to.
2009-07-30 22:43:37 +02:00
Yehuda Katz
2c2ca833a5
Removed default_internal, which was preventing round-tripping of some encodings.
2009-07-30 09:55:17 -07:00
Pratik Naik
83537bf090
Generator config should be commented by default
2009-07-30 17:49:48 +01:00
Pratik Naik
61d995f7ed
Remove whitespaces from the default mailer file
2009-07-30 17:49:48 +01:00
Marc Love
d860c89170
Fix tag helpers so that all HTML element boolean attributes render according to the specs. Added all boolean attributes listed in the XHTML 1.0 specs ( http://www.w3.org/TR/xhtml1/guidelines.html ) and HTML 5 specs ( http://www.whatwg.org/specs/web-apps/current-work ). HTML 5 boolean attribute rendering was broken in commit 1e2d722960 / [ #2864 state:resolved].
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-30 09:48:27 -07:00
Jeremy Kemper
d83b182857
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:54:54 -07:00
José Valim
e566fc0577
Merge branch 'master' of git://github.com/rails/rails
2009-07-29 21:22:56 +02:00
José Valim
d209aea7d8
Remove last TODO.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:04 -07:00
José Valim
fa0cf663fe
Add a couple more tests to respond_with.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:03 -07:00
José Valim
09de34ca56
Added respond_with.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:03 -07:00
José Valim
bbe86077c2
Added tests for respond_to class method.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:03 -07:00
José Valim
67b2d08c0a
Ensure that the proper accept header value is set during tests.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:03 -07:00
José Valim
b51632d34d
Improve request test coverage by adding formats and negotiate_mime tests.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:02 -07:00
José Valim
7e280c3bff
Remove Mime::ALL from Mime::SET.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:02 -07:00
José Valim
3e8ba616ef
Refactor even more Responder. Move mime negotiation to request and added respond_to class method.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:02 -07:00
José Valim
3f445b316d
Refactor Responder to only calculate available mime types. Those are sent to the controller that knows what to do with it (render a block or call default render).
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:02 -07:00
Yehuda Katz
c4d1075bd3
Add support for error_messages_for(@obj)
2009-07-28 19:06:14 -07:00
José Valim
7d56fd9f08
Always use application generator to run templates.
2009-07-28 16:21:30 +02:00
José Valim
d9aae2b56e
Merge branch 'master' of git://github.com/rails/rails
2009-07-28 09:00:33 +02:00
José Valim
5025ae610f
Ensure that not namespaced generators also load RAILS_ROOT/lib/templates files.
2009-07-28 08:51:57 +02:00
José Valim
419ca7a747
Ensure that developers options are overwritten by user options.
2009-07-28 08:48:21 +02:00
Pratik Naik
9533e0eca7
Ignore everything under test/fixtures/public/absolute
2009-07-27 17:21:52 +01:00
José Valim
67c2f53938
Allow templates for non namespaced generators too.
2009-07-25 21:14:43 +02:00
Pratik Naik
e033b5d037
Merge docrails
2009-07-25 16:03:58 +01:00
José Valim
edd07b5a7a
Updated vendored thor to 0.11.3.
2009-07-23 14:30:49 +02:00
José Valim
178044dbd2
Do not try to use thor gem.
2009-07-23 07:33:54 +02:00
John Duff
0c68d23f19
make pass through error code configurable [ #2817 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-07-22 22:21:06 -05:00
Joshua Peek
272c504f91
Dasherize XML root by default to avoid invalid tags "<admin/posts>...</admin/posts>" [ #2875 state:resolved]
2009-07-22 21:06:34 -05:00
John Maxwell
c39151a847
Patch to ActiveModel's (and ActiveRecord, by association) XML serialization: If two parameters are present in Procs supplied to to_xml's :procs option, the model being serialized will be passed as the second argument [ #2373 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-07-22 20:47:15 -05:00
Emilio Tagua
ca1e62f142
Performance: cache/reload arel relation when possible to speed up things.
2009-07-21 23:01:26 -03:00
Emilio Tagua
5123a2359b
Removed unused local variable.
2009-07-21 20:28:35 -03:00
Emilio Tagua
0e0866e056
Introduced ActiveRecord::Relation, a layer between an ARel relation and an AR relation
2009-07-21 20:21:03 -03:00
Emilio Tagua
f32c370983
Merge commit 'rails/master'
2009-07-21 11:27:23 -03:00
José Valim
33048b6e27
Solving merge conflicts.
2009-07-21 12:51:53 +02:00
José Valim
edda0bfe76
Allow nested and multiple fallbacks for generators.
2009-07-21 12:16:25 +02:00
José Valim
10fd021789
Change attributes default type to array to allow order to be preserved.
2009-07-21 12:00:02 +02:00
José Valim
c90419d4f4
Update db:sessions:create to use the proper generator.
2009-07-21 11:28:54 +02:00
Akira Matsuda
9d7aae7103
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:15:51 -07:00
Akira Matsuda
9163b9ac9d
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 00:09:39 -07:00
Joshua Peek
108545a9d6
Clean up validation example
2009-07-21 00:56:27 -05:00
Joshua Peek
574323df62
So you can require 'activemodel'
2009-07-21 00:52:50 -05:00
Joshua Peek
92c00d7586
AMo conversion helper
2009-07-21 00:51:57 -05:00
Joshua Peek
6944b391cd
Kill AMo Base
2009-07-21 00:13:26 -05:00
Joshua Peek
48bc39e03a
Improve AMo observing docs
2009-07-21 00:11:26 -05:00
Joshua Peek
7c84bbf160
Add wrap_with_notifications helper to AMo observing
2009-07-20 23:57:01 -05:00
Joshua Peek
2685d93b07
Kill AMo ivar attributes helper
2009-07-20 23:28:58 -05:00
Yehuda Katz + Carl Lerche
e7a2496fda
Vendor the bundler project
2009-07-20 18:03:38 -07:00
Yehuda Katz
d80316ad32
First effort at new Ajax helpers
2009-07-20 16:13:21 -07:00
Emilio Tagua
9a28bd7876
Merge commit 'rails/master'
2009-07-20 16:57:23 -03:00
Emilio Tagua
b326faef09
Performance boost for AR#create
2009-07-20 16:56:15 -03:00
Emilio Tagua
046c22c8c1
Removed legacy test.
2009-07-20 16:53:48 -03:00
Yehuda Katz
37658f15bb
Merge branch 'master' of git@github.com:rails/rails
2009-07-19 13:21:17 -07:00
Yehuda Katz
f2f5cdc8bc
Rename ActiveRecordHelper to ActiveModelHelper
2009-07-20 01:30:49 +09:00
Yehuda Katz
b00cac4adc
Finish convert_to_object updates
2009-07-20 01:22:24 +09:00
Yehuda Katz
13e18dd940
Update some tests and add a to_model to form helpers
2009-07-20 00:58:59 +09:00
Yehuda Katz
5ffaaa71d1
Define ActiveModel API Compliance
...
- Define to_model on AR
- Define to_model on ActiveModel::APICompliant
- Update test fixtures to be API Compliant
- Start using to_model in AP
2009-07-20 00:27:04 +09:00
Yehuda Katz
45d41d8012
Add some simple examples for unconventional AMo and AP use
2009-07-19 23:24:19 +09:00
Yehuda Katz
b20d68446d
Move default_form_builder to ActionView so it'll work in environments not using ActionView::Base
2009-07-19 22:31:55 +09:00
Yehuda Katz
0f2914be40
Separate ActionView::Context so something else can easily be made into an AV context
2009-07-19 22:31:44 +09:00
Yehuda Katz
bb530923bc
Simplify required "ActionView compliant" API
2009-07-19 21:53:02 +09:00
Sven Fuchs
17d5cc12b9
* don't include String#% for Ruby 1.9
...
* raise a KeyError exception for missing named interpolation args (like Ruby 1.9 does)
* raise an ArgumentError when mixing named and unnamed placeholders (like Ruby 1.9 does)
* improve docs and comply a bit more w/ Rails names/conventions
[#2870 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-07-18 11:27:27 -07:00
Emilio Tagua
87ca87d635
Merge commit 'rails/master'
2009-07-16 16:18:25 -03:00
Emilio Tagua
f4a23567e2
Added ActiveRecord::Base#(where|join|project|group|order|take|skip) methods.
2009-07-16 13:35:07 -03:00
José Valim
d6a590a710
Modified rake tasks to use new app generator structure and updated Thor version.
2009-07-16 11:17:19 +02:00
José Valim
b03034a686
Update vendored Thor to have latest actions updates.
2009-07-16 10:16:23 +02:00
Szymon Nowak
1c11437a32
Add primary_key option to belongs_to association
...
[#765 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-07-15 18:13:32 -07:00
José Valim
fa5f7f7087
Merge branch 'master' of git://github.com/rails/rails
2009-07-16 00:28:33 +02:00
José Valim
e3d5364e41
Implemented generaators fallbacks.
2009-07-16 00:17:28 +02:00
José Valim
9c4ba74b7c
Change generators configuration to have a hash style.
2009-07-15 23:38:41 +02:00
Yehuda Katz
1a2946a6d9
Add some missing dependencies
2009-07-15 14:16:30 -07:00
Yehuda Katz
1273ffa186
Fix AbstractController::Layouts to work when included directly on a controller
2009-07-15 14:16:12 -07:00
Yehuda Katz
28508d444e
Centralize commonly used parts of AS in ActionController into action_controller.rb
2009-07-15 14:15:52 -07:00
José Valim
bcf754d8c4
Add a form hook to erb scaffold. Customize and go!
2009-07-15 22:43:25 +02:00
José Valim
8d47078a49
Added source_paths to rails generators. If a template is added to RAILS_ROOT/lib/templates/base/generator it will be used. For example, to customize edit.html.erb template on scaffold, just add a customized copy at RAILS_ROOT/lib/templates/erb/scaffold.
2009-07-15 22:37:22 +02:00
Lourens Naude
0920e69244
ActiveSupport Hash optimizations [ #2902 state:resolved]
...
Signed-off-by: Carl Lerche <carllerche@mac.com >
2009-07-15 13:23:05 -07:00
José Valim
b4ef958de6
Change false to :verbose => false as in new Thor version.
2009-07-15 20:16:37 +02:00
José Valim
baa4781ac7
Allow nil and false to be given as configuration values and avoid creating unecessary hashes.
2009-07-15 16:53:54 +02:00
José Valim
7022b58842
Allow namespaced configuration on generators.
2009-07-15 16:20:48 +02:00
José Valim
0702e04e0d
Refactored some generators to make use of improved invocations on thor.
2009-07-15 11:33:36 +02:00
Emilio Tagua
634f6713ee
Merge commit 'rails/master'
2009-07-14 23:00:08 -03:00
José Valim
a06c825b46
Updated vendored Thor to 0.11.1 and update Rails::Generators.
2009-07-14 22:20:43 +02:00
José Valim
e96af1eaa2
Add version to thor frozen gem.
2009-07-14 15:44:14 +02:00
José Valim
925c9104e0
Copy Thor files instead of using as a submodule.
2009-07-13 23:21:47 +02:00
José Valim
5021dc69a4
Vendorized Thor.
2009-07-13 23:13:48 +02:00
José Valim
52673cd2ee
Added a generator generator.
2009-07-13 23:01:12 +02:00
Pratik Naik
40b387580f
Use map! instead of map for <association>_ids
2009-07-13 21:59:06 +01:00
José Valim
a5ab030ae4
Ensure non timestamped migrations are generated properly.
2009-07-13 22:26:58 +02:00
José Valim
25647f7021
Add some attribute readers to migration module.
2009-07-13 20:42:25 +02:00
José Valim
b9f4ea7198
Add hooks for integration and performance tests.
2009-07-13 18:29:40 +02:00
José Valim
f68e7a3987
Remove generator environment until we have a gem manifest.
2009-07-13 18:18:08 +02:00
Pratik Naik
373b053dc8
Optimize <association>_ids for hm:t with belongs_to source
2009-07-13 16:29:19 +01:00
José Valim
21019304f0
Make explicit that references and belongs_to types have nil as default value.
2009-07-13 16:18:56 +02:00
José Valim
ae7a7852d5
Always allow params to be skipped on action orm in generators.
2009-07-13 15:08:45 +02:00
José Valim
d5225c1fd5
Do not require options on class_option.
2009-07-13 14:30:32 +02:00
José Valim
cd28dcb5a4
Cache source root in a rails specific variable.
2009-07-13 13:39:48 +02:00
José Valim
3075ae0611
Solving merge conflicts.
2009-07-12 16:29:15 +02:00
Yehuda Katz
b0429f5e66
Rename method to a more obvious name
2009-07-11 23:40:36 -04:00
Joshua Peek
c863388039
Add observing hooks to ARes
2009-07-11 16:59:11 -05:00
Joshua Peek
e83a05af07
Integrate AMo XML serializer into AR
2009-07-11 16:20:58 -05:00
Joshua Peek
01d92021e6
Switch scaffolding templates to HTML 5 doctype
2009-07-10 11:34:39 -05:00
José Valim
cca16a015d
Do not clean up frameworks on generators environment, otherwise initializers, gems and plugins might not be loaded properly.
2009-07-09 10:04:59 +02:00
Sam Goldstein
d60d7edce4
Make it so AR attributes which conflict with object-private methods (e.g. system) don't 'randomly' cause NoMethodErrors
...
Previously if you called this attribute before others, you'd get exceptions. But if it was the second-or-subsequent attribute you retrieved you'd get the correct behaviour.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2808 state:committed]
2009-07-09 16:44:30 +12:00
José Valim
09c288f0c5
Add the new generators environment and update commands.
2009-07-08 12:55:50 +02:00
José Valim
c9ea21717e
Generators are configured on initialization if RAILS_ENV=generators.
2009-07-08 12:53:45 +02:00
José Valim
2699e9c2dd
Added config.generators with tests.
2009-07-08 12:53:45 +02:00
José Valim
c07746cbdf
Merge branch 'master' of git://github.com/rails/rails
2009-07-08 12:53:13 +02:00
Lawrence Pit
579250ea46
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:36:42 -07:00
Lawrence Pit
da635394c1
Ruby 1.9 style String interpolation support for lower ruby versions. Thanks to code from Masao Mutoh's GetText gem. [ #2870 state:resolved]
...
Signed-off-by: Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local >
2009-07-07 16:21:57 -07:00
Hongli Lai (Phusion)
187d90f752
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. [ #2868 state:resolved]
...
Signed-off-by: Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local >
2009-07-07 16:17:25 -07:00
Emilio Tagua
1e2d722960
Adds a audio_tag helper for the HTML5 audio tag. Fixed video_path docs. HTML attributes values should be true or false not attribute's name. [ #2864 state:resolved]
...
Signed-off-by: Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local >
2009-07-07 15:56:27 -07:00
Yehuda Katz + Carl Lerche
61604feec0
Get Initializer tests running without requiring parts of Rails being loaded first
2009-07-06 12:25:34 -07:00
Yehuda Katz + Carl Lerche
9a42e06dd8
Reapply Rails::Application::Path tweaks
...
Reapplies: a4bdc00fec
3c1dab7225
2009-07-06 10:22:42 -07:00
José Valim
dd7ee082be
Use active_support/mini since we just need inflections.
2009-07-06 18:38:27 +02:00
José Valim
66d1b968d1
Make specs pass on Ruby 1.9.
2009-07-06 18:31:28 +02:00
Emilio Tagua
fb46d00fdf
Merge commit 'rails/master'
2009-07-06 10:29:05 -03:00
José Valim
eeb6a0786a
Load generators from user home and show a error message if they can't be loaded.
2009-07-04 20:17:32 +02:00
José Valim
b277cf28e8
Allow scaffold controller to load action_orm files on demand.
2009-07-04 20:17:32 +02:00
José Valim
35925a8995
Ensure that rails templates methods are invoked with the proper extensions [ #2531 status:resolved]
2009-07-04 20:17:32 +02:00
José Valim
8ff214e0db
Use the proper shebang when using Ruby 1.9 or jruby or windows.
2009-07-04 20:17:32 +02:00
José Valim
da09d46ed4
Make generators test pass with latest Thor version
2009-07-04 20:17:32 +02:00
José Valim
cd388e075c
Search for generators on vendorized plugins and gems.
2009-07-04 20:17:31 +02:00
José Valim
37ba0047a9
Removed invoke_if and allow hook_for to accept boolean options.
2009-07-04 20:17:31 +02:00
José Valim
9e36dd4e1c
Remove update_js from Rakefile and the uneeded railsgen.
2009-07-04 20:17:31 +02:00
José Valim
20e2140ce7
Merge branch 'master' of git://github.com/rails/rails
2009-07-04 20:16:36 +02:00
Joshua Peek
783db25e0c
Integrate AMo JSON serializer into AR
2009-07-03 23:12:42 -05:00
Joshua Peek
d2b78b3594
Initial extraction of AMo xml serializer
2009-07-03 21:38:14 -05:00
Joshua Peek
e3d6d10e1f
Ensure JSON serializer includes model naming
2009-07-03 21:38:13 -05:00
Emilio Tagua
6d4b6a247e
Merge commit 'rails/master'
2009-07-03 12:17:23 -03:00
José Valim
44633dc7a5
Add some tests for no_color! behavior.
2009-07-03 15:12:18 +02:00
José Valim
21db04818e
More tests for rails generators and lookup.
2009-07-03 14:57:46 +02:00
José Valim
3ca504c966
Removed remaining old generators files.
2009-07-03 14:57:46 +02:00
José Valim
de68cf7e06
Plugin generators now reflect new generators sutrcture.
2009-07-03 14:57:46 +02:00
José Valim
d1c404ee90
Added lookup to generators.
2009-07-03 14:57:46 +02:00
José Valim
3bf45890b3
Merge branch 'master' of git://github.com/rails/rails
2009-07-03 14:56:19 +02:00
Pratik Naik
a4bdc00fec
Revert "Compact the way application paths are defined"
...
This reverts commit 940aad225a .
Reason : The server does not start
2009-07-03 12:35:53 +01:00
Pratik Naik
3c1dab7225
Revert "Modify the Rails::Application::Path object to allow for more concise path definition."
...
This reverts commit 913bb2f4c2 .
Reason : The server does not start
2009-07-03 12:23:57 +01:00
Yehuda Katz + Carl Lerche
378a65a909
Added tests for the :install_gem_spec_stubs initializer
2009-07-02 17:52:46 -07:00
Yehuda Katz + Carl Lerche
d8406f0c20
Wrote tests for the :check_ruby_version initializer
2009-07-02 16:51:05 -07:00
Yehuda Katz + Carl Lerche
1d280e21a1
Adds support for def self.setup in isolation tests for setup that should be run only once in the parent
2009-07-02 16:03:41 -07:00
Yehuda Katz + Carl Lerche
940aad225a
Compact the way application paths are defined
2009-07-02 15:49:35 -07:00
Yehuda Katz + Carl Lerche
913bb2f4c2
Modify the Rails::Application::Path object to allow for more concise path definition.
2009-07-02 15:47:11 -07:00
Emilio Tagua
cd424f0f32
Merge commit 'rails/master'
2009-07-02 16:30:55 -03:00
Jesús García Sáez
fc6077d76e
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:18:48 -07:00
Yehuda Katz + Carl Lerche
0fbf458b6c
Removed unnecessary calls to image_path and hash lookups [ #2827 state:resolved]
2009-07-02 12:14:23 -07:00
Brian Abreu
d036899717
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:05 -07:00
Jarl Friis
e61afed6f8
My suggestion to fix ticket 2401 [ #2401 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-02 11:55:24 -07:00
Aaron Patterson
49bdbebca6
wycats forgot a +1, so I added it [ #2749 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-02 11:39:06 -07:00
Levin Alexander
ab2d6abb55
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:22:25 -07:00
Yehuda Katz + Carl Lerche
cf5b2b250f
Fixes a number of tests that inexplicably didn't fail when we committed the original patch
2009-07-02 10:50:25 -07:00
Tieg Zaharia
51d7b3070c
Adds a video_tag helper for the HTML5 video tag (similar to how the image_tag works) (tests included); removes a duplicate test line for image_tag; adds boolean attributes for video tag to tag()'s boolean attributes
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-02 10:36:38 -07:00
J.D. Hollis
9eab435631
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:27:54 -07:00
José Valim
b7bc68076c
Make color optional.
2009-07-02 15:57:37 +02:00
José Valim
528d555e37
Make invoke output white and use padding.
2009-07-02 15:55:21 +02:00
José Valim
a08a8cd8d2
Add update tasks.
2009-07-02 11:47:03 +02:00
José Valim
826a6a72fe
Updated rake tasks.
2009-07-02 11:40:00 +02:00
José Valim
ec55e59e99
Updated commands.
2009-07-02 11:08:07 +02:00
José Valim
776220e1e2
Rename a wrongly named file.
2009-07-02 10:27:40 +02:00
José Valim
ea0b0c820d
rm -rf rails_generator/generators
2009-07-02 10:27:40 +02:00
José Valim
c972b25df5
Tests for scaffold generator.
2009-07-02 10:27:40 +02:00
José Valim
a7c1591315
Added stylesheets controller which is invoked by scaffold.
2009-07-02 10:27:40 +02:00
José Valim
7f7afdf0f1
Rename ControllerNamedBase to ScaffoldBase and move ActionORM helpers.
2009-07-02 10:27:40 +02:00
José Valim
1a4d8aca8a
Added tests to scaffold controller.
2009-07-02 10:27:40 +02:00
José Valim
86ff074101
Added test unit files for scaffold_controller.
2009-07-02 10:27:40 +02:00
José Valim
80cd16372c
Added scaffold views to scaffold controller.
2009-07-02 10:27:39 +02:00
José Valim
9541977e04
Make scaffold controller generate agnostic code and mark some hooks as required.
2009-07-02 10:27:39 +02:00
José Valim
bf672a12a3
Added Rails::Generators::ActionORM to hold ORM methods necessary to build a generator.
2009-07-02 10:27:39 +02:00
José Valim
0760d5b542
Added comments to meta programming code.
2009-07-02 10:27:39 +02:00
José Valim
555a956a66
Ensure both migration and routes are removed on revoke.
2009-07-02 10:27:39 +02:00
José Valim
10a9205c58
Put migration methods into a separate folder and let just ActiveRecord dependency in ActiveRecord models.
2009-07-02 10:27:39 +02:00
José Valim
b77a7dcf4d
Added controller named base.
2009-07-02 10:27:39 +02:00
José Valim
d5d0b8ea8e
Removing unecessary class methods.
2009-07-02 10:27:39 +02:00
José Valim
35c4df4aa5
Added scaffold_controller.
2009-07-02 10:27:39 +02:00
José Valim
00b168e9d0
Show second level invocations on usage.
2009-07-02 10:27:39 +02:00
José Valim
dec1ee7422
Started with scaffold controller and added remove_hook_for.
2009-07-02 10:27:39 +02:00
José Valim
1c265da1db
Merge branch 'master' of git://github.com/rails/rails
2009-07-02 10:25:18 +02:00
Elliot Winkler
8bb510f6c1
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:08 -07:00
Yehuda Katz + Carl Lerche
ee7d4c47e7
Fixes bug where Memcached connections get corrupted when an invalid expire is passed in [ #2854 state:resolved]
2009-07-01 16:56:43 -07:00
Emilio Tagua
084e4a2dd4
Merge commit 'rails/master'
2009-07-01 20:36:53 -03:00
Emilio Tagua
260c847817
Create is now powered by Arel. Removed methods that are no longer used.
2009-07-01 20:34:26 -03:00
Akira Matsuda
92bff2ebf1
Fix pattern to match various magic comment formats
2009-07-01 16:26:15 -07:00
Jeremy Kemper
49824e8ad6
JSON.escape returns UTF-8 strings
...
[#2849 state:resolved]
2009-07-01 16:22:19 -07:00
Jeremy Kemper
f37a2ea84c
uses Hash#except/slice
2009-07-01 16:01:20 -07:00
Yehuda Katz + Carl Lerche
8e3e362aed
Forgot to commit the new file. This is slightly embarrassing.
2009-07-01 15:26:14 -07:00
Yehuda Katz + Carl Lerche
1a6f4d424a
Apparently stdlib isn't std enough
2009-07-01 15:20:02 -07:00
Yehuda Katz + Carl Lerche
3990c128ef
Modify isolation test to require a file not in use anywhere in Rails
2009-07-01 15:06:11 -07:00
Yehuda Katz + Carl Lerche
677f74dd0d
Updates CI to use latest mocha
2009-07-01 13:50:05 -07:00
Jeremy Kemper
e7312105c7
Merge branch 'master' of git@github.com:rails/rails
2009-07-01 12:55:19 -07:00
Yehuda Katz + Carl Lerche
1026d7706f
Original cache objects should not be immutable [ #2860 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-01 12:16:55 -07:00
Yehuda Katz + Carl Lerche
16dc139caa
Added AR:B#dup method for duplicationg object without frozen attributes [ #2859 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-01 12:16:35 -07:00
Emilio Tagua
0f5785c997
Small refactor to update_all.
2009-07-01 16:16:11 -03:00
Yehuda Katz + Carl Lerche
882dd4e605
ensure Inflector.camelize works with symbols [ #2856 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-01 12:14:34 -07:00
Emilio Tagua
a9cd9f4c75
Merge commit 'rails/master'
2009-07-01 16:07:45 -03:00
Yehuda Katz + Carl Lerche
7583a24ee0
Move mocha down below initial T::U require and bump version to 0.9.7 [ #2858 state:resolved]
2009-07-01 11:53:17 -07:00
Yehuda Katz + Carl Lerche
0515256fd3
Accept Symbol for contoller name [ #2855 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-01 11:16:18 -07:00
Yehuda Katz + Carl Lerche
eea7b5db1d
Crazy hacks to get the Isolation testing module to work on non forking environments
2009-06-30 17:39:32 -07:00
Emilio Tagua
cbf8ecc1cb
Merge commit 'rails/master'
2009-06-30 20:32:28 -03:00
Emilio Tagua
e5b8c4483c
Merge commit 'rails/master'
...
Conflicts:
activerecord/lib/active_record/base.rb
2009-06-30 20:12:17 -03:00
Pratik Naik
45e6f19925
Revert "Revert "Generate proper :counter_sql from :finder_sql when there is a newline character immediately following 'SELECT' [ #2118 state:resolved]""
...
This reverts commit 80f1f863cd .
The feature doesn't work on Postgres, so don't test it on Postgres.
Also, Postgres compatibility is irrelevant to the ticket/patch in question.
2009-07-01 00:02:00 +01:00
Emilio Tagua
9c70442534
Merge commit 'rails/master'
...
Conflicts:
activerecord/test/cases/adapter_test.rb
2009-06-30 19:34:26 -03:00
Carl Lerche
db3de78a83
Bump up the version to 3.0.pre
2009-06-30 14:37:12 -07:00
Carl Lerche
132e6d0063
Add #concat to Rails::Application::Path
2009-06-30 13:55:11 -07:00
Carl Lerche
f281745056
Test that builtin_directories is only used in development mode
2009-06-30 13:53:03 -07:00
Yehuda Katz + Carl Lerche
575b95ea0b
Created AS::Testing::Isolation which runs each test case in a separate process.
...
This allows for testing rails bootup (files are required, correct constants are
set, etc...). Currently, this is implemented via forking only, but we will add
support for jruby and windows shortly.
2009-06-30 12:00:50 -07:00
Carl Lerche
9101941c12
Require core_ext/kernel/requires in test_help to providing #require_library_or_gem
2009-06-30 09:05:53 -07:00
Carl Lerche
f66b5d79c1
Stop the initializer from blowing up when builtin_directories is empty
2009-06-30 09:01:46 -07:00
Carl Lerche
4954379283
Remove stray checks for Rspec in the testing setup.
2009-06-30 08:41:17 -07:00
Justin French
7d548f795d
Changed ActiveRecord::Base.human_name to underscore the class name before it humanizes it
...
This gives you 'Post comment' rather than 'Postcomment' by default.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2120 state:committed]
2009-06-30 15:24:04 +12:00
José Valim
4739f0ff5d
Small fix to plugin generator.
2009-06-29 21:08:12 +02:00
José Valim
95ef9bd67f
Simplifying resource generator.
2009-06-29 19:56:22 +02:00
José Valim
ff4c600448
Added singleton support to resource controller.
2009-06-28 19:57:00 +02:00
José Valim
9413dba432
Added tessts for resources generator.
2009-06-28 19:46:34 +02:00
José Valim
9068bc05b8
Added ResourceGenerator.
2009-06-28 18:28:30 +02:00
José Valim
a2d4d755ae
Use inject_into_file instead of gsub_file (the first is reversible)
2009-06-28 16:48:22 +02:00
José Valim
1ca51df000
Added migration and session_migration generator.
2009-06-28 13:16:14 +02:00
José Valim
4f3e44fa03
Move file action only to app generator.
2009-06-28 12:00:13 +02:00
José Valim
496dde95fb
Added migrations and make base generators be lazy loaded.
2009-06-28 11:56:44 +02:00
José Valim
c03585aa8d
Show invoked generators options on meta generators.
2009-06-27 21:30:00 +02:00
José Valim
fdeee65c96
Add model_subclass generator with deprecation warning.
2009-06-27 21:30:00 +02:00
José Valim
7b6c5ed7db
Added parent option to model generator.
2009-06-27 21:30:00 +02:00
José Valim
ff44e5055c
Output invocations.
2009-06-27 21:30:00 +02:00
José Valim
1a15dd4de5
Rename invoke_for to hook_for.
2009-06-27 21:30:00 +02:00
José Valim
acaeaf308a
Add a fixture replacement hook to TestUnit model generator.
2009-06-27 21:29:59 +02:00
José Valim
8c5622f0d4
Initial scratch of model generators.
2009-06-27 21:29:59 +02:00
José Valim
9acb721e6a
Do not generate aliases automatically to avoid conflicts.
2009-06-27 21:29:59 +02:00
José Valim
ff48e23a4e
Make Observer generator agnostic.
2009-06-27 21:29:59 +02:00
José Valim
85ff67ce4c
Merge branch 'master' of git://github.com/rails/rails
2009-06-27 21:27:21 +02:00
Chris Mear
085db5e128
Make text_area_tag escape contents by default.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2015 state:committed]
2009-06-27 13:16:52 +12:00
Vicente Mundim
68b02cb00a
Make filter_parameters work correctly with array parameters.
2009-06-27 12:43:57 +12:00
Yehuda Katz + Carl Lerche
188a892c5a
Starting to replace scattered path configuration settings with the path object
2009-06-26 17:32:05 -07:00
Yehuda Katz + Carl Lerche
4153c6b720
Finished a first stab at the Rails application path object.
2009-06-26 15:37:52 -07:00
Yehuda Katz + Carl Lerche
b0774281ef
Update paths to support an explicit root and multiple paths per category
2009-06-26 15:37:52 -07:00
Yehuda Katz + Carl Lerche
728e3b4047
Simple initial Paths impl
2009-06-26 15:37:52 -07:00
Yehuda Katz + Carl Lerche
2865421f5d
Checkpoint. Added a bunch of TODOs and some changes after further going through the initializer
2009-06-26 15:37:52 -07:00
José Valim
e375819b76
Spec --no and --skip.
2009-06-26 20:42:00 +02:00
José Valim
95a5cc6167
Add invoke_iff and invoke_for to the public interface.
2009-06-26 20:26:10 +02:00
José Valim
54208cbe60
Added invoke_if and make use of it on controller generators.
2009-06-26 20:24:52 +02:00
José Valim
e981aeb576
invoke_for now uses Rails built-in lookup.
2009-06-26 19:30:18 +02:00
José Valim
5ef1d9706b
Added Rails::Generators.find_by_namespace.
2009-06-26 19:14:55 +02:00
José Valim
3a0619f1bb
Update some USAGE files.
2009-06-26 18:54:58 +02:00
José Valim
2d48f80a6b
Use type :default for invoke_for, this allows --no-test-framework and --skip-test-framework to be given.
2009-06-26 12:33:21 +02:00
José Valim
e2346244a2
Added Controller Generators.
2009-06-26 11:59:14 +02:00
José Valim
d40bd85119
Small fixes.
2009-06-26 11:59:14 +02:00
José Valim
2f3681dfc2
Clean up class collisions check and a class method helper.
2009-06-26 11:59:14 +02:00
José Valim
6bd101188e
Class collision checks.
2009-06-26 11:59:14 +02:00
José Valim
e084313640
Added HelperGenerator.
2009-06-26 11:59:13 +02:00
José Valim
da1baeab4a
Added integration and performance test generators.
2009-06-26 11:59:13 +02:00
José Valim
0f1c325f3c
Improving generators runner.
2009-06-26 11:59:13 +02:00
José Valim
915f108d6a
Merge branch 'master' of git://github.com/rails/rails
2009-06-26 11:58:02 +02:00
Michael Koziarski
b5dfdc714f
Make sure the wrapped exceptions also have the original exception available.
...
[#2419 state:committed]
2009-06-26 17:01:21 +12:00
Michael Schuerig
00a5fd3d18
Translate foreign key violations to ActiveRecord::InvalidForeignKey exceptions.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-26 16:52:55 +12:00
Michael Schuerig
53a3eaa860
Translate adapter errors that indicate a violated uniqueness constraint to ActiveRecord::RecordNotUnique exception derived from ActiveReecord::StatementInvalid.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-26 16:52:54 +12:00
Christos Zisopoulos
18a97a6601
Handle missing javascript/stylesheets assets by raising an exception
...
An exception will be raised if a local javascript/stylesheet file included
by the stylesheet_link_tag or javascript_include_tag can not be found.
When caching is enabled, we use atomic_write to ensure that the cache file
is not created with zero length.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2738 state:committed]
2009-06-26 16:47:15 +12:00
Yehuda Katz + Carl Lerche
8ee60660ce
Try speeding up rails booting
2009-06-25 14:32:15 -07:00
Yehuda Katz + Carl Lerche
c117e8e848
Run the block passed to #run first when initializing
2009-06-25 14:32:15 -07:00
Joshua Peek
b598baf813
ignore absolute tmp directory
2009-06-25 14:52:58 -05:00
Joshua Peek
7837da41a3
send_data should set Content-Length as a string
2009-06-25 14:47:15 -05:00
Joshua Peek
7aa730440c
Remove deprecated implicit ivar assignment
2009-06-25 12:51:21 -05:00
Pratik Naik
97159fad6a
Missed file from the previous commit 92b229e125
2009-06-25 17:03:07 +01:00
Pratik Naik
92b229e125
Make performance tests work again
2009-06-25 17:02:04 +01:00
José Valim
aee63a12f2
More tests for mailer.
2009-06-25 16:27:44 +02:00
José Valim
534f7b54e3
Mailer tests.
2009-06-25 16:21:33 +02:00
José Valim
0bb95968db
More code refactoring.
2009-06-25 15:45:15 +02:00
José Valim
d5bdf31d89
Refactoring out descriptions.
2009-06-25 13:46:19 +02:00
José Valim
6e6c0117b3
Added Mailer generaator template engine and test framework agnostic.
2009-06-25 12:57:58 +02:00
José Valim
ed33c29a4e
Added class collision checks.
2009-06-25 11:56:18 +02:00
José Valim
4573fd2e06
Added observer generator.
2009-06-25 11:24:35 +02:00
José Valim
eaef1ee09c
Make tests pass again after merge.
2009-06-25 10:44:46 +02:00
José Valim
5337766fa0
Tests for metal generator.
2009-06-25 10:39:44 +02:00
José Valim
f596495556
Tests for plugin generator.
2009-06-25 10:39:44 +02:00
José Valim
a748bb7961
Get base_name from class_name.
2009-06-25 10:39:43 +02:00
José Valim
0ed602b3ef
Removed TODOs.
2009-06-25 10:39:43 +02:00
José Valim
ccd26575d1
Clean up plugin generator.
2009-06-25 10:39:43 +02:00
José Valim
b72d966707
Merge branch 'master' of git://github.com/rails/rails
2009-06-25 10:38:17 +02:00
Emilio Tagua
50f73bd39c
Merge commit 'rails/master'
2009-06-24 16:30:27 -03:00
Yehuda Katz + Carl Lerche
3aad4d7fbe
Separate Rails module methods, the config object, and the initializer into separate files.
2009-06-23 16:10:43 -07:00
Emilio Tagua
0002fd4ab6
Updated Arel submodule.
2009-06-23 19:47:55 -03:00
Emilio Tagua
3b27a4856f
Refactoring: Calculations now use construct_finder_sql instead they own method.
2009-06-23 19:40:57 -03:00
Yehuda Katz + Carl Lerche
ce9d9fda77
Resurrect threadsafe!
2009-06-23 14:49:04 -07:00
Yehuda Katz + Carl Lerche
042bd0a5c8
Tests pass, AWDoR passes, and a fresh app boots.
2009-06-23 14:49:04 -07:00
Yehuda Katz + Carl Lerche
9d398f4827
Got all the railties tests to pass, rails must boot!
2009-06-23 14:49:04 -07:00
Yehuda Katz + Carl Lerche
30baaac546
Fix the default frameworks
2009-06-23 14:49:04 -07:00
Yehuda Katz + Carl Lerche
9cfd1d4491
Get more tests to pass
2009-06-23 14:49:04 -07:00
Yehuda Katz + Carl Lerche
f2aea4d3ea
Get initializer_test.rb to pass with the new initializer.
2009-06-23 14:49:03 -07:00
Yehuda Katz + Carl Lerche
a3309e4d70
Started making progress on implementing a new initializer.
...
Class.any_instance.expects(:require).raises(LoadError)
... w0t
2009-06-23 14:49:03 -07:00
Yehuda Katz + Carl Lerche
99b8248f6e
Initial initializer impl
2009-06-23 14:49:03 -07:00
Yehuda Katz + Carl Lerche
805369c8c8
Starting to write the new initializer
2009-06-23 14:49:03 -07:00
Yehuda Katz + Carl Lerche
1b844e4bf4
Passes in 1.9
2009-06-23 14:45:27 -07:00
Emilio Tagua
b9088dce07
Merge commit 'rails/master'
2009-06-23 18:13:46 -03:00
Yehuda Katz
4417a19b03
Small changes to get 1.9 passing (for the most part)
2009-06-23 14:06:22 -07:00
Emilio Tagua
4864f92ee3
Removed unused methods.
2009-06-23 17:57:31 -03:00
Emilio Tagua
02a723f7b5
Arel now buils SQL queries for associations. Removed old code and
...
updated Arel version to support this.
2009-06-23 17:38:31 -03:00
Emilio Tagua
bc899fd3a3
Arel updated. All tests passing for SQLite3 and PostgreSQL.
2009-06-23 17:20:42 -03:00
Emilio Tagua
d587cf3794
Removed old commented code
2009-06-23 17:19:51 -03:00
José Valim
8843b91da7
Delete uneeded USAGE file.
2009-06-23 20:45:27 +02:00
José Valim
ea106cf051
Added plugin generators (and a couple of TODOs).
2009-06-23 20:42:29 +02:00
José Valim
d7bab3a43a
Splitting base into several files.
2009-06-23 19:45:50 +02:00
José Valim
a7ba4b95e9
TestUnit, you have a home.
2009-06-23 19:27:46 +02:00
José Valim
4494a752c3
Change current sstructure.
2009-06-23 19:10:42 +02:00
José Valim
75fbd73936
Add GeneratedAttribute.
2009-06-23 18:12:37 +02:00
José Valim
d4ec091580
Removing template runner old specs.
2009-06-23 16:58:43 +02:00
José Valim
83f7fe2028
NamedBase.
2009-06-23 16:53:48 +02:00
José Valim
301c48c15c
Added a generator file responsable for loading generator files.
2009-06-23 16:53:47 +02:00
José Valim
1845675822
Added metal generator.
2009-06-23 16:53:47 +02:00
José Valim
f03890e151
Use Rails generators files organization.
2009-06-23 16:53:47 +02:00
José Valim
04eb5b6e34
Use Rails default banner.
2009-06-23 16:53:47 +02:00
José Valim
0744900861
Merge branch 'master' of git://github.com/rails/rails
2009-06-23 16:52:39 +02:00
Yehuda Katz + Carl Lerche
80f1f863cd
Revert "Generate proper :counter_sql from :finder_sql when there is a newline character immediately following 'SELECT' [ #2118 state:resolved]"
...
This reverts commit 4851ca9e13 .
The tests do not pass for postgresql.
2009-06-22 12:04:02 -07:00
Patrick Joyce
4851ca9e13
Generate proper :counter_sql from :finder_sql when there is a newline character immediately following 'SELECT' [ #2118 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-06-21 22:07:23 +01:00
Joseph Wilk
eb30e4ca40
Fixed a bug where create_table could not be called without a block [ #2221 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-06-21 19:51:32 +01:00
Brian Hogan
b26c2c11ab
Ensure table names are quoted while renaming for sqlite3 adapter [ #2272 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-06-21 18:24:19 +01:00
=?utf-8?q?Mislav=20Marohni=C4=87?=
21cd4c0e93
Fix polymorphic_path doesn't modify options hash [ #2099 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-06-21 17:53:07 +01:00
mattbauer
83c1934003
Ensure hm:t#create respects source associations hash conditions [ #2090 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-06-21 17:35:04 +01:00
Darragh Curran
9cb8c812f2
Add content_for?(:name) helper to check if content_for(:name) is present [ #1311 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-06-21 17:07:22 +01:00
Pratik Naik
66eb05821b
Use stubbing instead of sleep() in File store cache tests
2009-06-21 15:25:28 +01:00
Pratik Naik
b5775c2b3e
Add expiry support File cache store [ #1693 state:resolved] [Roman Shterenzon, Pratik Naik]
2009-06-21 15:25:28 +01:00
José Valim
6dd196914c
Remove class level conditions and ensure that RAILS_GEM_VERSION is commented when freeze.
2009-06-20 22:04:34 +02:00
José Valim
2c3ebc00b7
More tests to app generator.
2009-06-20 16:58:15 +02:00
José Valim
181feecfb9
First stub at app generators test.
2009-06-20 15:43:25 +02:00
José Valim
68739eed57
Skip Rails::VERSION warnings.
2009-06-19 16:19:15 +02:00
José Valim
631deb5992
Removing duplicated files.
2009-06-19 16:14:49 +02:00
José Valim
5b8fe9c4c7
Moving tests to new generators schema.
2009-06-19 16:11:55 +02:00
José Valim
9dd1e2f2b0
Starting test structure.
2009-06-19 16:11:55 +02:00
José Valim
bd216924a3
No more application generator.
2009-06-19 16:11:55 +02:00
José Valim
6658711775
Template wwas not found? Raise an error.
2009-06-19 16:11:55 +02:00
José Valim
98adc9a42e
Secret key generator. You are gone.
2009-06-19 16:11:55 +02:00
José Valim
94a83007b6
Kick boot_test back to life.
2009-06-19 16:11:54 +02:00
José Valim
7a8e284766
Refactor shebang to a class method, so other generators can use it.
2009-06-19 16:11:54 +02:00
José Valim
748e1d6745
Require open-uri, we will need it.
2009-06-19 16:11:54 +02:00
José Valim
cd05ed6711
Do not show status when calling gsub_file or append_file.
2009-06-19 16:11:54 +02:00
José Valim
e0a4d8be93
Fix shebang on created files.
2009-06-19 16:11:54 +02:00
José Valim
6f044c9b6c
Change --freeze alias from -f to -F to avoid conflict with --force.
2009-06-19 16:11:54 +02:00
José Valim
768d763436
Apply template when required.
2009-06-19 16:11:54 +02:00
José Valim
9b82fa159a
Freeze rails when required.
2009-06-19 16:11:54 +02:00
José Valim
b9d8fafd7e
Update templates to be backwards compatible.
2009-06-19 16:11:54 +02:00
José Valim
090de591fc
Raise an error if invalid value for database is provided.
2009-06-19 16:11:54 +02:00
José Valim
6619357f75
When rails is invoked without args, be sure that help is called.
2009-06-19 16:11:54 +02:00
José Valim
01cde13290
Updated namespace so help can show usage properly.
2009-06-19 16:11:54 +02:00
José Valim
30fff3077d
Updated dependency, so we can remove extra code.
2009-06-19 16:11:54 +02:00
José Valim
5ff80e7433
bin/rails uses the new generator.
2009-06-19 16:11:53 +02:00
José Valim
b6f826376a
Added a couple more options to app generator.
2009-06-19 16:11:53 +02:00
José Valim
615527dcb0
Allow user to skip ActiveRecord, TestUnit and/or Prototype. However any customization should be done with templates.
2009-06-19 16:11:53 +02:00
José Valim
fef38fd542
Small alias typo.
2009-06-19 16:11:53 +02:00
José Valim
a8b3efbe5c
Moved prototypes files to where they should be.
2009-06-19 16:11:53 +02:00
José Valim
4bf8f40638
Added usage to app generator.
2009-06-19 16:11:53 +02:00
José Valim
34ed2d8d5e
Send new files too.
2009-06-19 16:11:51 +02:00
José Valim
d57b19380e
Add base and port actions. Not functional though.
2009-06-19 16:10:43 +02:00
José Valim
ceede90017
Move prototype files to javascripts folder.
2009-06-19 16:10:42 +02:00
José Valim
720aceeea9
Send new files too.
2009-06-19 16:10:42 +02:00
José Valim
ced68c7430
App generator is working using new generators (except for templates).
2009-06-19 16:10:42 +02:00
José Valim
42e51ea9c0
More tasks into app generator.
2009-06-19 16:10:42 +02:00
José Valim
489f422152
Initial scratch of application generator.
2009-06-19 16:10:42 +02:00
José Valim
8037fee9ff
Merge branch 'master' of git://github.com/rails/rails
2009-06-19 16:10:24 +02:00
Jeremy Kemper
54f4851770
Turn on autolist for debugging also
2009-06-18 21:55:13 -04:00
Jeremy Kemper
63cc6b7242
Friendlier runtime exception if delegatee is nil
2009-06-18 20:00:35 -04:00
Jeremy Kemper
50fe928c15
Delegated methods report the expected file/line in backtraces
2009-06-18 18:07:55 -04:00
Yehuda Katz + Carl Lerche
9f7eaea201
Minor ActionView cleanup
2009-06-18 12:08:50 -07:00
Yehuda Katz + Carl Lerche
497554fd10
Fix typo
2009-06-18 11:14:44 -07:00
Jeremy Kemper
5267addd4f
Use errors[field] instead of errors.on(field)
2009-06-17 19:37:56 -07:00
Joshua Peek
fbdf706fff
Add basic JSON serializer to AMo
2009-06-17 21:27:54 -05:00
Joshua Peek
af5301089f
Add simple attribute implementation backed by ivars
2009-06-17 21:27:54 -05:00
Joshua Peek
d5d59230f4
Simplify AMo validation attribute reader
2009-06-17 21:27:54 -05:00
Yehuda Katz + Carl Lerche
b4a91db441
Extract the layout proc into a method, and write documentation explaining what the proc does in various cases.
2009-06-17 18:55:10 -07:00
Yehuda Katz + Carl Lerche
ca8f8fb031
Remove one more note about deprecated behavior
2009-06-17 18:15:41 -07:00
Yehuda Katz + Carl Lerche
a9ad763c86
Drive the final stake through @content_for_*'s heart!
2009-06-17 18:08:45 -07:00
Yehuda Katz + Carl Lerche
65102c8f1a
Cleaning up more tests and code that needed to work in both old and new base
2009-06-17 16:51:51 -07:00
Yehuda Katz + Carl Lerche
55ee0ba7f5
Cleaning up if defined?(ActionController::Http) blocks from the pre new base era.
2009-06-17 16:23:11 -07:00
Yehuda Katz + Carl Lerche
8fdf3d7890
Remove some defined?(Http) checks
2009-06-17 16:14:05 -07:00
Yehuda Katz + Carl Lerche
251a6e492c
Rename path.rb to resolver.rb
2009-06-17 15:39:41 -07:00
Yehuda Katz + Carl Lerche
d8f352e970
Rename ActionView::Template::Path ActionView::Resolver
2009-06-17 15:32:55 -07:00
Yehuda Katz + Carl Lerche
7ac9f29093
Updated require for AMo move
2009-06-17 13:05:14 -07:00
Yehuda Katz + Carl Lerche
6927f1119b
Finish making pending tests pass
2009-06-17 12:54:19 -07:00
Yehuda Katz + Carl Lerche
487312515c
RJS doesn't render with an HTML layout by default
2009-06-17 12:54:19 -07:00
Yehuda Katz + Carl Lerche
4fad953f90
Fixing pending tests and fixed some formats / partial rendering semantics
2009-06-17 12:54:19 -07:00
Yehuda Katz + Carl Lerche
de388ba864
Fix pending test about content-type
2009-06-17 12:54:18 -07:00
Emilio Tagua
3e4452c73f
Forget about auto scope, it's always explicit.
2009-06-17 15:10:57 -03:00
Joshua Peek
1c4d28ba31
Move model naming into ActiveModel
2009-06-17 10:37:39 -05:00
José Valim
908b5305d4
Convert line breaks.
2009-06-17 11:26:32 +02:00
Yehuda Katz + Carl Lerche
85f2f34d5e
Remove a stray process2 require
2009-06-16 16:29:33 -07:00
Yehuda Katz + Carl Lerche
315147fcb5
Move the exceptions for missing template into Compatibility in prep for moving it into a "not-production" module
2009-06-16 13:54:55 -07:00
Yehuda Katz + Carl Lerche
dd58f4021d
An exception is raised if a layout is missing only if the layout is missing for all mimes
2009-06-16 13:44:51 -07:00
Emilio Tagua
16ac353f4c
Merge commit 'rails/master'
2009-06-16 16:59:12 -03:00
Yehuda Katz + Carl Lerche
01a4bc84b8
Exceptions now in an exceptions module
2009-06-16 11:32:38 -07:00
Yehuda Katz + Carl Lerche
a6e803bee1
Remove exceptions from AbstractUnit so they work in real life
2009-06-16 11:20:28 -07:00
Yehuda Katz + Carl Lerche
18c3b77b23
Merge process2 into process to people's regular tests run :P
2009-06-16 10:46:03 -07:00
Yehuda Katz + Carl Lerche
1fbfa3e705
More _write_layout_method removal
2009-06-15 17:33:25 -07:00
Yehuda Katz + Carl Lerche
3c15cba175
Whoops, I guess we broke layouts ;)
2009-06-15 17:32:10 -07:00
Yehuda Katz + Carl Lerche
19c3495a67
rm -r controller/base!
2009-06-15 16:29:45 -07:00
Yehuda Katz + Carl Lerche
7b1f483fda
Get all of rake tests to pass
2009-06-15 16:14:45 -07:00
Yehuda Katz + Carl Lerche
c7ba9aa195
Get the new base tests to pass
2009-06-15 15:56:18 -07:00
Yehuda Katz + Carl Lerche
0e558f0bbd
Get the AR integration tests to pass
2009-06-15 15:55:09 -07:00
Yehuda Katz + Carl Lerche
5314abed18
Keep ActionMailer using the old layouts code until it gets refactored.
2009-06-15 11:59:28 -07:00
Yehuda Katz + Carl Lerche
80d1e27788
Fix the fixture path
2009-06-15 11:50:11 -07:00
Yehuda Katz + Carl Lerche
a63caa4c0c
Get tests to run (with failures) without old base around
2009-06-15 11:44:45 -07:00
Yehuda Katz + Carl Lerche
614374b3e5
Require missing file in AS
2009-06-15 11:31:52 -07:00
Yehuda Katz + Carl Lerche
64ae5b56ff
Fix failing tests in new callbacks
2009-06-15 11:26:47 -07:00
Yehuda Katz + Carl Lerche
5a8a550a45
Finish making things pass with updated internal content_type semantics
2009-06-15 11:21:08 -07:00
Joshua Peek
c50b03b754
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:23 -05:00
Xavier Noria
b56169c262
moves reopening of core classes to add generic stuff from Action Pack to AS/core_ext and adds tests
...
[#2798 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-06-13 15:01:14 -07:00
Luca Guidi
9eeb5fed2f
Bytes calculation speed up
...
[#2800 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-06-13 14:03:45 -07:00
Xavier Noria
d32965399c
uses Object#metaclass and Object#class_eval in a few spots
...
[#2797 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-06-12 16:14:06 -07:00
Emilio Tagua
34a068d053
Leave the quoting part to ARel
2009-06-12 18:09:48 -03:00
Adam Milligan
54a5446641
HasOneThroughAssociation still shouldn't derive from HasManyThroughAssociation.
...
[#1642 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-06-12 13:52:51 -07:00
Emilio Tagua
8db190acba
HasOneAssociation inherits AssociationProxy since it shares nothing with BelongsToAssociation.
...
[#2796 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-06-12 13:45:25 -07:00
Emilio Tagua
a924b2f66e
Merge commit 'rails/master'
2009-06-12 16:20:27 -03:00
Joshua Peek
8f7c657f4b
Move observing notify helper into AMo
2009-06-11 13:41:48 -05:00
Joshua Peek
c4e440b1d2
Fix observing AS dependencies
2009-06-11 13:21:56 -05:00
Joshua Peek
4d70359200
Integrate ActiveModel::Observing into ActiveRecord
2009-06-10 23:36:44 -05:00
Andrew Kaspick
59c83af18b
allow absolute paths for the asset caches
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-11 16:33:32 +12:00
Emilio Tagua
247ac95413
Merge commit 'rails/master'
2009-06-10 19:54:27 -03:00
Emilio Tagua
d7b98b3ca8
Arel updated
2009-06-10 19:54:08 -03:00
Emilio Tagua
d127831d9e
Merge branch 'update_all'
2009-06-10 19:46:47 -03:00
Emilio Tagua
af9f9dd02c
Use array of orders instead of string concatenation
2009-06-10 19:46:35 -03:00
Emilio Tagua
71528c2921
Initial update_all migration
2009-06-10 19:36:45 -03:00
Yehuda Katz + Carl Lerche
47ff57f6d1
Document and clean up HideActions and Http
2009-06-10 15:27:53 -07:00
Yehuda Katz + Carl Lerche
82a10ce9f6
Removed unnecessary code
2009-06-10 14:43:43 -07:00
Yehuda Katz + Carl Lerche
fbb6b936e9
Document ActionController::Helpers
2009-06-10 14:28:58 -07:00
Yehuda Katz + Carl Lerche
316fab7de6
Cleaned up the #default_helper_module method to make better use of #helper instead of duplicating code.
2009-06-10 14:15:21 -07:00
Emilio Tagua
0587462050
Revert "Use ARel in SQL generation through associations"
...
This reverts commit 7be3e3ba05 .
2009-06-10 17:32:20 -03:00
Emilio Tagua
7be3e3ba05
Use ARel in SQL generation through associations
2009-06-10 17:31:26 -03:00
Emilio Tagua
8c3b8323f5
Use ARel in SQL generation through associations
2009-06-10 16:36:05 -03:00
Yehuda Katz + Carl Lerche
37be453a87
Adding "test" to the lib directory when running action pack tests on new base
2009-06-10 12:26:03 -07:00
Yehuda Katz + Carl Lerche
4fc0778123
Simplify helper use of ActiveSupport::Dependencies, and use super better for in #helpers
2009-06-10 12:15:30 -07:00
Michael Koziarski
c014c3e5c1
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:12:21 +12:00
Yehuda Katz + Carl Lerche
b6fde6b480
Clean up AbstractController::Logger and write documentation
2009-06-09 17:03:02 -07:00
Yehuda Katz + Carl Lerche
f35f47b8c0
Cleaning up and documenting AbstractController::Layouts
2009-06-09 16:47:40 -07:00
Yehuda Katz + Carl Lerche
acb2447785
Write documentation for AbstractController::Helpers
2009-06-09 16:47:39 -07:00
Matt Jones
d7e0cb05cc
Fix incorrect specification path in GemDependency#from_directory_name
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-10 09:57:58 +12:00
Brian Lopez
69bc2043f9
enable *real* IO parsing for the libxml, nokogiri and rexml backends [ #2659 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-06-09 09:01:50 -05:00
Emilio Tagua
103b282130
Merge commit 'rails/master'
2009-06-09 10:29:55 -03:00
Stephen Anderson
a94e7d7897
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:45 +12:00
David Stevenson
a14df8c9b2
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:28:43 +12:00
Raimonds Simanovskis
63091cef2e
disabled base_test.rb tests that were not Oracle compatible (TIME datatype is not supported on Oracle, UPDATE does not support ORDER BY) _before_type_cast on Oracle returns Time and not String added Oracle specific schema definition that was missing for test_default_values test
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-09 20:26:55 +12:00
Friedrich Göpel
1d57ccbc6f
1.9 compatibility - don't pass an array as the from address as this ends up generating invalid SMTP commands.
2009-06-09 20:22:20 +12:00
Eugene Pimenov
74c1249d07
PostgreSQL adapter should call thread safe quote_string function
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-09 20:12:01 +12:00
Michael Koziarski
99803b7cdb
Pull autoload fix from 2-3-stable
2009-06-09 20:10:21 +12:00
Matt Jones
41a94048e5
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:38 +12:00
nate
f68cc639f5
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:53 +12:00
Yehuda Katz
114e25e735
Further cleanup of callbacks
2009-06-09 19:47:53 +12:00
Yehuda Katz
8cae3cd0cf
More pruning of NewCallbacks
2009-06-09 19:47:53 +12:00
Jeremy Kemper
e9a6255938
Lazier Rakefile requires to avoid needing full rake gem on 1.9
2009-06-08 20:49:21 -07:00
Jeremy Kemper
23f3b567e2
Uses Hash#symbolize_keys
2009-06-08 19:37:52 -07:00
Jeremy Kemper
5b256ac369
Prefer JSON.encode(value) to value.to_json
2009-06-08 19:37:52 -07:00
Jeremy Kemper
14de1a9597
each yields per message not per attribute
2009-06-08 19:37:51 -07:00
Jeremy Kemper
e1f679a020
Simplify json decoder backend lazy load
2009-06-08 19:37:51 -07:00
Jeremy Kemper
6e73cf6bdf
Fix AR json encoding
2009-06-08 19:37:51 -07:00
Jeremy Kemper
99cf77be27
Add #element and #collection to ModelName
2009-06-08 19:37:50 -07:00
Jeremy Kemper
d9f16fafec
Update for Active Model yielding per error not per attribute
2009-06-08 19:37:50 -07:00
Joshua Peek
27766ccf3b
Make use of AS::Concern in ActiveResource
2009-06-08 20:52:27 -05:00
Joshua Peek
0b694a4ff4
Setup ActiveResource autoloads
2009-06-08 20:48:14 -05:00
Joshua Peek
28f36279cd
Properly require ActiveModel validation dependencies
2009-06-08 20:32:08 -05:00
Joshua Peek
01515f8ecd
Fix activesupport path
2009-06-08 19:59:56 -05:00
Yehuda Katz + Carl Lerche
be371993b7
More documentation work on AbstractController
...
This is still not completely done and there might be pointers to things that don't exist yet.
2009-06-08 17:41:08 -07:00
Yehuda Katz + Carl Lerche
38b608ecab
Writing comments to AbstractController
2009-06-08 16:15:14 -07:00
Yehuda Katz + Carl Lerche
a470bb3612
Remove extraneous response_obj
2009-06-08 16:15:13 -07:00
Jeremy Kemper
30a3b6b4fc
Ruby 1.9: fix json encoding
2009-06-08 15:16:47 -07:00
Jeremy Kemper
d3078b540e
Explicitly qualify constants in BasicObjects
2009-06-08 15:07:52 -07:00
Yehuda Katz + Carl Lerche
c1fcabb350
Remove duplicate
2009-06-08 14:26:22 -07:00
Jeremy Kemper
a6bf6f275c
Use as_json instead of rails_to_json
2009-06-08 14:08:04 -07:00
Yehuda Katz + Carl Lerche
86fc43fd58
ActionPack components should no longer have undeclared dependencies.
...
* Tests can be run in isolation
* Dependencies added
* A few tests modified to avoid depending on AS deps
not depended on my files they were testing
2009-06-08 13:34:07 -07:00
Jeremy Kemper
00ee990443
JSON: split encoding and coercion
2009-06-08 13:21:30 -07:00
Jeremy Kemper
5e1b46d4c2
Don't rely on Rails.logger
2009-06-08 01:40:14 -07:00
Geoff Buesing
7fe8b630ce
Add notes to TZInfo bundling task
2009-06-07 22:09:21 -05:00
Geoff Buesing
71b1a4b39d
Kathmandu TimeZone: reference Asia/Kathmandu zone directly instead of through linked timezone
2009-06-07 21:43:44 -05:00
Geoff Buesing
184986067a
Load correct version of TZInfo
2009-06-07 21:36:09 -05:00
Jason Frey (Fryguy)
1d9346428b
String #to_time and #to_datetime: handle fractional seconds [ #864 state:resolved]
2009-06-07 20:16:08 -05:00
Geoff Buesing
04eb2b72b4
Update bundled TZInfo to v0.3.13
2009-06-07 20:00:25 -05:00
Tim Connor
6a3f8ae407
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 21:54:56 -07:00
Jeremy Kemper
ccf70b9570
Pull in time extensions also
2009-06-05 18:27:27 -07:00
Jeremy Kemper
a838ba392e
Prefer sibling action_controller
2009-06-05 18:27:27 -07:00
Yehuda Katz
d6e4113c83
YAGNI Method references. Deprecated
2009-06-02 22:06:21 -07:00
Yehuda Katz
6b4da2ecac
Add explicit requirement in a few cases it was missing.
...
TODO: Come up with the minimal core and remove all of these
2009-06-02 21:43:54 -07:00
Yehuda Katz
1126a85aed
Further cleaning up new callbacks
2009-06-02 21:41:31 -07:00
Yehuda Katz
971e2438d9
Simplify callbacks to use less metaprogramming
2009-06-02 19:00:59 -07:00
Emilio Tagua
fd3c55f09f
Merge commit 'rails/master'
...
Conflicts:
activerecord/lib/active_record.rb
2009-06-02 12:36:36 -03:00
Emilio Tagua
5255a81b80
Updated Arel submodule
2009-06-02 12:33:51 -03:00
Emilio Tagua
2474fbb4d6
Set ActiveRecord as Arel engine on load.
2009-06-02 12:29:09 -03:00
Emilio Tagua
bbe51a1b9d
No need to specify the engine now that it is in active_record.rb
2009-06-02 12:27:26 -03:00
Emilio Tagua
522711952b
Refactors to work with latest Arel implementation.
2009-06-02 11:40:01 -03:00
Yehuda Katz + Carl Lerche
196f780e30
Get all the callback tests to work on new base
2009-06-01 15:40:40 -07:00
Jeremy Kemper
dcba6e1148
Fix initializer i18n path test
2009-06-01 13:44:43 -07:00
Jeremy Kemper
94911c7af7
Ensure ERB source begins with the encoding comment
2009-06-01 12:34:08 -07:00
Han Kessels
9537fd0e3a
fix for IE incompatibility of :disable_with in submit_tag
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-01 14:03:52 +12:00
Giles Alexander
532219fd09
Schema dumper now records scale 0 decimal columns as decimal not integer.
...
The schema dumper would dump out any decimal or numeric column that had a zero
scale as an integer column. This will cause problems for very large precision
columns on some DBMSs, particularly PostgreSQL. It also looks strange to see
your column change type after moving through schema.rb.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2741 state:committed]
2009-06-01 13:40:05 +12:00
Jeff Dean
b3839f1c98
Updated the db:structure:dump task to properly format the pgdump command when you have multiple schemas in your schema search path.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2695 state:committed]
2009-06-01 12:12:45 +12:00
Vladimir Dobriakov
64756e8f71
better db:create for mysql - do not assume root user
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1459 state:committed]
2009-06-01 12:09:19 +12:00
Jeremy Kemper
f9bd10054c
Sidestep need for Kernel#silence_warnings
2009-05-30 11:59:17 -07:00
Jeremy Kemper
c79551f02b
Depend on Hash#slice and Object#try
2009-05-30 11:59:17 -07:00
Jeremy Kemper
85eb3af873
Tolerate missing logger
2009-05-30 11:59:17 -07:00
Jeremy Kemper
3962be5b8c
Use URI and Inflector
2009-05-30 11:59:17 -07:00
Jeremy Kemper
c53057d4fd
html-scanner uses Set and class_inheritable_accessor
2009-05-30 11:59:17 -07:00
Jeremy Kemper
249d9a6606
Depend on Hash#diff extension
2009-05-30 11:59:17 -07:00
Jeremy Kemper
5481e54175
AM::StateMachine autoloads
2009-05-30 11:59:16 -07:00
Joshua Peek
a1140a1031
Revert "Only save the session if we're actually writing to it [ #2703 state:resolved]"
...
This reverts commit dd98280e38 .
2009-05-30 09:36:08 -05:00
Luke Melia
54984f0f24
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-05-30 09:35:25 -05:00
Joshua Peek
e7d6f48ea9
Use AS::Concern in ActiveModel
2009-05-30 09:35:24 -05:00
Pratik Naik
e767c65cc9
Make sure tests pass action name to Controller.action()
2009-05-30 15:18:46 +01:00
Pratik Naik
63992e8f3a
Support Object#filter method for before/after filters
2009-05-30 15:14:23 +01:00
Joshua Peek
669fd84910
AS::Concern redefines "include" to lazy include modules as dependencies
2009-05-29 17:03:23 -05:00
Joshua Peek
c7c35be8fe
AS::Concern includes InstanceMethods module if it exists
2009-05-29 16:28:54 -05:00
Joshua Peek
69742ca8fa
Merge branch 'master' into active_model
...
Conflicts:
activemodel/lib/active_model/core.rb
activemodel/test/cases/state_machine/event_test.rb
activemodel/test/cases/state_machine/state_transition_test.rb
activerecord/lib/active_record/validations.rb
activerecord/test/cases/validations/i18n_validation_test.rb
activeresource/lib/active_resource.rb
activeresource/test/abstract_unit.rb
2009-05-29 16:06:21 -05:00
Jeremy Kemper
5ec2c7dc29
Ruby 1.9: ERB template encoding using a magic comment at the top of the file
2009-05-28 17:12:48 -05:00
Jeremy Kemper
e23554d79e
Ruby 1.9: flushing the output buffer preserves its encoding
2009-05-28 17:12:48 -05:00
Jeremy Kemper
d120f9de7e
Reinstate pending output buffer tests
2009-05-28 17:12:48 -05:00
Jeremy Kemper
cf3ccd7be0
Ruby 1.9: use UTF-8 for default internal and external encodings.
2009-05-28 17:12:48 -05:00
Joshua Peek
4e50a35fa2
Break up DependencyModule's dual function of providing a "depend_on" DSL and "included" block DSL into separate modules. But, unify both approaches under AS::Concern.
2009-05-28 11:35:36 -05:00
Joshua Peek
de203245af
Revert "Revert "Whitespace!""
...
This reverts commit 0cac68d3be .
2009-05-28 09:49:02 -05:00
Johan Sörensen
dd98280e38
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:35:17 -05:00
Johan Sörensen
72cb6f58be
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:30:49 -05:00
Olly Legg
0349278f3d
Memoize cookies so that updates to cookies are available in the current request. [ #2733 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-28 09:18:27 -05:00
Joshua Peek
d17fb9dc76
Fix script/server's default mount path [ #2731 state:resolved]
2009-05-28 09:16:29 -05:00
Yehuda Katz + Carl Lerche
f2f58f5355
Fix failing ActionCacheFilter tests due to around filter changes.
2009-05-27 17:31:48 -07:00
Yehuda Katz + Carl Lerche
1e2628431a
Added support to new callbacks for around filter object that respond to :before & :after used in before|after callbacks
2009-05-27 16:50:40 -07:00
Yehuda Katz + Carl Lerche
2b166d306c
Added support to new callbacks for around filter object that respond to :before & :after
2009-05-27 16:49:23 -07:00
Yehuda Katz + Carl Lerche
bd7e3dc47d
Added a compatibility layer to get legacy filter tests to pass on new base
2009-05-27 16:49:04 -07:00
Yehuda Katz + Carl Lerche
e70bd6bdfa
Added hook point in new base #send_action which does the actual action method dispatching
2009-05-27 16:16:33 -07:00
Carl Lerche
a5688fa907
Add the ability to prepend filters to new callbacks
2009-05-27 16:15:53 -07:00
Hongli Lai (Phusion)
760cb63339
Make the default 500 Internal Server Error page more friendly. Many people don't know they're supposed to look in the log files. [ #2716 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-27 15:01:03 -05:00
calavera
0d9e904da3
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:14 -05:00
Joshua Peek
6ef329d325
Ensure Memcache local cache returns duplicated values [ #2302 state:resolved]
2009-05-27 14:54:58 -05:00
Eduard Bondarenko
61c471eebb
Add % to RESERVED_PCHAR [ #2574 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-27 14:53:05 -05:00
Niels Ganser
bb8e5843f3
ActionController::Flash::FlashHash.use now returns either the value corresponding to the passed key or itself when no key is passed [ #1792 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-27 14:51:33 -05:00
anupom syam
746f3860c1
server command help inconsistency fix [ #2685 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-27 14:45:16 -05:00
Chad Woolley
5679bf64d5
Fix failing CI test (broken in 2daac47 or e693f45): make test_multipart_with_template_path_with_dots only test path with dots, and stop failing on unrelated mimetype assertion. The image/jpeg multipart content type is already tested in test_explicitly_multipart_messages.
...
Signed-off-by: Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local >
2009-05-27 21:38:23 +02:00
Fabien Jakimowicz
2cb60abfec
Add an model_subclass generator.
...
This generator creates a new model as a subclass of an existing model and the unit test for that model. Lets users avoid having to manually delete the fixtures and migration or remember to pass those arguments.
[#2702 state:committed]
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-05-27 13:14:04 +02:00
Yehuda Katz
eaf8fe7708
Merge branch 'master' of git@github.com:rails/rails
2009-05-27 10:40:55 +02:00
Yehuda Katz
6bbe965ccd
Reduce the cost of using ActionController::Http significantly by:
...
* Removing the dependency on AD::Request and AD::Response
* Moving the logic for the request and response object
into a new module that is included by default.
* Changing Renderer and Redirector to use self.headers,
self.content_type, and self.status, which have very basic
default implementations on AC::Http. When RackConvenience
is included (which it is by default on AC::Base), the full
Request/Response logic is used instead of the simple logic.
2009-05-27 10:40:43 +02:00
Jeremy Kemper
d73f2ff434
Rename tools/profile_requires -> tools/profile since we do both require and ruby-prof profiling.
2009-05-27 01:11:33 -05:00
Jeremy Kemper
311d686d03
add a metal to minimal examples for comparison
2009-05-27 01:00:02 -05:00
Carl Lerche
7211048b2b
Get all template tests passing on new base
2009-05-26 15:19:39 -07:00
Carl Lerche
a1f280e83d
Got all the dispatch tests running on new base
2009-05-26 15:03:09 -07:00
Carl Lerche
1358f77745
Add controller/integration_test.rb to the new base test runner
2009-05-26 14:24:22 -07:00
Carl Lerche
a3ca5638d3
Get controller/test_test.rb to pass on new base
2009-05-26 14:13:35 -07:00
Carl Lerche
7dd094329e
Add html-scanner to the new base set of autoloads
2009-05-26 13:40:58 -07:00
Carl Lerche
09907d1b93
Get controller/view_paths_test.rb to pass on new base
2009-05-26 12:14:50 -07:00
Carl Lerche
cbb0724f0d
In new base Rails2Compatibility, move @template assignment to right before the first action is processed.
2009-05-26 12:06:48 -07:00
Carl Lerche
cd8fb1800d
Remove a no-op from view path tests and removed a Symbol#to_proc
2009-05-26 11:47:42 -07:00
Emilio Tagua
b3d4054692
Merge commit 'rails/master'
2009-05-26 11:34:02 -03:00
Pratik Naik
2f59066470
Support Method callbacks
2009-05-26 13:09:33 +02:00
Pratik Naik
10085114ce
Make Filter#filter work with around filters
2009-05-25 18:09:12 +02:00
Pratik Naik
9cda410d81
Make cookie store tests pass with the new base
2009-05-25 16:52:44 +02:00
Jeremy Kemper
8097da93cc
Don't want Rack's Content-Type default header though
2009-05-24 19:25:53 -07:00
Jeremy Kemper
b1d4fb71bf
Construct a single HeaderHash. Speed up assign_default_content_type_and_charset
2009-05-24 17:35:49 -07:00
Jeremy Kemper
bdb61c1dad
Compare Base with Http
2009-05-24 17:34:40 -07:00
Jeremy Kemper
6e039e863a
Speed up Request#formats
2009-05-23 19:30:23 -07:00
Jeremy Kemper
a78b0a40c6
runner class
2009-05-23 19:30:18 -07:00
Jeremy Kemper
4e3fd23e31
test depends on html-scanner
2009-05-23 03:10:48 -07:00
Yehuda Katz
e0ed4b7aa4
Make a couple more tests pass.
...
A large number of the remaining failing tests have to do with
the semantics of filters that are Objects. The right solution
is probably to just implement the filter/before/after semantics
in NewCallbacks directly (the current semantics are based
on the old AS::Callbacks specs)
2009-05-23 01:30:25 -07:00
Yehuda Katz
e22a3d893e
Slightly modify things to get content type matching working without breaking other code
2009-05-23 00:39:32 -07:00
Pratik Naik
3ac6d8f8b0
Remove unnecessary asset_host initialization
2009-05-23 02:35:34 +02:00
Pratik Naik
9286d422f8
Add asset_host to Rails2Compatibility
2009-05-23 02:29:55 +02:00
Yehuda Katz + Carl Lerche
5097bd6241
Modify render_test's determine_layout to match RJS
2009-05-22 17:26:27 -07:00
Jeremy Kemper
fb64263c91
Restore some missing test constants
2009-05-22 17:22:37 -07:00
Pratik Naik
595107f22e
Move html-scanner tests one dir up
2009-05-23 02:21:07 +02:00
Yehuda Katz + Carl Lerche
69a1ea8b5d
Created an ActionController::Renderers::All that includes all the default render options (:json, :js, :rjs, :xml)
2009-05-22 17:17:16 -07:00
Jeremy Kemper
da9e53ec3b
Move testing_sandbox to test/lib
2009-05-22 17:17:14 -07:00
Jeremy Kemper
8a03a999ef
Cordon off missing filter methods
2009-05-22 17:16:03 -07:00
Yehuda Katz + Carl Lerche
7b3fb1d43f
Got controller/render_js_test.rb to pass on new base
2009-05-22 17:08:58 -07:00
Pratik Naik
3a72b55229
Add missing selector_test to the list
2009-05-23 02:08:07 +02:00
Jeremy Kemper
f9dde8fe4e
Port cookies to new base
2009-05-22 17:05:44 -07:00
Pratik Naik
c90f613ad6
Add Translation to the new base
2009-05-23 02:03:22 +02:00
Yehuda Katz + Carl Lerche
28dbeb3a64
Get controller/render_other_test.rb to pass on new base and fixed a bug in new base with regards to rendering layouts.
2009-05-22 16:55:27 -07:00
Yehuda Katz + Carl Lerche
63ed43cb99
Added render_other_test.rb to the new base test runner
2009-05-22 16:55:27 -07:00
Pratik Naik
b77602824a
Add some more tests to the test_new_base_on_old_tests task
2009-05-23 01:46:37 +02:00
Pratik Naik
f766f66946
Make logging_test pass with the new base
2009-05-23 01:36:09 +02:00
Jeremy Kemper
a01d2a2586
Remove gratuitous filter_chain internal testing. Not part of the API and other tests are sufficient to catch regressions.
2009-05-22 16:25:49 -07:00
Jeremy Kemper
444480c9a5
Verbose test_new_base_on_old_tests
2009-05-22 16:23:48 -07:00
Jeremy Kemper
b7c031f52e
Move active_record_unit to shared load path
2009-05-22 16:21:21 -07:00
Jeremy Kemper
ca72078388
Move fake controllers and models to a common load path
2009-05-22 16:11:54 -07:00
Jeremy Kemper
98f856d772
Set ENV['NEW'] to run any test task with the new Base.
2009-05-22 15:32:35 -07:00
Jeremy Kemper
3c13551aa2
Complain if new_base/abstract_unit was already loaded
2009-05-22 15:32:35 -07:00
Jeremy Kemper
df2d96a7f0
Move misplaced test
2009-05-22 15:32:35 -07:00
Pratik Naik
8a336d01d2
Use super wherever possible in ActionController::Helpers#helper
2009-05-23 00:30:32 +02:00
Yehuda Katz + Carl Lerche
72a574b507
Get controller/layout_test.rb running on new base except for ActionController::Base.exempt_from_layout which is going to be deprecated.
2009-05-22 15:25:13 -07:00
Yehuda Katz + Carl Lerche
01129534cd
Cleaned up the #render_to_body chain by extracting determining the templates to render to a separate hook point.
2009-05-22 15:24:31 -07:00
Pratik Naik
e976c489e6
Add all the existing helpers related features to the new base
2009-05-23 00:17:10 +02:00
Pratik Naik
1d168afcb1
Move FilterParameterLogging to a stand alone module and make it work on new base
2009-05-22 19:51:17 +02:00
Pratik Naik
faaff383e6
Add assert_select tests to the new base
2009-05-22 19:03:27 +02:00
Pratik Naik
9d08f86cd4
Make assertion tests pass with the new base
2009-05-22 19:01:52 +02:00
Pratik Naik
d1d9a6c261
Require ruby-debug from new_base/abstract_unit
2009-05-22 18:15:43 +02:00
Jeremy Kemper
1fa7e3322d
Ruby 1.9 compat: don't rely on lexical scoping since the included block is called from dependency_module
2009-05-21 20:54:28 -07:00
Jeremy Kemper
4c52ba278b
Move Safari response-padding fix to Rails2Compatibility. Should be a Rack concern.
2009-05-21 20:27:24 -07:00
Jeremy Kemper
8f3cbb4773
Dead local
2009-05-21 20:27:24 -07:00
Jeremy Kemper
e0e124757a
Fewer runs by default
2009-05-21 20:27:24 -07:00
Yehuda Katz + Carl Lerche
68a207ccf6
Implemented layout conditions in new base
2009-05-21 18:14:20 -07:00
Yehuda Katz + Carl Lerche
6923b392b7
Added the :rjs render option
2009-05-21 16:35:40 -07:00
Yehuda Katz + Carl Lerche
e773d0e68a
Renamed #implicit_render to #default_render in new base to support the default_render API
2009-05-21 16:31:05 -07:00
Pratik Naik
1a52b246eb
Add HTTP Authentication to the new base
2009-05-22 00:29:47 +02:00
Pratik Naik
d2cac9dd0e
Add missing dependency in Streaming
2009-05-22 00:27:08 +02:00
Yehuda Katz + Carl Lerche
9d3d774670
Update render options to remove performance implications of many render options types
2009-05-21 15:23:52 -07:00
Yehuda Katz + Carl Lerche
ad1c90de3a
Added the :xml render option
2009-05-21 14:51:29 -07:00
Yehuda Katz + Carl Lerche
2daac47d58
Added the ability to register methods to handle specific render option keys and render :json
2009-05-21 14:36:00 -07:00
Yehuda Katz + Carl Lerche
e693f45e15
Remove some response content type concepts from ActionView
2009-05-21 14:34:56 -07:00
Pratik Naik
386ff66e5e
Add Streaming to new base
2009-05-21 21:48:42 +02:00
Pratik Naik
59b32f2883
RequestForgeryProtection now works with the new base
2009-05-21 21:48:42 +02:00
Jeremy Kemper
886eeed52e
Clean up tools/profile_requires a bit
2009-05-21 10:22:35 -07:00
Chad Woolley
0f1b283e03
Fix eager association test related to different ordering on sqlite
...
[#2686 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-05-21 10:01:47 -07:00
Jeremy Kemper
e9a7545123
Avoid uninitialized instance variable warning
2009-05-20 18:12:45 -07:00
Jeremy Kemper
428829fc38
Single-require forward compatibility with new Ruby features like Object#tap, Enumerable#group_by, and Process.daemon. Code with the latest but run anywhere.
2009-05-20 18:12:45 -07:00
Jeremy Kemper
886aa2f0e1
Extract autoloads
2009-05-20 18:12:45 -07:00
Jeremy Kemper
5f222c524e
Remove 'core' fluff. Hookable ActiveSupport.load_all!
2009-05-20 18:12:44 -07:00
Jeremy Kemper
3694227f24
Break out Symbol#to_proc as a future-ruby extension
2009-05-20 18:12:44 -07:00
Jeremy Kemper
6839883854
Break up misc Object extensions
2009-05-20 18:12:44 -07:00
Jeremy Kemper
429a00f225
Remove bad add
2009-05-20 18:12:44 -07:00
Pratik Naik
5a03645762
Allow Module#depends_on to accept multiple modules
2009-05-21 03:04:17 +02:00
Pratik Naik
e21d1614bb
Made ActionController::Verification work with new_base
2009-05-21 02:55:25 +02:00
Yehuda Katz + Carl Lerche
7f7fdc407a
Make controller/content_type_test.rb pass on new base
2009-05-20 17:42:04 -07:00
Yehuda Katz + Carl Lerche
c8eda9ade4
Fixed new_base tests on ruby 1.9
2009-05-20 17:22:29 -07:00
Yehuda Katz + Carl Lerche
c4a6109286
Got controller/mime_responds_test.rb running on the new base
2009-05-20 16:54:21 -07:00
Pratik Naik
8e7a87d299
Make ActionController::Flash work with new_base
2009-05-21 01:41:35 +02:00
Jeremy Kemper
205cfe2163
Massage setup for old tests on new base
2009-05-20 16:23:55 -07:00
Jeremy Kemper
c86ec82cf6
Wrap string body in an array
2009-05-20 16:01:21 -07:00
Jeremy Kemper
b46c9071c3
Ruby 1.9 stdlib gems don't recognize .pre yet
2009-05-20 16:01:21 -07:00
Yehuda Katz + Carl Lerche
77d955c517
Added passing old tests on new base to the main test runner
2009-05-20 15:54:29 -07:00
Yehuda Katz + Carl Lerche
01f032f256
Added responds_to to new base.
2009-05-20 15:34:26 -07:00
Pratik Naik
c03b0ca7eb
Replace the class level Rack::Test DSL with the regular integration tests DSL
2009-05-20 21:15:06 +02:00
Joshua Peek
6761759a90
Temporarily bundle rack-test while MockSession is baking
2009-05-19 22:43:22 -05:00
Bryan Helmkamp
df0faea378
Refactor ActionController instantiation capture
2009-05-19 22:43:21 -05:00
Bryan Helmkamp
0029d5e594
Integrating Rack::MockSession (from Rack::Test)
2009-05-19 22:43:21 -05:00
Yehuda Katz + Carl Lerche
321168b17b
Make old caching tests pass on new base.
2009-05-19 18:11:45 -07:00
Yehuda Katz + Carl Lerche
67cc021d01
Modified caching implementation to work with NewBase
2009-05-19 18:11:45 -07:00
Yehuda Katz + Carl Lerche
0e7da0e4a0
Include caching module into new base
2009-05-19 18:11:44 -07:00
Yehuda Katz + Carl Lerche
26f2be01c2
Modify caching to use new included helper
2009-05-19 18:11:44 -07:00
Yehuda Katz + Carl Lerche
67247ca8ee
Corrected new callbacks semantics with regards to using objects for around filters.
2009-05-19 18:11:44 -07:00
Bryan Helmkamp
36058f4504
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:04 -07:00
Emilio Tagua
aa55122990
Merge commit 'rails/master'
2009-05-19 19:37:36 -03:00
Pratik Naik
d8fffe7b23
Replace ad hoc Rack::Test with ActionController::IntegrationTest
2009-05-20 00:06:14 +02:00
Pratik Naik
f503a5dc97
Missing CHANGELOG entry for 4a6f4b92ad
2009-05-19 23:57:49 +02:00
Pratik Naik
4a6f4b92ad
Change integration test helpers to accept Rack environment instead of just HTTP Headers.
...
Before : get '/path', {}, 'Accept' => 'text/javascript'
After : get '/path', {}, 'HTTP_ACCEPT' => 'text/javascript'
2009-05-19 23:50:03 +02:00
Jeremy Kemper
0bdef30f35
Lazy-require Kernel#silence_warnings
2009-05-19 12:19:58 -07:00
Bryan Helmkamp
e2ed1a1ca4
Allow MemCacheStore to be initialized with a MemCache object instead of addresses and options
2009-05-19 10:54:56 -07:00
Chad Woolley
6dc3a6a954
Upgrade CI server to latest RubyGems [ #2665 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-19 12:50:26 +02:00
Emilio Tagua
20deb677a2
Add missing models and fixtures [ #2673 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-19 12:11:46 +02:00
Yehuda Katz + Carl Lerche
07f733c631
Ported simple benchmarking in new base
2009-05-18 17:33:45 -07:00
Emilio Tagua
1cc4459939
Merge commit 'rails/master'
...
Conflicts:
activerecord/lib/active_record.rb
Updated:
Arel submodule
2009-05-18 20:01:06 -03:00
Jeremy Kemper
ee5520a0a5
Merge branch 'master' of git@github.com:rails/rails
2009-05-18 15:02:15 -07:00
Jeremy Kemper
41e9414b60
Include acts_as_string?
2009-05-18 15:01:13 -07:00
Emilio Tagua
5463823df3
Remove unnecessary condition and local variable [ #2602 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-18 22:46:37 +02:00
Joe Van Dyk
29550cc91f
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:43:56 -07:00
Jeremy Kemper
3e2f0800e3
Merge branch 'master' of git@github.com:rails/rails
2009-05-18 13:43:44 -07:00
Ken Collins
87adecfef5
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:40:45 -07:00
Luca Guidi
cef76c8af4
Ensure HasManyThroughAssociation#destroy delete orphan records [ #2251 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-18 22:30:43 +02:00
Jeremy Kemper
a69b28a8b1
Missing 1.8.7 backport extensions
2009-05-18 13:20:04 -07:00
Pratik Naik
c5e109bbe7
Make sure default_scope#create checks for options[:conditions] [ #2181 state:resolved] [James Le Cuirot]
2009-05-18 21:27:42 +02:00
Jeremy Kemper
37453e11e9
Revert "Get AR CI passing again by requiring the entire core_ext"
...
This reverts commit 8e6a18d867 .
2009-05-18 11:55:06 -07:00
Jeremy Kemper
cf6e025a45
Merge branch 'master' of git@github.com:rails/rails
2009-05-18 11:54:51 -07:00
Andy Stewart
5e190ef138
Truncate helper accepts a :separator for a more legible result [ #1807 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-18 20:46:19 +02:00
Pratik Naik
195fadbfd3
Ensure HTTP Digest auth uses appropriate HTTP method [ #2490 state:resolved] [Steve Madsen]
2009-05-18 16:59:37 +02:00
Emilio Tagua
3db44e938f
Merge branch 'master' of git://github.com/rails/rails
2009-05-18 11:19:03 -03:00
Emilio Tagua
a04dedd563
Merge commit 'rails/master'
...
Conflicts:
activerecord/lib/active_record/base.rb
activerecord/lib/active_record/migration.rb
activerecord/test/cases/helper.rb
2009-05-18 11:18:46 -03:00
Emilio Tagua
28f5cfe066
Add missing model and fixtures to finder_test [ #2671 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-18 15:58:25 +02:00
Benjamin Floering
27de7f150b
Fixed limited eager loading associations with numbers in the name [ #2668 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-18 13:56:17 +02:00
Kerry Buckley
49afe81a13
Report errors in 'all project' rake tasks [ #2224 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-18 11:13:51 +02:00
rick
e89241c92f
load the JSON Backend lazily. If the JSON gem is already loaded, use the JSONGem backend by default.
2009-05-17 19:18:00 -07:00
Brian Lopez
b0de061e7b
Allow ParamsParser to parse YAML from the request body IO directly
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-17 16:09:28 -05:00
Joshua Peek
01d7acd11d
Fix reset_session with ActiveRecord store [ #2200 state:resolved]
2009-05-17 14:42:36 -05:00
Mislav Marohnić
b33c0d9832
replace the aaa_create_tables_test hack with loading test database schema in the test helper [ #2663 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-17 13:51:35 -05:00
Joshua Peek
092089015b
Extract generic callbacks middleware from dispatcher
2009-05-17 13:39:55 -05:00
Mike Breen
edc9c226d1
Add tests for assert_template :template
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-17 19:50:00 +02:00
Joshua Peek
8118fca9be
Merge Failsafe middleware into ShowExceptions
2009-05-17 12:24:59 -05:00
Joshua Peek
c3319504f0
Rescue hack was supposed to be removed. Some how it crept back in.
2009-05-17 12:24:59 -05:00
Travis Briggs
98eaa2c683
Ensure number_to_human_size does not strip zeros from the end [ #1763 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-17 19:02:50 +02:00
Thomas E. Glasgow
e41984c5f7
Simplify filter_chain method implementation [ #2327 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-17 18:56:07 +02:00
Chris Kampmeier
4e8c36a741
Implement #many? for NamedScope and AssociationCollection using #size [ #1500 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-17 18:56:06 +02:00
Lance Ivy
11bac70078
Ensure auto_link does not ignore multiple trailing punctuations [ #2504 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-17 18:56:06 +02:00
Brian Lopez
53dda29f8b
Add support for parsing XML and JSON from an IO as well as a string [ #2659 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-17 10:37:52 -05:00
Mike Gunderloy
344ee681d6
Remove obsolete wiki reference [ #2291 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-17 15:15:43 +02:00
Paulo Schneider
34874b3bcd
Fix typo in the generated routes.rb [ #2433 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-17 15:00:05 +02:00
Jacob Kjeldahl
d6645a5e52
Supply valid ruby-prof parameters [ #1804 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-17 14:53:06 +02:00
Daniel Guettler
25724eede9
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:48:20 +02:00
Pratik Naik
a9e8c4b374
Ensure rake test does not run new base tests as that requires rack/test
2009-05-17 14:31:54 +02:00
Jeffrey Chupp
842dab0c29
Ensure WhiteListSanitizer allows dl tag [ #2393 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-17 14:29:47 +02:00
Yehuda Katz
4fa871654d
Get Railties passing again
2009-05-16 12:28:25 -07:00
Yehuda Katz
db1bf3650d
Fix ActionMailer Symbol#to_proc instance
2009-05-16 12:13:41 -07:00
Yehuda Katz
8e6a18d867
Get AR CI passing again by requiring the entire core_ext
...
Note that this includes Time and Date; we should
really figure out what parts of core_ext are really
required for AR and require just those.
2009-05-16 12:09:25 -07:00
Bryan Helmkamp
59c4d9a5b4
Changelog
2009-05-16 14:18:10 -04:00
Bryan Helmkamp
7f318c3ec5
Instead of checking Rails.env.test? in Failsafe middleware, check env["rails.raise_exceptions"]
2009-05-16 14:15:26 -04:00
Pratik Naik
a6d8ca0f0e
Include guides directory in the rails gem
2009-05-16 17:10:04 +02:00
Yehuda Katz + Carl Lerche
5a45446cff
Ported Rescuable to new base
2009-05-15 17:49:11 -07:00
Yehuda Katz + Carl Lerche
7e10504bde
Refactored AbstractController to provide better hook points for overriding aspects of action dispatching
2009-05-15 15:57:12 -07:00
José Valim
eb021707f5
Allow strings to be sent as collection to select.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-05-15 15:30:17 +12:00
Jeremy Kemper
628110d7ee
Active Support dependencies
2009-05-14 17:42:20 -07:00
Yehuda Katz + Carl Lerche
b6bac73b28
Merge commit 'origin/master'
...
Conflicts:
actionpack/lib/action_controller/abstract/base.rb
actionpack/lib/action_controller/routing.rb
2009-05-14 17:38:30 -07:00
Yehuda Katz + Carl Lerche
da65320433
Got new base to pass controller/base_test.rb, implemented method_missing action semantics in compatibility mode, and fixed a few action_missing bugs.
2009-05-14 17:25:10 -07:00
Yehuda Katz + Carl Lerche
8fac2c88ca
Cleaning up more render tests
2009-05-14 15:30:35 -07:00
Jeremy Kemper
c286952050
Minimal base/new_base comparison
2009-05-14 02:01:08 -07:00
Jeremy Kemper
5dd29c466c
Cherry-picking Active Support extensions
2009-05-14 02:01:08 -07:00
Jeremy Kemper
29bd8f7b89
Simple example for require profiling
2009-05-14 02:01:08 -07:00
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
Emilio Tagua
0048897a41
Merge commit 'rails/master'
2009-05-12 16:13:00 -03: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
Emilio Tagua
6c7d8cb8ac
Merge commit 'rails/master'
2009-05-09 13:07:30 -03: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
Emilio Tagua
8885b2d6c1
Refactor to calculations. Migration's versions are string not integer. ARel submodule updated.
2009-05-06 14:16:03 -03:00
Emilio Tagua
118b19a9fa
Merge branch 'master' of git://github.com/rails/rails
2009-05-06 11:32:14 -03: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
Emilio Tagua
a83a1cceba
Merge commit 'rails/master'
2009-05-05 10:14:28 -03: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
Emilio Tagua
d19d4d2f20
Fixes to have all test passing on PostgreSQL.
...
Calculations now use construct_calculation_arel, making construct_finder_arel less hackish.
Updated ARel to support PostgreSQL.
2009-05-04 21:53:29 -03: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
Emilio Tagua
d3042ef80c
Merge commit 'rails/master'
2009-05-04 19:23:34 -03: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
Jeremy Kemper
8b6d2ef2f5
Merge branch 'master' of git@github.com:rails/rails
2009-05-04 08:35:35 -07:00
Chris Kampmeier
d3ee8756c8
Don't use #tap before Active Support is available, since older versions of ruby don't have native implementations
...
[#2603 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-05-04 08:32:25 -07:00
Joshua Peek
bcc4537f2a
Wrap dispatcher callbacks around the whole middleware chain. Kill unnecessary Reloader middleware.
2009-05-03 09:41:40 -05:00
Joshua Peek
e066019280
Show lazy middleware args in pretty print
2009-05-03 09:24:32 -05:00
Joshua Peek
11af089cee
Extract ActionController rescue templates into Rescue and ShowExceptions middleware.
...
This commit breaks all exception catching plugins like ExceptionNotifier. These plugins should be rewritten as middleware instead overriding Controller#rescue_action_in_public.
2009-05-02 23:02:22 -05:00
Jeremy Kemper
9047c9809d
Fix implicit ordering expectation
2009-05-02 16:41:50 -07:00
Jeremy Kemper
1c6fcbfd2d
Fix implicit ordering expectation
2009-05-02 15:30:00 -07:00
Jeremy Kemper
186fee48c7
Merge branch 'master' of git@github.com:rails/rails
2009-05-02 15:21:19 -07:00
Jeremy Kemper
945bf9c254
Check for sibling Active Support first
2009-05-02 15:16:12 -07:00
Joshua Peek
24affdc88c
Deprecate Controller.process interface
2009-05-02 15:37:29 -05:00
Joshua Peek
f32cf44870
Switch functional tests to run through the rack interface instead of process
2009-05-02 15:29:18 -05:00
Joshua Peek
a8b75c480f
Functional test runner finalizes response just like the integration test runner. In both runners, the @response object will now behave the same.
...
Some functional tests will need to be updated if they are relying on preprocessed data on the response.
2009-05-02 14:57:40 -05:00
Joshua Peek
3900f4007e
Deprecate assert_redirect_to's partial hash matching
2009-05-02 14:23:44 -05:00
Emilio Tagua
d522b7ccf6
Revert "Work around count returning string (bug)"
...
This reverts commit 4bb6f77059 .
2009-05-02 12:59:49 -03:00
Yehuda Katz
72160d9f89
Implement FooController.action(:name)
...
* Rails actions are now Rack endpoints, and can be retrieved
via FooController.action(name) and called with an env
* Updated some tests that relied on the old internal
#process/#call implementation
2009-05-02 02:15:09 -07:00
Emilio Tagua
3fd467e9ed
Refactor to use arel_table method, and also use the same method name for instance and class methods.
2009-05-02 04:02:09 -03:00
Emilio Tagua
c9896884a4
Removed ARel table assignment
2009-05-02 03:40:31 -03:00
Emilio Tagua
5e790d368c
Merge commit 'rails/master'
2009-05-02 03:21:40 -03:00
Emilio Tagua
9f36431f58
Updated ARel
2009-05-02 03:15:19 -03:00
Yehuda Katz + Carl Lerche
ad2a1b5cb1
Get render :inline working
2009-05-01 18:17:08 -07:00
Yehuda Katz + Carl Lerche
7dd072d333
A few more tweaks to get new Base running old render tests again
2009-05-01 17:53:20 -07:00
Yehuda Katz + Carl Lerche
e046f36824
Renamed Base2 to Base and don't require old action_controller for new Base
2009-05-01 17:31:03 -07:00
Yehuda Katz + Carl Lerche
b1d34b3aa4
Starting to get new_base to run on old tests
2009-05-01 17:31:03 -07:00
Yehuda Katz + Carl Lerche
918b119bd3
Add support for stripping "layouts/" from the layout name
2009-05-01 17:31:02 -07:00
Yehuda Katz + Carl Lerche
b4903a8e34
Modify new_base to use String action_names for back-compat
2009-05-01 17:31:02 -07:00
Yehuda Katz + Carl Lerche
69fd669165
Committing the last changes before we start trying to get the old tests to pass on the new base
2009-05-01 17:31:02 -07:00
Yehuda Katz + Carl Lerche
4ee3e5b094
Ported over the concept of public instance methods on controller child classes as callable action methods
2009-05-01 17:31:02 -07:00
Yehuda Katz + Carl Lerche
d58b57a3ca
Move ContentType inline for now.
...
Trying to avoid premature proliferation of modules.
2009-05-01 17:31:02 -07:00
Yehuda Katz + Carl Lerche
b98e496c03
Support implicit and explicit content types
2009-05-01 17:31:02 -07:00
Yehuda Katz + Carl Lerche
49834e088b
Support implicit render and blank render
2009-05-01 17:31:02 -07:00
Yehuda Katz + Carl Lerche
0c3d9bc4c2
Ported over render :template tests
2009-05-01 17:31:01 -07:00
Yehuda Katz + Carl Lerche
4f68311685
Finished implementing render :text in Base2
2009-05-01 17:31:01 -07:00
Yehuda Katz + Carl Lerche
1b45991603
Renamed the new_base tests
2009-05-01 17:31:01 -07:00
Yehuda Katz + Carl Lerche
b692fceb6a
Renamed ActionController::AbstractBase to ActionController::Http
2009-05-01 17:31:01 -07:00
Yehuda Katz + Carl Lerche
059afb3a3a
Removed a stray method_missing in the new callbacks system
2009-05-01 17:31:01 -07:00
Yehuda Katz + Carl Lerche
8a4e77b420
OMG, a lot of work
2009-05-01 17:31:01 -07:00
Yehuda Katz + Carl Lerche
34509777fd
Makes new callbacks support keys with special characters
2009-05-01 17:31:01 -07:00
Ruy Asan
3be3470fab
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:32 -07:00
Ruy Asan
99c103be11
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:47:56 -07:00
Alexander Podgorbunsky
db0bfe4ede
Default scope :order should be overridden by named scopes.
...
[#2346 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-05-01 14:44:24 -07:00
Pratik Naik
853c229bbd
Rename vendor/rack to vendor/rack-1.1.pre
2009-05-01 20:24:14 +01:00
Pratik Naik
432e631d5c
Vendor Rack edge ( commit : 815342a8e15db564b766f209ffb1e340233f064f )
2009-05-01 20:12:49 +01:00
steve
60a6284a46
Tests should use ActiveRecord::Base.connection.rollback_db_transaction to rollback a transaction
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-01 16:00:09 +01:00
steve
5501b99a19
Ensure ActiveRecord::Base.connection_pool.with_connection creates a new connection only when needed [ #1752 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-01 14:58:10 +01:00
Ken Collins
b193f23390
Use table_exists? in #initialize_schema_migrations_table [ #1923 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-01 14:24:40 +01:00
Joshua Peek
664ae187a9
Update some old tests to use AC TestProcess
2009-04-30 23:46:35 -05:00
Joshua Peek
05bd863c02
alias method chain process with test
2009-04-30 23:46:35 -05:00
Joshua Peek
1fcc7dbcc8
Move TestRequest#query_parameters into AD TestRequest
2009-04-30 23:46:34 -05:00
Jeremy Kemper
dc9f53b05b
Selectively require rake sshpublisher so full gem isn't required
2009-04-30 21:02:23 -07:00
Jeremy Kemper
7a7382b213
Selectively require rake sshpublisher so full gem isn't required
2009-04-30 21:02:11 -07:00
Jeremy Kemper
9b852af497
Explicitly require builder for to_xml
2009-04-30 20:34:11 -07:00
Jeremy Kemper
509c389bf8
Explicitly require builder for to_xml
2009-04-30 20:33:50 -07:00
Jeremy Kemper
4bb6f77059
Work around count returning string (bug)
2009-04-30 20:32:19 -07:00
Jeremy Kemper
59b58dfa89
Use public submodule url
2009-04-30 20:31:47 -07:00
Jeremy Kemper
64c9a40137
Make ruby-debug optional
2009-04-30 20:31:32 -07:00
Joshua Peek
0fa1e75d41
Set rack.input instead of RAW_POST_DATA in TestRequest
2009-04-30 20:04:55 -05:00
Joshua Peek
261ec996de
Missed stray @request_uri
2009-04-30 19:36:18 -05:00
Joshua Peek
a6fff94baf
Move TestRequest cookies accessor into AD TestRequest
2009-04-30 19:23:50 -05:00
Joshua Peek
d54604c352
Depend on unreleased rack 1.1
2009-04-30 19:10:05 -05:00
Jeremy Kemper
6ae839bf48
Merge branch 'master' of git@github.com:rails/rails
2009-04-30 16:45:39 -07:00
John F. Douthat
e59835bd09
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:43:01 -07:00
Jeremy Kemper
f0b9e28619
Fix render :json => nil [ #2589 state:resolved]
2009-04-30 16:34:00 -07:00
Joshua Peek
00d1a57e9f
Start moving TestRequest and TestResponse into ActionDispatch
2009-04-30 17:26:03 -05:00
Joshua Peek
64e66cf161
Vendor new Rack::Mock changes
2009-04-30 14:40:46 -05:00
Joshua Peek
9bac470c7a
Group integration test helpers and delegate other helpers to request and response objects
2009-04-30 14:28:42 -05:00
Joshua Peek
ba9887c9c0
Switch to action_dispatch rack namespace
2009-04-30 13:45:12 -05:00
Joshua Peek
7b3b7cb2ab
Move generic assertions into ActionDispatch
2009-04-30 11:55:53 -05:00
Emilio Tagua
ca0530a53f
exists? method now uses ARel
2009-04-30 13:47:51 -03:00
Joshua Peek
98dd726687
Test::Unit work arounds are handled by ActiveSupport
2009-04-30 11:42:01 -05:00
Joshua Peek
988513ac7a
Framework backtrace cleaning is handled by ActiveSupport now
2009-04-30 11:42:01 -05:00
Emilio Tagua
5b61168aaf
Added arel_attributes_values methods, refactored locking and AR#update to use this method
2009-04-30 13:21:13 -03:00
Emilio Tagua
0cf54f9dd8
Merge commit 'rails/master'
2009-04-30 10:10:42 -03:00
Jeremy Kemper
79420e71e0
Work around Float faux precision
2009-04-30 01:33:07 -07:00
Jeremy Kemper
7eef11eb65
Convert params keys to strings
2009-04-29 23:29:11 -07:00
Jeremy Kemper
091965c0fc
Prefer behavior check to RUBY_VERSION to catch 1.8 backports
2009-04-29 23:12:34 -07:00
Emilio Tagua
b0bd4f45fa
Merge commit 'rails/master'
2009-04-29 19:47:21 -03:00
Emilio Tagua
db892ea775
Fix duplicated test name
...
[#2581 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-04-29 15:46:43 -07:00
Emilio Tagua
19d2ff83db
Calculations now use Arel to construct the query.
...
Implemented other methods in AR::Base with Arel support.
2009-04-29 19:39:53 -03:00
David Dollar
7149ddd2a1
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:07:57 -07:00
Jeremy Kemper
d6c584618f
Merge branch 'master' of git@github.com:rails/rails
2009-04-28 23:19:53 -07:00
David Dollar
599f2cfb4a
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:16:47 -07:00
Joshua Peek
c0a372ba87
Deprecate template, session, assigns, and layout accessors on response object. Instead access them through the controller instance. This mainly affects functional test assertions.
2009-04-28 23:29:46 -05:00
Joshua Peek
8925e89c63
Deprecate response.assigns
2009-04-28 23:29:46 -05:00
Joshua Peek
d63b42da36
Move header injection back into integration tests
2009-04-28 23:29:46 -05:00
Joshua Peek
afa7d7ff05
Fix validate_request method name
2009-04-28 23:29:45 -05:00
Jeremy Kemper
acd5db300b
Rejig active support dependencies to behave better with the boot process
2009-04-28 18:25:35 -07:00
Jeremy Kemper
b825bef74c
Fix missing core extension dependencies
2009-04-28 17:58:51 -07:00
Emilio Tagua
4246a79a99
Show executed queries when assert_sql assertion fails [ #2573 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-04-28 22:11:47 +01:00
Yehuda Katz + Carl Lerche
38bd60eae4
Makes new callbacks support keys with special characters
2009-04-27 18:16:55 -07:00
Yehuda Katz + Carl Lerche
ab83db9d06
Fixes ActionMailer to work with the ActionView refactoring
2009-04-27 12:34:25 -07:00
Yehuda Katz + Carl Lerche
cecafc52ee
Refactor ActionView::Template
...
ActionView::Template is now completely independent from template
storage, which allows different back ends such as the database.
ActionView::Template's only responsibility is to take in the
template source (passed in from ActionView::Path), compile it,
and render it.
2009-04-27 11:49:11 -07:00
Eloy Duran
da3c21ead5
Ensure the parent record is always saved when the child is invalid. [ #2249 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-04-27 19:25:27 +01:00
Joshua Peek
21aa32692c
Delegate controller.session to request.session and deprecate response session
2009-04-27 13:11:17 -05:00
Jeremy Kemper
dde063507a
Can't please them all
2009-04-27 09:29:17 -07:00
Jeremy Kemper
c2b4da1c42
Sufficient to test that multipart/mixed wasn't parsed to a hash
2009-04-27 00:17:02 -07:00
Jeremy Kemper
a88ddf8cc3
Don't return bare string as rack body
2009-04-27 00:00:03 -07:00
Jeremy Kemper
e44cd41620
Make it clearer that session is nil
2009-04-26 23:59:17 -07:00
Jeremy Kemper
6e3e00219b
Fix differing rails_to_json arity
2009-04-26 20:26:44 -07:00
Jeremy Kemper
706f313231
Use Array.wrap
2009-04-26 20:24:45 -07:00
Jeremy Kemper
f58c322e7e
Use __send__ for BasicObject friendliness
2009-04-26 20:05:17 -07:00
Jeremy Kemper
ee46ffedb8
Now that we have a separate internal rails_to_json, use a separate circular reference stack instead of sticking it in the options hash
2009-04-26 20:04:47 -07:00
Jeremy Kemper
678385d307
Use javascript_object_for
2009-04-26 19:59:22 -07:00
Jeremy Kemper
5cef0cbad2
Check for to_str rather than String
2009-04-26 19:08:04 -07:00
Jeremy Kemper
f5b4a9d02b
Array splitting strings on newlines is deprecated
2009-04-26 18:27:41 -07:00
Jeremy Kemper
1850aea7fc
Not sure why Request#session is missing
2009-04-26 18:26:06 -07:00
Jeremy Kemper
f7d7dc5aa8
Use session= writer methods
2009-04-26 17:19:14 -07:00
Jeremy Kemper
8aaed3d456
Convert encoding before escaping
2009-04-26 16:21:57 -07:00
Stephen Bannasch
1d71a34afa
add JRuby-JDOM backend for XmlMini
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-04-26 16:13:55 -07:00
Jeremy Kemper
3f63202781
Don't assume :params is a Hash
2009-04-26 16:04:29 -07:00
Jeremy Kemper
c9d9bd7227
Check for to_str rather than String
2009-04-26 16:04:11 -07:00
Jeremy Kemper
ea712364e2
Don't undefine object_id
2009-04-26 15:56:08 -07:00
Jeremy Kemper
3bd32754e2
Privatize rails_to_json
2009-04-26 15:54:28 -07:00
Jeremy Kemper
4a8d2ef0a5
Extract json string escaping
2009-04-26 15:53:59 -07:00
Jeremy Kemper
5577d561f9
Merge branch 'master' of git@github.com:rails/rails
2009-04-26 15:18:51 -07:00
Jeremy Kemper
8d64085138
Only Object to_json alias is needed. Prefer nil options.
2009-04-26 15:18:33 -07:00
Jeremy Kemper
be7e21a85c
Qualify toplevel constant references since we're in a BasicObject
2009-04-26 15:05:50 -07:00
Jeremy Kemper
da3a80dd4f
Track object ids so the objects needn't respond to ==
2009-04-26 15:04:02 -07:00
Joshua Peek
0494909679
Inherit TestSession from Session::AbstractStore and add indifferent access to Session::AbstractStore.
2009-04-26 14:33:57 -05:00
Joshua Peek
c8919f4c7c
Require an ActionDispatch::Request to use response assertions
2009-04-26 11:52:45 -05:00
Joshua Peek
6940c0de12
Unify functional and integration tests cookie helpers
2009-04-26 11:37:11 -05:00
Hongli Lai (Phusion)
3cb97aeea8
Fix environment variable testing code in failsafe.rb.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-04-26 11:23:10 -05:00
Hongli Lai (Phusion)
cd9bb88eef
Remove reference to Rack::RewindableInput, which has been removed a while ago.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-04-26 11:22:03 -05:00
Joshua Peek
82bc768dad
Fix typo in stale session check [ #2404 state:resolved]
2009-04-26 11:19:42 -05:00
Joshua Peek
5ea8d40156
Deprecate response.redirect_url_match?, use assert_match instead.
2009-04-26 11:16:14 -05:00
Joshua Peek
5352a2417b
Move useful response test helpers into request
2009-04-26 11:12:33 -05:00
Joshua Peek
dbbe2e74ff
Create a new file for response tests
2009-04-26 10:26:53 -05:00
Yehuda Katz
d0ace15c01
Updated for Rack 1.0
2009-04-25 12:33:14 -07:00
Joshua Peek
4f412a10b6
Remove RewindableInput middleware since all input MUST be rewindable according to a recent change in the Rack 1.0 SPEC
2009-04-25 14:04:03 -05:00
Joshua Peek
b69da86ea5
Remove vendored version of Rack
2009-04-25 13:56:37 -05:00
Joshua Peek
044794fc9e
Remove pending rack specifications until they are official
2009-04-25 13:41:30 -05:00
Jeremy Kemper
dc2caea9dc
test uses Pathname
2009-04-24 23:17:15 -07:00
Joshua Peek
dd2ed32418
Start to integrate some of the features in Rack::Test.
...
Eventually commit ActionDispatch::Test::MockRequest and ActionDispatch::Test:: UploadedFile upstream.
2009-04-24 20:24:54 -05:00
Emilio Tagua
090539604b
construct_finder_sql now use Arel
2009-04-24 21:48:45 -03:00
Emilio Tagua
0e113a040d
Refactored locking update
2009-04-24 17:32:16 -03:00
Emilio Tagua
649fd1058f
Merge commit 'rails/master'
2009-04-24 17:28:31 -03:00
Emilio Tagua
345e686d83
Changed locking to use Arel. Arel updated
2009-04-24 17:27:05 -03:00
Emilio Tagua
c0f66b764e
Added ruby-debug
2009-04-24 17:26:34 -03:00
Jeremy Kemper
cbcc0ca57b
Use Symbol#to_proc in rails plugin internals
2009-04-24 10:41:45 -07:00
Emilio Tagua
a841cd2503
Fix models load order to be able to run unit tests.
...
[#2550 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-04-23 16:02:11 -07:00
Emilio Tagua
e428c75d2b
Remove connection method definition, since it's called just once.
2009-04-23 18:59:35 -03:00
Emilio Tagua
7958308ef6
More progress on migrations. Arel updated.
2009-04-23 18:54:04 -03:00
Emilio Tagua
d8f99c36ba
Added Arel integration to migration's version update table
2009-04-23 13:55:42 -03:00
Emilio Tagua
0d9f1da955
Arel updated
2009-04-23 13:55:02 -03:00
Emilio Tagua
a934bbbb28
Removed blank lines
2009-04-23 13:54:38 -03:00
Emilio Tagua
fdcd81970e
Require Arel
2009-04-23 13:54:00 -03:00
Emilio Tagua
3b43d1801e
Added arel as a submodule. This is temporary and will make development/testing easier.
2009-04-23 13:50:18 -03:00
rick
3c4c6bd0df
* Add pluggable JSON backends with support for the JSON gem. [rick]
...
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-04-23 00:08:40 -07:00
Jeremy Kemper
bab2bfa692
Removed rest of Symbol#to_proc from railties tests
2009-04-22 19:52:28 -07:00
Jeremy Kemper
236169e85e
Missed one
2009-04-22 19:50:24 -07:00
Jeremy Kemper
d23ab4fbb6
Remove Symbol#to_proc dependency
2009-04-22 19:35:58 -07:00
Jeremy Kemper
85b1a55f6d
Merge branch 'master' of git@github.com:rails/rails
2009-04-22 18:54:55 -07:00
Jeremy Kemper
f28bd9557c
Fix dependencies revealed by testing in isolation
2009-04-22 18:54:13 -07:00
Yehuda Katz + Carl Lerche
0a132c2fe1
Refactor ActionView::Path
...
* Decouple from ActionController and ActionMailer
* Bring back localization support.
* Prepare to decouple templates from the filesystem.
* Prepare to decouple localization from ActionView
* Fix ActionMailer to take advantage of ActionView::Path
2009-04-22 17:24:41 -07:00
Jeremy Kemper
5c4ba6e3fc
new_callbacks core extensions
2009-04-22 17:17:31 -07:00
Jeremy Kemper
b2d6fdae35
Fix tests on 1.9
2009-04-22 17:07:04 -07:00
Jeremy Kemper
7f6779c1d5
Merge branch 'master' into cherry
...
Conflicts:
activesupport/lib/active_support.rb
2009-04-22 16:53:58 -07:00
Jeremy Kemper
6fee981fa4
Opt in to JSON
2009-04-22 16:48:58 -07:00
Jeremy Kemper
f5d720fb96
Opt in to Dependencies
2009-04-22 16:42:14 -07:00
Jeremy Kemper
ab321268f8
No more free lunch
2009-04-22 16:10:49 -07:00
Jeremy Kemper
42a06d2d62
stdlib autoloads were hanging on 1.9.1
2009-04-22 09:10:48 -07:00
Pratik Naik
5f3f100ce2
Merge branch 'master' into active_model
...
Conflicts:
activeresource/lib/active_resource/validations.rb
2009-04-22 15:26:03 +01:00
Jeremy Kemper
ca49299434
Get Active Model in the mix
2009-04-22 01:02:54 -07:00
Jeremy Kemper
a27192f49a
Divert CoreExtensions mention in docs
2009-04-22 00:47:25 -07:00
Jeremy Kemper
b70239b0cf
Convert string extension modules to class reopens
2009-04-22 00:45:39 -07:00
Jeremy Kemper
35afad620b
ActiveSupport.core_ext bridge util no longer used
2009-04-22 00:34:24 -07:00
Jeremy Kemper
e6eb941d1b
Switch last module core extension to class reopen
2009-04-22 00:33:00 -07:00
Jeremy Kemper
e9ed44af88
Merge branch 'master' into cherry
2009-04-22 00:23:47 -07:00
Jeremy Kemper
6ee8329af6
Merge branch 'master' of git@github.com:rails/rails
2009-04-22 00:22:25 -07:00
Jeremy Kemper
70c544df71
Rack::Utils.body_to_s doesn't exist in 1.0
2009-04-22 00:22:07 -07:00
Joshua Peek
380431e4ed
Fix test_rescue_routing_exceptions when running with rake
2009-04-21 21:11:23 -05:00
Joshua Peek
0b92bb97c1
refactor some coupled rescue tests
2009-04-21 20:41:31 -05:00
Joshua Peek
fc5c1b0e90
Session tests belong under dispatch folder
2009-04-21 19:57:18 -05:00
Jeremy Kemper
5afc2abee6
Merge branch 'master' into cherry
2009-04-21 16:03:21 -07:00
Jeremy Kemper
f49e344128
Reinstate Base#render_to_string. Introduce AbstractController#render_to_string which stringifies render_to_body.
2009-04-21 16:02:30 -07:00
Alex Pooley
504d16ccdf
Add microsecond support for sqlite adapter [ #1982 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-04-21 18:05:07 +01:00
Stephen Celis
7a99dc0ac2
Update rails:template task to expand file paths [ #2528 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-04-21 17:44:35 +01:00
Pratik Naik
d7d93cdb62
Fix nginx config in ci setup notes [Chad Woolley] [ #2290 state:resolved]
2009-04-21 17:31:26 +01:00
Mike Gunderloy
398b07e655
Remove excess mocking from polymorphic_url tests [ #2330 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-04-21 14:32:52 +01:00
Pratik Naik
2e6d1bf43e
Change table to prevent copying indexes on sqlite2
2009-04-21 13:28:49 +01:00
Pratik Naik
2381f6f3dc
Specify :group with the table name for it to work on sqlite3
2009-04-21 13:11:56 +01:00
Pratik Naik
6513dde490
Fix tests for sqlite3 3.6.xx
2009-04-21 13:06:26 +01:00
Max Lapshin
f3ac4f387d
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:44:13 +01:00
Scott Woods
64b33b6cf9
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:43:38 +01:00
Max Lapshin
cdcd638c2f
Fixed wrong quoting of index names in postgres [ #2402 state:resolved]
...
Signed-off-by: Tarmo Tänav <tarmo@itech.ee >
2009-04-21 11:42:40 +01:00
Jeremy Kemper
696375ac62
Merge branch 'master' into cherry
2009-04-20 20:06:30 -07:00
Jeremy Kemper
b10fb7e7bc
Merge branch 'master' of git@github.com:rails/rails
2009-04-20 18:34:43 -07:00
Jeremy Kemper
685a53a360
Merge branch 'master' into cherry
...
Conflicts:
activesupport/CHANGELOG
activesupport/lib/active_support/core_ext/class/delegating_attributes.rb
activesupport/lib/active_support/core_ext/hash/conversions.rb
activesupport/lib/active_support/core_ext/module/attribute_accessors.rb
activesupport/lib/active_support/core_ext/string/multibyte.rb
activesupport/lib/active_support/core_ext/time/calculations.rb
activesupport/lib/active_support/deprecation.rb
2009-04-20 18:31:40 -07:00
Jeremy Kemper
db05c73fb6
Move AS::Duration autoload to core/time/autoload
2009-04-20 18:14:39 -07:00
Pratik Naik
de0ea38663
Ensure :dependent => :delete_all works for association with hash conditions
2009-04-20 18:12:40 +01:00
Pratik Naik
489abfd3b2
Ensure JoinAssociation uses aliased table name when multiple associations have hash conditions on the same table
2009-04-20 13:51:11 +01:00
Jeremy Kemper
164a94d0bc
Clearer String#first and #last edge cases. Fix that 'foo'.first(0) == 'foo' instead of ''
2009-04-20 00:40:15 -07:00
Jeremy Kemper
5d84c732ee
Treating strings as enumerable is deprecated
2009-04-20 00:32:14 -07:00
Jeremy Kemper
4f63e84843
Autoload I18n simple backend
2009-04-17 22:24:36 -07:00
Jeremy Kemper
f40eb52566
Autoload YAML and StringScanner for JSON decoding
2009-04-17 22:24:08 -07:00
Jeremy Kemper
2c5c2717cb
Autoload StringScanner for pre-1.9 String#each_char
2009-04-17 21:58:18 -07:00
Jeremy Kemper
595e03336f
Remove rarely-used DRb cache store
2009-04-17 21:53:17 -07:00
Jeremy Kemper
bd84b82018
Eliminate Pathname extensions
2009-04-17 21:49:57 -07:00
Jeremy Kemper
727e9dc18a
Dice up ActiveSupport::Deprecation
2009-04-17 21:29:30 -07:00
Jeremy Kemper
3202671dc9
Fix core/all require of adjacent core features
2009-04-17 21:20:57 -07:00
Jeremy Kemper
151348824e
Fix core/time require of DateTime core extensions
2009-04-17 21:17:55 -07:00
Mislav Marohnić
7ce0778a15
Always buffer rack.input if it is not rewindable
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-04-17 21:53:44 -05:00
Jeremy Kemper
a22a778f86
render_for_text pushes a body part instead of replacing the whole body
2009-04-17 21:33:09 -05:00
Mislav Marohnić
8423bb6a68
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:03 -05:00
Jeremy Kemper
1414e2afbb
Don't set Content-Length in Base#response_body= since body may be any Rack-compatible body. Leave it up to the content length middleware.
2009-04-17 18:36:28 -05:00
Jeremy Kemper
df42d26f99
Rename render_to_string to render_to_body since it may return any Rack-compatible body, not just strings
2009-04-17 18:34:49 -05:00
Jeremy Kemper
ecdc0643f2
Merge branch 'master' of git@github.com:rails/rails
2009-04-17 13:45:18 -05:00
Jeremy Kemper
60896ca6f4
Clearer String#first and #last edge cases. Fix that foo.first(0) == instead of foo.
2009-04-17 13:44:59 -05:00
lifo
5b92dcb675
Merge docrails
2009-04-17 14:28:46 +01:00
David Heinemeier Hansson
abb899c54e
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:25:55 -05:00
David Heinemeier Hansson
fdb61f02c5
Added ActiveRecord::Base#touch to update the updated_at/on attributes with the current time [DHH]
2009-04-16 16:48:37 -05:00
Carl Lerche & Yehuda Katz
b49027e188
Make more Template methods public to make ActionMailer tests pass
2009-04-16 11:57:27 -07:00
Ross Kaffenburger and Bryan Helmkamp
256b0ee8e3
Don't check authenticity tokens for any AJAX requests
2009-04-15 16:04:21 -07:00
Carl Lerche & Yehuda Katz
3c1187699a
Makes rails-dev-boost work again
2009-04-14 18:32:31 -07:00
Joshua Peek
109a3876f0
Move middleware stack out of utils folder
2009-04-14 18:32:31 -07:00
Joshua Peek
c2511f936e
Make dispatcher instances immutable
2009-04-14 18:32:31 -07:00
Joshua Peek
d7751036fa
Final blow to CGI
2009-04-14 18:32:31 -07:00
Joshua Peek
cf44788b06
We aren't using UploadedStringIO and UploadedTempfile anymore
2009-04-14 18:32:31 -07:00
Carl Lerche & Yehuda Katz
d39f5f18bb
Move all Templates methods not used by other class into private to
...
define surface area of the class.
2009-04-14 18:32:31 -07:00
Joshua Peek
9954494397
Move MimeResponds into base folder
2009-04-14 17:08:38 -05:00
Joshua Peek
d7396b5ca9
Move reloader middleware in ActionDispatch
2009-04-14 17:06:32 -05:00
Joshua Peek
1d2686517c
Session management belongs in base folder
2009-04-14 17:02:38 -05:00
Joshua Peek
97a88a91cb
Move middleware stack out of utils folder
2009-04-14 16:56:45 -05:00
Joshua Peek
13bb6a9a99
Backwords compat alias for ActionController::Request and ActionController::Response
2009-04-14 16:55:10 -05:00
Joshua Peek
ef08aa45b1
Use rack's status code list as a base
2009-04-14 16:47:03 -05:00
Joshua Peek
c1b4a5eb56
Make dispatcher instances immutable
2009-04-14 16:21:06 -05:00
Joshua Peek
4a3afe0b4f
Final blow to CGI
2009-04-14 16:18:24 -05:00
Joshua Peek
11d4bfb18c
We aren't using UploadedStringIO and UploadedTempfile anymore
2009-04-14 15:56:13 -05:00
Joshua Peek
4839fe2e82
Move bundled rack into ActionDispatch
2009-04-14 15:52:23 -05:00
Jeremy Kemper
1120aaceae
Fix requires so tests run
2009-04-14 10:53:46 -05:00
Carl Lerche & Yehuda Katz
d9afc51391
Rails server boots again
2009-04-13 17:16:07 -07:00
Carl Lerche & Yehuda Katz
647b83d50c
Resurrecting 1.9 compatibility.
2009-04-13 16:56:04 -07:00
Carl Lerche & Yehuda Katz
906aebceed
Bring abstract_controller up to date with rails/master
...
Resolved all the conflicts since 2.3.0 -> HEAD. Following is a list
of commits that could not be applied cleanly or are obviated with the
abstract_controller refactor. They all need to be revisited to ensure
that fixes made in 2.3 do not reappear in 3.0:
2259ecf368
AR not available
* This will be reimplemented with ActionORM or equivalent
06182ea02e
implicitly rendering a js response should not use the default layout
[#1844 state:resolved]
* This will be handled generically
893e9eb995
Improve view rendering performance in development mode and reinstate
template recompiling in production [#1909 state:resolved]
* We will need to reimplement rails-dev-boost on top of the refactor;
the changes here are very implementation specific and cannot be
cleanly applied. The following commits are implicated:
199e750d46
3942cb406e
f8ea9f85d4
e3b166aab3
ae9f258e03
44423126c6
0cb020b4d6
workaround for picking layouts based on wrong view_paths
[#1974 state:resolved]
* The specifics of this commit no longer apply. Since it is a two-line
commit, we will reimplement this change.
8c5cc66a83
make action_controller/layouts pick templates from the current instance's
view_paths instead of the class view_paths [#1974 state:resolved]
* This does not apply at all. It should be trivial to apply the feature
to the reimplemented ActionController::Base.
87e8b16246
fix HTML fallback for explicit templates [#2052 state:resolved]
* There were a number of patches related to this that simply compounded
each other. Basically none of them apply cleanly, and the underlying
issue needs to be revisited. After discussing the underlying problem
with Koz, we will defer these fixes for further discussion.
2009-04-13 15:18:45 -07:00
Carl Lerche & Yehuda Katz
2036d3ba75
Revert rspec-runner change. TODO: Add back support for the rspec T::U runner.
2009-04-09 12:33:39 -07:00
Yehuda Katz and Carl Lerche
1aadafda8d
Updated old AC::Base for small changes to AV
2009-04-08 17:33:41 -07:00
Yehuda Katz and Carl Lerche
6c05b5e938
Temporarily modifies setup to call super directly. This can support more T::U runners.
2009-04-08 17:33:41 -07:00
Yehuda Katz and Carl Lerche
91402bdd31
Reverts changes made to AS::TC
2009-04-08 10:10:06 -07:00
Jeremy Kemper
9cc8a75d84
Insert in sorted order to avoid TimeZone sort
2009-04-07 21:03:40 -07:00
Jeremy Kemper
f093088433
autoload Pathname
2009-04-07 20:52:57 -07:00
Jeremy Kemper
4a5f89fa64
Unneeded require
2009-04-07 20:18:09 -07:00
Yehuda Katz and Carl Lerche
3cecbc21e3
Get Base2 layouts to work :)
2009-04-07 17:57:20 -07:00
Yehuda Katz and Carl Lerche
95c9718118
Layouts work in AbstractController. Add support for the rspec runner for T::U
2009-04-07 15:54:02 -07:00
Yehuda Katz and Carl Lerche
c1aa5b0e14
Add depends_on, use, and setup to abstract up ideas about module inheritance.
2009-04-07 14:57:18 -07:00
Doug McInnes
c877857d59
Fix for TestResponse.cookies returning cookies unescaped [ #1867 state:resolved]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-04-07 13:21:41 -05:00
Kenny Ortmann
f448c70b3f
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 09:18:42 -05:00
Manfred Stienstra
f209d3898f
Improve tests and code for Rails::InfoController and Rails::Info [ #2411 state:resolved]
...
- Refactor Rails::InfoController tests.
- Return forbidden status from the InfoController for remote requests instead of a 500.
- Add tests for displaying middleware in Rails::Info.
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-04-07 09:16:48 -05:00
Yehuda Katz and Carl Lerche
9c8eaf8e25
Merge branch 'abstract_controller' of git@github.com:wycats/rails into abstract_controller
2009-04-06 12:35:44 -07:00
Yehuda Katz and Carl Lerche
4d3cd9b43f
Changes necessary to run the T::U tests with the rspec runner
2009-04-06 12:35:24 -07:00
Geoff Buesing
660fc93942
Test cleanup
2009-04-05 10:19:03 -05:00
Geoff Buesing
7685ea20b4
Hash::XML_TYPE_NAMES: no longer a need for a TimeWithZone entry; this class will now match "Time"
2009-04-05 10:15:54 -05:00
Geoff Buesing
c00f2d25de
TimeWithZone.name returns 'Time', to further thwart type checking
2009-04-05 10:08:54 -05:00
Max Lapshin
70de8e64e3
Support multiple schemas in table names for postgresql [ #390 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-04-05 12:36:36 +01:00
Pratik Naik
632bbbfe1c
Merge docrails
2009-04-05 12:36:36 +01:00
José Valim
1ab7c37671
Object names with underscore do the wrong lookup in I18n on error_messages_for.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2390 state:committed]
2009-04-05 21:08:14 +12:00
Luca Guidi
42cdc7571d
Ensure SqlBypass use ActiveRecord::Base connection
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#https://rails.lighthouseapp.com/attachments/106066/0001-Ensure-SqlBypass-use-ActiveRecord-Base-connection.patch state:committed]
2009-04-05 21:00:50 +12:00
Joshua Peek
0e9efae474
Nicer name for anonymous local cache middleware class
2009-04-02 12:05:21 -05:00
Cezary Baginski
44423126c6
Additional template render test for backup files [ #2367 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-04-02 11:58:29 -05:00
Michael Schuerig
cad3e8b261
Show installed middleware in builtin rails info (/rails/info/properties) [ #2396 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-04-02 11:54:52 -05:00
Jeremy Kemper
d848b7817f
Encapsulate date/time core extensions and constant autoloads in active_support/core/time
2009-03-31 10:03:35 -07:00
Geoff Buesing
ea8077c642
Enhance Time #since and #ago DST tests.
2009-03-29 16:43:26 -05:00
Michael Curtis
5a8b481f71
Time.local instances: Adding 24.hours across the DST boundary adds 24 hours instead of one day [ #2066 state:resolved]
2009-03-29 16:15:44 -05:00
Jeremy Kemper
48068bc1a4
Feature detection for Range#step extension
2009-03-29 02:43:13 -07:00
Jeremy Kemper
da8ade36b3
Convert Range step and include extension modules to class reopen
2009-03-29 02:31:08 -07:00
Jeremy Kemper
fe34d10f0c
JRuby doesn't have UnboundMethod#name
2009-03-29 00:24:18 -07:00
Jeremy Kemper
d8bdc4ed92
Explicit test dependencies
2009-03-29 00:12:17 -07:00
Jeremy Kemper
b90f7757ce
Explicit BigDecimal extension dependency
2009-03-29 00:11:20 -07:00
Jeremy Kemper
36e934a5ce
Fix require
2009-03-29 00:10:32 -07:00
Jeremy Kemper
2e4db78e6f
Explicit test dependencies
2009-03-29 00:08:35 -07:00
Jeremy Kemper
db214a1b5a
Explicit File#atomic_write dependency
2009-03-29 00:08:22 -07:00
Jeremy Kemper
7bcfff4457
Explicit test dependencies
2009-03-28 23:56:14 -07:00
Jeremy Kemper
e0f56fc96d
Distinguish missing memcache from missing memcache server
2009-03-28 23:55:43 -07:00
Jeremy Kemper
96af8b69a4
Avoid need for Enumerable#sum extension
2009-03-28 23:55:18 -07:00
Jeremy Kemper
fa5d5e0d16
Explicit dependency on Duration, numeric times, and date/time to_s extensions
2009-03-28 23:54:46 -07:00
Jeremy Kemper
148da357f0
Explicit dependency on Proc#bind extension
2009-03-28 23:54:00 -07:00
Jeremy Kemper
7269842080
Explicit dependency on OrderedHash
2009-03-28 23:53:04 -07:00
Jeremy Kemper
6f08440538
Explicit dependency on Hash#deep_merge extension
2009-03-28 23:52:46 -07:00
Jeremy Kemper
cb5b2ca5c1
Explicit dependency on Object#instance_values extension
2009-03-28 23:52:15 -07:00
Jeremy Kemper
b4af87317b
Explicit dependency on Array#wrap extension
2009-03-28 23:51:37 -07:00
Jeremy Kemper
d41387fde7
Explicit dependency on String#start_with? extension
2009-03-28 23:51:20 -07:00
Jeremy Kemper
4d46455244
Explicit dependency on multibyte String extension
2009-03-28 23:50:50 -07:00
Jeremy Kemper
e70a9b8cd9
Explicit dependency on Module extensions
2009-03-28 23:50:31 -07:00
Jeremy Kemper
9231e32a07
Convert Time conversions extension module to class reopen
2009-03-28 23:50:06 -07:00
Jeremy Kemper
f8bc0bcff1
Explicit dependency on Date calculations extensions
2009-03-28 23:49:47 -07:00
Jeremy Kemper
83a89b8e85
Convert String conversions, filters, starts/ends_with, and multibyte extension modules to class reopen
2009-03-28 23:49:05 -07:00
Jeremy Kemper
fce68161a4
Convert Range conversions extension module to class reopen
2009-03-28 23:48:27 -07:00
Jeremy Kemper
5d5cde4b02
Convert Numeric bytes and time extension modules to class reopen
2009-03-28 23:48:02 -07:00
Jeremy Kemper
dc0c91656f
Convert Module aliasing and introspection extension modules to class reopen
2009-03-28 23:47:42 -07:00
Jeremy Kemper
a1a040d3c8
Convert Integer time extension module to class reopen
2009-03-28 23:47:21 -07:00
Jeremy Kemper
9130c3147a
Convert Hash conversions extension module to class reopen
2009-03-28 23:46:54 -07:00
Jeremy Kemper
dad8dabd31
Convert DateTime extensions to class reopens
2009-03-28 23:46:23 -07:00
Jeremy Kemper
092b5d125c
Convert Date calculations and conversions extension modules to class reopens
2009-03-28 23:45:34 -07:00
Jeremy Kemper
609c1988d2
Tease out Object#acts_like? behaviors
2009-03-28 23:43:26 -07:00
Jeremy Kemper
389b081e37
Unneeded util require
2009-03-28 23:38:21 -07:00
Jeremy Kemper
699d2146fc
Explicit class attribute accessor, benchmark, and NameError extension dependencies
2009-03-28 23:37:56 -07:00
Jeremy Kemper
1321b37212
Explict class attribute accessor dependency
2009-03-28 23:37:32 -07:00
Jeremy Kemper
47c7177ef5
Explicit Time/DateTime dependencies
2009-03-26 19:10:37 -07:00
Jeremy Kemper
4b921a5bdf
Hack in env variable setting for Dependencies.mechanism
2009-03-26 19:10:13 -07:00
Jeremy Kemper
f3f5f40e44
Narrow dependencies
2009-03-26 19:08:40 -07:00
Jeremy Kemper
cf95f75695
Explicit NameError dependency
2009-03-26 19:08:13 -07:00
Jeremy Kemper
1c5a6944d3
Convert Time extension modules to class reopens
2009-03-26 19:07:44 -07:00
Jeremy Kemper
7985298948
Convert DateTime extension modules to class reopens
2009-03-26 19:03:37 -07:00
Jeremy Kemper
34929fed22
Fix timezone test
2009-03-26 19:02:11 -07:00
Jeremy Kemper
2a1ae9e8a1
Extract time fixes into separate extensions
2009-03-24 23:03:36 -07:00
Jeremy Kemper
af4c2375a2
Remove core ext dependency from test
2009-03-24 23:02:23 -07:00
Jeremy Kemper
9ea840f568
Explicitly require core extension under test
2009-03-24 23:01:52 -07:00
Jeremy Kemper
cecac31170
Explicit dependency on Inflector and Object#blank?
2009-03-24 19:47:11 -07:00
Jeremy Kemper
f8dbd416b6
Explicit dependency on class_inheritable_accessor
2009-03-24 19:46:42 -07:00
Jeremy Kemper
712baccef5
Remove unnecessary use of Kernel#silence_warnings
2009-03-24 19:46:07 -07:00
Jeremy Kemper
a27ee86c38
Explicit dependency on Array#extract_options!
2009-03-24 19:45:35 -07:00
Jeremy Kemper
3f7130aed8
Document NameError extensions
2009-03-24 17:04:27 -07:00
Jeremy Kemper
614fccd8c4
Don't require out of load path
2009-03-24 17:03:47 -07:00
Jeremy Kemper
1e72610e76
Condense to Kernel#with_warnings
2009-03-24 17:03:27 -07:00
Jeremy Kemper
fe7d3dbb02
Indentation, superfluous self
2009-03-24 17:02:58 -07:00
Ryan Angilly
dd2eb1ea7c
adding session_options initialization and test [ #2303 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-24 10:54:19 -05:00
thedarkone
ae9f258e03
Fix template extension parsing. [ #2315 state:resolved] [ #2284 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-24 10:54:18 -05:00
thedarkone
e3b166aab3
Simplify handling of absolute path templates. [ #2276 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-24 10:54:17 -05:00
David Dollar
4c2f09f23a
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:54:16 -05:00
Peter Marklund
8fa4275a72
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:54:15 -05:00
Joshua Peek
03700b4f01
just kill brittle test
2009-03-24 10:54:14 -05:00
Pratik Naik
f97832b1e4
Merge docrails
2009-03-24 12:15:43 +00:00
Jeremy Kemper
e094940c2b
Move Numeric#to_utc_offset_s to TimeZone.seconds_to_utc_offset
2009-03-23 22:01:51 -07:00
Yehuda Katz and Carl Lerche
1d3e2c2b73
In the middle of some refactoring... some fails due to changes in AbstractController not yet reflected in ActionController tests
2009-03-23 18:06:47 -07:00
Yehuda Katz and Carl Lerche
a501638e9d
Checkpoint
2009-03-23 15:45:01 -07:00
Yehuda Katz
34f058e082
Add a bunch of tests for various render :action, layout combinations
2009-03-23 12:07:34 -07:00
Carl Lerche
4a93148bfe
Adding render :layout tests
2009-03-23 10:23:14 -07:00
Carl Lerche
ab17ecfe5d
Finished implementing :layout for most of the render options
2009-03-23 10:23:14 -07:00
Carl Lerche
c6123c3703
Finished implementing layout for render :text
2009-03-23 10:23:14 -07:00
Carl Lerche
81e814adfa
Working on being able to render :text with layouts
2009-03-23 10:23:14 -07:00
Carl Lerche
90c079a781
Modified the action layout tests to use the new FixtureTemplate class
2009-03-23 10:23:14 -07:00
Jeremy Kemper
0bd668fd88
Namespace HashWithIndifferentAccess
2009-03-21 18:45:09 -07:00
Jeremy Kemper
2133044fec
Hide XmlMini backend details from rdoc
2009-03-21 18:44:00 -07:00
Pratik Naik
d758d996d1
Deprecate Model#validate/validate_on_create/validate_on_update. Use Model.validate :method and likewise
2009-03-21 19:07:15 +00:00
Pratik Naik
320933205e
Deprecate Errors#on_base/add_to_base/invalid?/each_full
2009-03-21 18:34:05 +00:00
Jeremy Kemper
bca510cec2
try is an object extension
2009-03-21 04:39:54 -07:00
Jeremy Kemper
baf73e19a6
Convert Range extension module to a class reopen
2009-03-21 04:39:53 -07:00
Jeremy Kemper
b8d59b7f84
Convert Numeric extension module to a class reopen
2009-03-21 04:39:53 -07:00
Jeremy Kemper
d8cb94c75c
Fix dangling Inflector reference
2009-03-21 04:39:53 -07:00
Jeremy Kemper
21de164f8a
Convert LoadError extension modules to class reopens
2009-03-21 04:39:53 -07:00
Jeremy Kemper
54cf0fc476
Convert integer extension modules to class reopens
2009-03-21 04:39:53 -07:00
Jeremy Kemper
b4a1718832
Convert hash extension modules to class reopens
2009-03-21 04:39:53 -07:00
Jeremy Kemper
bc4e2aa931
Explicitly require set
2009-03-21 04:35:16 -07:00
Jeremy Kemper
8d1d813b66
Simplify Enumerable#each_with_object
2009-03-21 04:35:16 -07:00
Jeremy Kemper
051bab5bd2
Explicitly require pathname core extension
2009-03-21 04:35:16 -07:00
Jeremy Kemper
c43dec888a
Convert date extension modules to class reopens
2009-03-21 04:35:16 -07:00
Jeremy Kemper
bd28c7b1b8
blank? and duplicable? are Object extensions
2009-03-21 04:35:16 -07:00
Jeremy Kemper
005b40194e
Convert bigdecimal extension modules to class reopens
2009-03-21 04:35:16 -07:00
Jeremy Kemper
83fd1ae122
Convert array extension modules to class reopens
2009-03-21 04:35:16 -07:00
Jeremy Kemper
d5e87e3be0
Simple singleton. We don't need the full monty.
2009-03-21 04:35:16 -07:00
Jeremy Kemper
a970e32c91
Only require builder at startup if we need to monkey with its String#to_xs demands
2009-03-21 04:35:16 -07:00
Jeremy Kemper
dd15a3fee0
Prefer a less intrusive BlankSlate-alike that doesn't hook Object# and Kernel#method_added to remove future methods
2009-03-21 04:35:15 -07:00
Jeremy Kemper
a4e3aac40a
* Introduce ActiveSupport.core_ext Integer, %w(conversions time etc)
...
* Convert some extension modules to simply reopening the class
* Remove deprecated Float time extensions
* Fold Base64 extension into ActiveSupport::Base64 since stdlib Base64 is gone
2009-03-21 04:35:15 -07:00
Pratik Naik
2bc4189faf
Get rid of active_model/core and active_model/callbacks
2009-03-21 01:32:59 +00:00
Pratik Naik
e4b89b4680
Validation options dont need explicit :on => :save
2009-03-21 01:16:30 +00:00
Pratik Naik
379e468034
Remove DEFAULT_VALIDATION_OPTIONS from validations
2009-03-21 01:14:58 +00:00
Pratik Naik
22ad30ed60
Move validate_on_create and validate_on_update from ActiveModel to ActiveRecord
2009-03-21 01:11:38 +00:00
Pratik Naik
6173e5bfae
Add ActiveModel::Validations tests for regular ruby classes
2009-03-20 22:21:27 +00:00
Yehuda Katz
dc96ba8043
Temporary runner
2009-03-20 15:02:12 -07:00
Pratik Naik
08a99d0eac
Add I18n translations to ActiveModel and move more AR specific parts to ActiveRecord::Validations
2009-03-20 21:45:13 +00:00
Yehuda Katz
d1256f71d6
Hacked up fixture view paths to simplify tests for a bit
2009-03-20 14:05:10 -07:00
Pratik Naik
cc5e019f6b
Include ActiveModel::Validations from ActiveRecord::Validations
2009-03-20 19:12:18 +00:00
Pratik Naik
09afbfd47f
Fix ActiveResource::Errors deprecation messages
2009-03-20 18:51:01 +00:00
Pratik Naik
bc1dd0b82e
Improve the deprecation message for Errors#on
2009-03-20 18:12:21 +00:00
Pratik Naik
7d187c193c
Validation tests arent using any fixtures
2009-03-20 18:07:35 +00:00
Pratik Naik
78c9791729
ActiveModel.load_all! isn't really needed at this point
2009-03-20 18:02:50 +00:00
Pratik Naik
4a582aa7ca
Use mattr_accessor in TestsDatabase instead of setup method
2009-03-20 17:56:46 +00:00
Pratik Naik
37283a6aae
Deprecate Error#on(attribute) in favour of Errors#[attribute]
2009-03-20 17:36:22 +00:00
Pratik Naik
4367f39dea
TestDatabase -> TestsDatabase
2009-03-20 16:02:12 +00:00
Pratik Naik
d01e639daf
Remove unused columns from the ActiveModel test schema
2009-03-20 15:33:40 +00:00
Pratik Naik
cda984d314
Future deprecation message
2009-03-20 15:27:55 +00:00
Pratik Naik
60756ad4ec
Move relevant validation tests from Active Record to Active Model
2009-03-20 15:07:49 +00:00
Pratik Naik
e945bcfe4a
Add test sqlite3 db to .gitignore
2009-03-20 11:22:27 +00:00
Pratik Naik
5b1a1bf5bf
Make Active Model test suite similar to Active Record
2009-03-20 10:32:24 +00:00
Pratik Naik
93e2d378df
Autload ActiveModel::Observing
2009-03-20 01:13:24 +00:00
Pratik Naik
77acfefedf
Make Active Resource use ActiveModel::Errors
2009-03-19 23:45:08 +00:00
Pratik Naik
638333b7a1
Move uniqueness and association validations to Active Record
2009-03-19 23:44:30 +00:00
Pratik Naik
8828b2ca67
Move all the Active Record validations to Active Model
2009-03-19 23:28:59 +00:00
Yehuda Katz
7a86f8ea90
Test controller layout
2009-03-19 16:11:20 -07:00
Jeremy Kemper
6ed42ebdff
Merge branch 'master' into bodyparts
2009-03-19 16:03:41 -07:00
Yehuda Katz
890321e51e
Get very basic layouts working.
...
* Required small architecture change
2009-03-19 15:45:48 -07:00
Yehuda Katz
8ab37c7660
Started implementing render :action
2009-03-19 13:35:39 -07:00
Jeremy Kemper
0d5b50ee3a
pluginize concurrent block body part
2009-03-19 03:31:55 -07:00
Yehuda Katz
e0447023db
Implemented basic template rendering in AC::Base2:
...
* Created several macros for writing simpler specs
* Finished making Rack::Test work right
* Implemented render_to_string
* Status Codes
* render :text => nil
2009-03-18 15:58:47 -07:00
Pratik Naik
93b98cb841
Ensure script/plugin doesn't show error message when svn externals are not there
2009-03-18 18:39:56 +00:00
Pratik Naik
11f53db216
Remove outdated script/plugin options
2009-03-18 18:33:44 +00:00
Jeremy Kemper
6335f5d518
Merge branch 'master' into bodyparts
2009-03-18 11:18:48 -07:00
Yehuda Katz
fb626ee390
Rework NewCallbacks to not require method_missing
2009-03-17 18:05:08 -07:00
Yehuda Katz
e6e3e3dfbc
Temporarily reraise to simplify debugging
2009-03-17 18:04:41 -07:00
Yehuda Katz
f55514125c
Working toward getting a basic AbstractController framework
2009-03-17 18:04:22 -07:00
Jeremy Kemper
70e3dfb2e9
Pare down unit test
2009-03-16 12:09:34 -07:00
Jeremy Kemper
4a7b11d5d8
Less ceremony
2009-03-13 18:49:53 -07:00
Jeremy Kemper
2f998fc81f
Extract output buffer test
2009-03-13 03:23:13 -07:00
Jeremy Kemper
b2f98c13a3
Simplify parts and tests
2009-03-13 03:16:14 -07:00
Jeremy Kemper
d54d97b07c
Fix tests
2009-03-13 03:01:47 -07:00
Jeremy Kemper
5d76dee329
Example using an edge side include body part to fetch queued rendering results
2009-03-13 02:55:24 -07:00
Jeremy Kemper
7c1714cbd0
Body parts: future rendering, threaded future, queued future, open-uri example
2009-03-13 02:36:15 -07:00
Jeremy Kemper
79b0b1a0ef
Extract Response#string_body?
2009-03-13 02:15:51 -07:00
Jeremy Kemper
7e6c310b05
Merge branch 'master' into bodyparts
...
Conflicts:
actionpack/lib/action_view/base.rb
2009-03-13 01:10:39 -07:00
Jeremy Kemper
3d260760f0
Introduce flush_output_buffer to append the buffer to the response body then start a new buffer. Useful for pushing custom parts to the response body without disrupting template rendering.
2009-03-13 00:25:05 -07:00
Jeremy Kemper
91d2740595
Return body parts directly to Rack rather than building a response string ourselves. Allows Rack middleware to orchestrate response building.
2009-03-12 21:47:34 -07:00
Jeremy Kemper
c8c2b3820e
Eliminate internal render stack since we only need its head and tail
2009-03-12 12:34:22 -07:00
Yehuda Katz
a2637e9f1f
Try to build a new AC::Base on top of AbstractController
2009-03-12 13:19:13 -06:00
Yehuda Katz
67f9b39bd0
Use extlib accessor for new callbacks
2009-03-12 13:18:31 -06:00
Yehuda Katz
72b365ece9
Move Abstract stuff to autoload
2009-03-12 13:18:15 -06:00
Yehuda Katz
0c92a51dad
Handle nil QS
2009-03-12 13:17:57 -06:00
Yehuda Katz
f8088d7def
memoize correctly ;)
2009-03-03 17:20:57 -08:00
Yehuda Katz
6001cea5d7
Helpers with an initial test
2009-03-03 16:42:20 -08:00
Yehuda Katz
cde9aab823
Callbacks test
2009-02-27 20:49:44 -08:00
Yehuda Katz
9510070f78
Fixes multiple conditions
2009-02-27 19:37:09 -08:00
Yehuda Katz
c16c7a8de4
Add support for callbacks
2009-02-27 19:25:45 -08:00
Yehuda Katz
ee80dad680
Initial hooks
2009-02-27 15:11:02 -08:00
Yehuda Katz
d1157e7242
AbstractController now supports layouts and rendering
2009-02-27 11:42:13 -08:00
Yehuda Katz
b1f078bddf
First, very early, AbstractController code. More to come
2009-02-24 17:25:21 -08:00
Yehuda Katz
d6b9f8410c
Remove errant debug code
2009-02-03 08:04:14 -08:00
Yehuda Katz
d4a817c066
Make tests pass
2009-02-02 14:01:29 -08:00
Yehuda Katz
ff68430077
Whoops.
2009-02-02 12:03:35 -08:00
Yehuda Katz
9744f687cc
Add support for pending
2009-02-02 11:49:32 -08:00
Yehuda Katz
6faff0223b
Merge commit 'rails/3-0-unstable'
2009-02-02 09:54:27 -08:00
Yehuda Katz
44cdf0c5fe
Some merge cleanup
2009-02-02 09:54:23 -08:00
Jeremy Kemper
4945d92b03
Remove dead cgi_ext require
2009-01-31 14:46:02 -08:00
Jeremy Kemper
8da52b13b5
Remove duplicate ConcurrentHash
2009-01-31 14:44:04 -08:00
Yehuda Katz
3030bc90c9
Merge commit 'rails/3-0-unstable'
...
Conflicts:
actionpack/lib/action_controller/base.rb
actionpack/lib/action_dispatch/http/mime_type.rb
actionpack/lib/action_dispatch/http/request.rb
actionpack/lib/action_view/base.rb
actionpack/lib/action_view/paths.rb
actionpack/test/controller/session/cookie_store_test.rb
actionpack/test/dispatch/rack_test.rb
actionpack/test/dispatch/request_test.rb
2009-01-30 11:30:27 -08:00
Yehuda Katz
ae42163bf5
Merge branch 'master' of git@github.com:wycats/rails
2009-01-30 11:01:11 -08:00
Yehuda Katz
da10673e32
Sync 'rails/rails/master'
2009-01-30 10:53:19 -08:00
Joshua Peek
85750f22c9
Move dispatch related tests into test/dispatch
2009-01-28 22:50:46 -06:00
Joshua Peek
319ae4628f
Move HTTP libs and middleware into ActionDispatch component
2009-01-27 18:54:01 -06:00
Joshua Peek
a0f2b1d95d
Reorganize ActionController folder structure
2009-01-27 18:17:39 -06:00
Yehuda Katz
eb9af20b7c
Begin unifying the interface between ActionController and ActionView
2009-01-22 16:18:10 -06:00
Joshua Peek
cc0b5fa993
Merge branch 'master' into 3-0-unstable
...
Conflicts:
ci/cruise_config.rb
2009-01-22 15:13:47 -06:00
lholden
19f8bb2808
Merge branch 'master' of git://github.com/rails/rails
2009-01-21 16:17:24 -08:00
Yehuda Katz
b8fadd708b
Sync 'rails/rails/master'
2009-01-14 16:48:57 -08:00
Yehuda Katz
f65333a4cf
Sync 'rails/rails/master'
2009-01-13 14:24:14 -08:00
Yehuda Katz
0932b012fa
Sync 'rails/rails/master'
2009-01-13 13:28:28 -08:00
Yehuda Katz
6fe739ad75
Sync 'rails/rails/master'
2009-01-11 13:02:44 -08:00
Yehuda Katz
e8980ad278
Sync 'rails/rails/master'
2009-01-09 18:58:47 -08:00
Jeremy Kemper
bb03719943
Fix test broken by test process changes
2009-01-09 00:14:28 -08:00
Jeremy Kemper
431e696b89
Remove Content-Length header from :no_content responses
2009-01-09 00:14:28 -08:00
Jeremy Kemper
72c9834666
Set assigns for integration tests also
2009-01-09 00:14:28 -08:00
Jeremy Kemper
d99b4ec57f
Take care not to mix in public methods
2009-01-09 00:14:28 -08:00
Jeremy Kemper
e3be52c1dd
Use instance_eval instead of adding an accessor to the class
2009-01-09 00:14:28 -08:00
Jeremy Kemper
cf09fa74f7
Include process methods in ActionController::TestCase only. No need to alias_method_chain :process either.
2009-01-09 00:14:27 -08:00
Jeremy Kemper
c2d23affad
Object#tap for Ruby < 1.8.7
2009-01-09 00:14:27 -08:00
Pratik Naik
b1530545d2
Fix JSON decoder date-converter regexp [ #1662 state:resolved] [Jonathan del Strother]
2009-01-09 00:14:27 -08:00
Michael Koziarski
84e6ad3fb9
Spam people with commit rights on test failures.
2009-01-09 00:14:27 -08:00
Mike Gunderloy
a08bbd6a4c
Update CI configuration to reflect latest gems.
2009-01-09 00:14:27 -08:00
Mike Gunderloy
e57cb2629a
Update CI configuration to reflect latest gems.
2009-01-07 16:59:06 +13:00
Yehuda Katz
dabf20d54b
Sync 'rails/rails/master'
2009-01-06 17:43:58 -08:00
Yehuda Katz
3027f9f918
Sync 'rails/rails/master'
2009-01-05 17:21:29 -08:00
Yehuda Katz
db619c4a41
Sync 'rails/rails/master'
2009-01-05 01:10:55 -08:00
Yehuda Katz
ca54cc5df7
Sync 'rails/rails/master'
2009-01-04 00:56:52 -08:00
Yehuda Katz
a38c749d8b
Sync 'rails/rails/master'
2009-01-02 22:16:48 -08:00
Jeremy Kemper
42b32938d9
Only silence backtrace from plugin lib dirs
2009-01-01 00:13:12 -08:00
Jeremy Kemper
658cf556d2
Test that exceptions raised in filters are properly rescued
2009-01-01 00:13:11 -08:00
Jeremy Kemper
6b3c702bd7
Fix formatted_* deprecation message
2009-01-01 00:13:11 -08:00
Jeremy Kemper
724151d881
Clean trailing / after rails root from backtraces
2009-01-01 00:13:11 -08:00
Mike Gunderloy
feb807dda1
Fix named scope tests for sqlite3 [ #1667 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-01 00:13:11 -08:00
Mike Gunderloy
abfa46e3a6
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 >
2009-01-01 00:13:11 -08:00
Joshua Peek
ab7c25d511
Clean up view path cruft and split path implementations into Template::Path and Template::EagerPath
2009-01-01 00:13:11 -08:00
Mike Gunderloy
860dd77006
Fix failing gem dependency tests [ #1659 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-01 00:13:10 -08:00
Mike Gunderloy
c5e9aa0040
Fix FCGI dispatching tests
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-01-01 00:13:10 -08:00
Mark Reginald James
ea20901764
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 >
2009-01-01 00:13:10 -08:00
Frederick Cheung
373e94a03f
Fix to_sentence being used with options removed by 273c77
2009-01-01 00:13:10 -08:00
Roman Shterenzon
7276128fb4
Fix HasManyAssociation#create ignoring the :primary_key option [ #1633 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2009-01-01 00:13:10 -08:00
Frederick Cheung
27cfeb7cbc
Fix :include of has_one with :primary_key option
2009-01-01 00:13:10 -08:00
Frederick Cheung
3825f173d9
Fix :include of has_many associations with :primary_key option
2009-01-01 00:13:10 -08:00
Jeremy Kemper
15702104a5
Don't construct object deprecation proxy if unneeded
2009-01-01 00:13:09 -08:00
Michael S. Klishin
31fb733bae
It was decided that Multibyte does not belong to as/mini.
2008-12-29 23:31:57 +03:00
Michael S. Klishin
069534af4f
Sync with rails/rails/master
2008-12-29 00:50:18 +03:00
Michael S. Klishin
19208e7422
Pull up some other changes from rails/rails/master
2008-12-29 00:16:42 +03:00
Michael S. Klishin
bdba0b9a7a
Sync i18n update from rails/rails/master
2008-12-28 23:48:18 +03:00
Michael S. Klishin
2b8750eba4
Sync with rails/rails/master, merge two metaprogramming annotation efforts
2008-12-28 23:47:29 +03:00
Michael S. Klishin
e523b43e20
Use active_support/mini instead of active_support/minimalistic
2008-12-28 22:18:03 +03:00
Michael S. Klishin
12bff2af40
Sync with wycats/rails/master
2008-12-28 22:05:43 +03:00
Michael S. Klishin
89e98955c7
active_support/minimalistic.rb => active_support/mini.rb
2008-12-28 21:41:48 +03:00
Michael S. Klishin
d77deb89d5
Annotated metaprogramming code across ActiveSupport
2008-12-28 13:21:10 +03:00
Michael S. Klishin
133925804f
Introduce minimalistic package for ActiveSupport.
...
To simplify using of ActiveSupport in 3rd party libraries,
a simple way to require only minimum of commonly used extensions
(multibyte, inflections, array and hash extensions, #blank?, and a few
others) is needed. For exactly this reason some out-of-Rails-space
libraries adopted Extlib, originally from DataMapper.
To keep it 2067% backwards compatible, and still available
to everyone even in 2.x releases, active_support/minimalistic.rb
was added.
Use it like this:
gem 'active_support', '>=2.3'
require 'active_support/minimalistic'
instead of
require 'activesupport'
Right now this package with RubyGems uses about 10 megs of RAM
(10.01 or so). It can be further slimmed down though, once we simplify
multibyte implementation that right now uses advanced accessors
from Module extensions.
To compare RAM usage with previous ActiveSupport versions and Extlib,
at the time of writing, see http://gist.github.com/40401 .
2008-12-28 11:26:57 +03:00
Yehuda Katz
5da3ba1215
Merge commit 'rails/master'
2008-12-26 23:16:52 -08:00
Yehuda Katz
9b2da52914
Merge commit 'rails/master'
2008-12-26 12:29:44 -08:00
Michael S. Klishin
e4314d4362
Inline the only call site of Mime::Type#browser_generated?
...
Signed-off-by: Michael S. Klishin <michael@novemberain.com >
2008-12-26 04:13:16 +03:00
Yehuda Katz
69e349f1bb
Initial work to merge several places with similar logic
2008-12-25 17:12:33 -08:00