Commit Graph

7353 Commits

Author SHA1 Message Date
Joshua Peek
68289693f7 Check for response in builder template since ActionMailer does not have one 2008-07-11 11:14:59 -05:00
Joshua Peek
7d5c447d9c Stubba is included in Mocha already 2008-07-11 11:12:53 -05:00
Clemens Kofler
feb08984ea Added notes to Routing documentation and routes.rb regarding defaults routes opening the whole application for GET requests
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-07-10 09:29:27 +02:00
Jeremy Kemper
d37e641336 Move accept header parsing shortcut to Mime::Type.parse 2008-07-09 11:30:18 -07:00
Jeremy Kemper
0ce7fe5308 Don't repeatedly convert only/except options 2008-07-09 10:42:30 -07:00
Cheah Chu Yeow
ce4a1bb853 Remove some Symbol#to_proc usage in runtime code. [#484 state:resolved] 2008-07-09 10:42:30 -07:00
Jeremy Kemper
11252e35b1 Boolean type casting creates fewer objects 2008-07-09 10:42:30 -07:00
Jeremy Kemper
f82bd31cb0 Request#accepts special-cases a single mime type 2008-07-09 10:42:30 -07:00
Jeremy Kemper
a6d0ae28e3 Fix teardown method name typo 2008-07-09 10:42:30 -07:00
Jeremy Kemper
ee6bbcb6ae Put a newline rather than a semicolon at the end of RJS source to avoid parse errors with embedded heredocs 2008-07-09 10:42:29 -07:00
Jeremy Kemper
7dc10478e5 Use ActionController::Base.logger to report template compilation errors since there is no AV::Base.logger 2008-07-09 10:42:29 -07:00
Jeremy Kemper
4354aa36fb Rendering default template for missing actions works with non-word characters in action name 2008-07-09 10:42:29 -07:00
Jeremy Kemper
350faf14e8 Pass caller to concat deprecation warning 2008-07-09 10:42:29 -07:00
Michael Koziarski
4ce9931f4f Reenable the use of the Accept header to give people a chance to update their applications and provide feedback. 2008-07-09 18:36:15 +02:00
David Heinemeier Hansson
6b61e95dc8 Changed PrototypeHelper#submit_to_remote to PrototypeHelper#button_to_remote to stay consistent with link_to_remote (submit_to_remote still works as an alias) (clemens) [#8994 status:closed] 2008-07-09 09:13:24 -05:00
Daniel Guettler
84af99e78d Ensure NamedScope#build/create/create!/new works as expected when named scope has hash conditions. [Daniel Guettler, Pratik Naik] [#419 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-09 14:09:17 +01:00
Chris Cherry
124d1016fa Allow Infinity (1.0/0.0) to pass validates_numericality_of. [#354 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-09 13:15:07 +01:00
Cheah Chu Yeow
96708af6a5 Ensure url_for(nil) falls back to url_for({}). [#472 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-09 13:02:14 +01:00
Hongli Lai (Phusion
2b4eb586ef Plugin locator: sort directory listing because we can't assume that the OS will do it for us. This fixes some unit test failures. 2008-07-09 13:34:36 +02:00
Damian Janowski
91320f2a80 Add :recursive option to javascript_include_tag and stylesheet_link_tag to be used along with :all. [#480 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-08 13:50:59 +01:00
Michael Koziarski
2f4aaed7b3 Disable the Accept header by default
The accept header is poorly implemented by browsers and causes strange errors when used on public sites where crawlers make requests too.  You should use formatted urls (e.g. /people/1.xml) to support API clients. Alternatively to re-enable it you need to set:

config.action_controller.use_accept_header = true

A special case remains for ajax requests which will have a javascript format for the base resource (/people/1) if the X-Requested-With header is present.  This lets ajax pages still use format.js despite there being no params[:format]
2008-07-07 07:31:49 +02:00
Brad Greenlee
afa0c7f728 Add support for :primary_key option to has_one as well as has_many so that a key other than the default primary key can be used for the association
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-07-06 20:25:10 +02:00
Andre Arko
3351d29970 Add has_many :primary_key option to allow setting the primary key on a has many association
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-07-06 20:25:10 +02:00
Joshua Peek
1d8623b42f Added local assign keys to compiled method name so two threads evaluating the same template with different locals don't step on top of each other 2008-07-06 01:13:15 -05:00
Joshua Peek
7b9e8ae273 Synchronize template compiling 2008-07-06 00:00:45 -05:00
Joshua Peek
9828aecd2a Lookup compiled methods in CompiledTemplates instance methods set instead of using a "methods_names" hash 2008-07-05 23:54:11 -05:00
Joshua Peek
ce5d958f8f Do not stat template files in production mode before rendering. You will no longer be able to modify templates in production mode without restarting the server 2008-07-05 18:35:52 -05:00
Joshua Peek
f22ae15a8e Use the inline template's hash as a method key instead of relying on a counter 2008-07-05 17:49:49 -05:00
Joshua Peek
5a3bc6f12f Removed unused template_args variable 2008-07-05 17:40:39 -05:00
Joshua Peek
27f382641c Deprecated TemplateHandler line offset 2008-07-05 17:31:57 -05:00
Joshua Peek
cd6fe83152 Ensure all complied method names are cleaned up in the error backtrace 2008-07-05 16:34:51 -05:00
Joshua Peek
39ba2da82b Moved complied method name logic into Renderable 2008-07-05 16:27:43 -05:00
Joshua Peek
1dcc59121b Renamed Renderer to Renderable 2008-07-05 12:05:50 -05:00
Jeremy Kemper
271f5b655f Fix rdoc for Filters::ClassMethods 2008-07-04 12:51:16 -07:00
Pratik Naik
cb645c8877 Use ActiveSupport::TimeZone in time:zones rake tasks 2008-07-04 20:07:00 +01:00
Michael Koziarski
c3aaba0180 Simplify the implementation of assert_redirected_to to normalise the urls before comparing. Also allows for a simpler implementation of redirect_to without most of the recursion.
Also allows for assert_redirected_to @some_record
2008-07-04 10:41:40 +03:00
Michael Koziarski
db58391079 Remove old broken follow_redirect from functional tests. Still works in integration tests.
The follow_redirect in functional tests only worked if you used redirect_to :id=>foo, :action=>bar, rather than named routes.
2008-07-04 10:41:40 +03:00
Michael Koziarski
51e13d51ad Move test related core_ext stuff out of regular core ext to prevent nasty surprises when you require active_support then use Test::Unit directly. 2008-07-04 10:41:39 +03:00
Joshua Peek
01637796d7 Revert "Moved TemplateHandlers to Base"
This reverts commit 42d215a925.

Conflicts:

	actionpack/lib/action_view/inline_template.rb
	actionpack/lib/action_view/template.rb
2008-07-03 21:09:37 -05:00
josevalim
bad1eac91d Allow caches_action to accept cache store options. [#416 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-04 02:00:51 +01:00
David Lowenfels
87fbcaa622 Add :tokenizer option to validates_length_of. [#507 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-04 01:31:39 +01:00
miloops
570f5aad66 Allow date helpers to ignore date hidden field tags. [#503 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-04 01:06:22 +01:00
Joshua Peek
1a478923dc Reduce the number of callsites for new TemplateFiles 2008-07-03 14:01:45 -05:00
Joshua Peek
8a442e0d57 Extracted Template rendering logic into Renderer module 2008-07-03 13:06:00 -05:00
Joshua Peek
7d5c8505f5 Use render on InlineTemplate 2008-07-03 12:50:43 -05:00
Joshua Peek
b6f89a8bf5 Don't rely on view instance logger 2008-07-03 12:49:54 -05:00
Joshua Peek
42d215a925 Moved TemplateHandlers to Base 2008-07-03 12:48:00 -05:00
Michael Koziarski
75e04b5295 Tighten the rescue clause when dealing with invalid instance variable names in form_helper. 2008-07-03 19:43:20 +03:00
Michael Koziarski
d79cde37ea Move the file exists checks outside write_asset_file_contents.
This lets us avoid the relatively costly trip through compute_*_paths if the file already exists.
2008-07-03 19:43:14 +03:00
Michael Koziarski
12cf8f348b Move template_format logic out to the request so it's alongside the 'regular' request format.
Use xhr? instead of the expensive trip through Request#accepts.
2008-07-03 19:43:06 +03:00