Commit Graph

16943 Commits

Author SHA1 Message Date
Josh Kalderimis
fd03f1738e removed default Formatter in logger, not needed with 1.8.7 upwards
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-22 01:19:02 +02:00
Josh Kalderimis
dad71c6099 removed 'unless const_defined?' code smell
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-21 23:34:45 +02:00
José Valim
0421fb7a91 Refactor previous commit a bit [#4057 state:resolved] 2010-06-21 12:17:24 +02:00
Jeroen van Dijk
26392c4ac5 Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an options hash and make various Validators pass their (filtered) options.
This makes it possible to pass additional options through Validators to message generation. E.g. plugin authors want to add validates_presence_of :foo, :format => "some format".

Also, cleanup the :default vs :message options confusion in ActiveModel validation message generation.

Also, deprecate ActiveModel::Errors#add_on_blank(attributes, custom_message) in favor of ActiveModel::Errors#add_on_blank(attributes, options).

Also, refactoring of ActiveModel and ActiveRecord Validation tests. Test are a lot more DRY now. Better test coverage as well now.

The first four points were reapplied from an older patch of Sven Fuchs which didn't apply cleanly anymore and was not complete yet.

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-21 11:55:21 +02:00
Jeff Kreeftmeijer
ead72b319f Changed ruby /path/to/rails myapp --dev to ruby /path/to/rails new myapp --dev in the "Thor is not avalable" message. [#4915 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-21 11:10:25 +02:00
rohit
45b263cbf1 Initialize @last_update_at in file_update_checker to hide warnings in AS test suite.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-21 11:10:19 +02:00
Xavier Noria
b311dbb0ba Revert "files in the lib directory are no longer autoloaded"
This patch is not consistent since it leaves similar
directories in load_paths, needs more thought.

This reverts commit b5fe014fdc.
2010-06-21 01:46:24 +02:00
Emilio Tagua
7b7cedcb8d Don't waste time building relations if there are no values presents. [#4860 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-21 01:10:33 +02:00
Hongli Lai (Phusion)
756d77622b Allow instrumentation of cache hits and misses. [#4888 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-21 01:09:55 +02:00
José Valim
f81666698b Alias app to build_middleware_stack for clarity. 2010-06-21 01:08:50 +02:00
José Valim
746a385678 Remove unused webrick_server file. 2010-06-21 01:03:48 +02:00
Xavier Noria
b5fe014fdc files in the lib directory are no longer autoloaded
Conceptually, the lib directory is closer 3rd party libraries
than to the application itself. Thus, Rails adds it to Ruby's
load path ($LOAD_PATH, $:) but it is no longer included in
dependencies' load paths.

To enable autoloading back put this in your config/application.rb

  config.load_paths += %W( #{config.root}/lib )
2010-06-21 00:40:00 +02:00
Xavier Noria
69fec3ab3f adds parens to silence a warning in the test suite of AS 2010-06-20 23:29:37 +02:00
Xavier Noria
207fa59675 Merge remote branch 'rails/master'
Conflicts:
	actionpack/lib/abstract_controller/base.rb
2010-06-20 23:13:19 +02:00
rspeicher
31cadc730a Generators Guide: Typo of my own 2010-06-20 16:42:20 -04:00
rspeicher
cd54e610f4 Merge branch 'master' of github.com:lifo/docrails 2010-06-20 16:39:52 -04:00
rspeicher
1168d65237 Generators Guide: Style/grammar changes and minor typos 2010-06-20 16:39:44 -04:00
rspeicher
1cc71d7931 Generators Guide: Make titles conform to conventions 2010-06-20 16:38:05 -04:00
Rizwan Reza
c20cfe477a Take out documentation from DeprecatedMapper to discourage its usage. 2010-06-21 01:02:25 +04:30
Rizwan Reza
3ec7b1cba3 Use h1 for titles. 2010-06-21 01:00:42 +04:30
Rizwan Reza
ab7830d66c Final touches and fixes. 2010-06-21 00:56:31 +04:30
Rizwan Reza
96b927d9db Action View is now titled. 2010-06-21 00:50:26 +04:30
Rizwan Reza
1a0dc267f1 Action View is now titled. 2010-06-21 00:50:08 +04:30
Rizwan Reza
3ef1d63a78 All scopes are now cross-referenced. 2010-06-21 00:45:34 +04:30
rspeicher
b083bf2410 Generators Guide: Remove semicolons from prologue, as none of the other guides had them 2010-06-20 16:15:11 -04:00
Paco Guzman
46dd8af179 Update integrated logging format 2010-06-20 19:36:46 +02:00
Rodrigo Rosenfeld Rosas
03216ae252 Fix comment in en.yml datime_select -> datetime_select 2010-06-20 10:41:47 -03:00
José Valim
50d37a7606 Update ActiveSupport CHANGELOG with latest changes. 2010-06-20 14:47:56 +02:00
José Valim
dad80ad786 I18n.reload! is only called if any of the locale files actually changed. 2010-06-20 14:44:38 +02:00
José Valim
772c2b0b86 Use the new ActiveSupport::FileUpdateChecker instead of RoutesReloader. 2010-06-20 13:37:58 +02:00
José Valim
71703c98ba Add ActiveSupport::FileUpdateChecker. 2010-06-20 13:26:42 +02:00
José Valim
9e081caee7 Improve documentation for add_lib_to_load_paths! 2010-06-20 13:03:08 +02:00
Thibaud Guillaume-Gentil
5522578d16 Fixed date_select date_separator when discard_month and/or discard_day are true [#4856 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 12:33:02 +02:00
rohit
d061050638 Add test for migration generator with name not starting with add or remove. [#4835 state:committed]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 12:32:56 +02:00
Steve Abatangle
4515947845 Fix problem with migrations template that can cause bogus code to be created
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 12:32:51 +02:00
Carlos Antonio da Silva
f9abbf9a4d Adding missing test to autolink with other protocols (file) [#4886 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 12:32:41 +02:00
Jan De Poorter
96f5e59a26 Make sure a namespaced <%= render form %> still renders the _form partial [#4784 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 00:58:10 +02:00
Ryan Duryea
73df48083a Added absolute path for config.ru as well. Turns out this is also needed to fix the daemon issue under ruby 1.8.7
[#4531 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 00:57:29 +02:00
Ryan Duryea
bb324693ab Pass rack the absolute path of server's pid file
When running as a daemon, rack will cd to "/" and paths relative to the
root of the rails app aren't valid when rack is setting up.  Because of
this, "rails server -d" was failing silently when trying to write it's
pid file

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 00:57:15 +02:00
Tarsoly András
bb6cd6d3ec Use Rack::Utils.bytesize when calculating content-length of exception pages. [#4727 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 00:52:35 +02:00
Norman Clarke
667522ca98 Adds titleize/titlecase to AS::Multibyte::Chars
[#2794 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 00:51:19 +02:00
rohit
95a8f252c0 remove executable permission from files that don't need it. [#4802 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 00:50:48 +02:00
Emilio Tagua
e061212e86 Refactor build_arel: move joins out and simplify havings. [#4860 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 00:37:55 +02:00
Sam Elliott and Santiago Pastorino
02ea1aa88c <=> is defined twice on multibyte/chars.rb for Ruby < 1.9
[#4850 state:committed]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 00:35:20 +02:00
James Le Cuirot
f664c57fe8 Don't overwrite unsaved updates when loading an association but preserve the order of the loaded records. Reapplied from before but now allows already-saved records to be refreshed.
[#4830 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 00:32:06 +02:00
Chris Griego
98a5188f51 Strip trailing whitespace from generated applications [#4905 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 00:28:41 +02:00
David Chelimsky
86002a0dfe Support render_template in view tests. Useful for specifying which
partials are rendered under different conditions.

[#4903 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 00:26:42 +02:00
Andrew White
1f84061c5c Don't use module to work out shallow name prefix and path as it may not accurately reflect the actual namespace [#4899 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 00:15:48 +02:00
Andrew White
ed3f042e99 Make polymorphic_url and scaffolding work with uncountable resources [#3930 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 00:15:41 +02:00
Andrew White
65ce3d1297 Accept an object for :constraints option [#4904 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 00:15:30 +02:00