Commit Graph

6622 Commits

Author SHA1 Message Date
Rizwan Reza
9dfa06acb4 Edits to caching/fragments. 2010-12-23 16:29:40 +03:30
Rizwan Reza
0997d5a12d More minor edits. 2010-12-23 16:13:36 +03:30
Rizwan Reza
5fb2f0c07f Revised documentation for cache_helper. 2010-12-23 16:06:53 +03:30
Santiago Pastorino
5853583f9b Allow registering javascript/stylesheet_expansions to existing symbols 2010-12-22 21:53:24 -02:00
Xavier Noria
8a3132b8a9 Merge branch 'master' of git://github.com/lifo/docrails 2010-12-23 00:15:10 +01:00
Piotr Sarnacki
09195f10bd Do not use the same hash instance for expansions [#6114 state:resolved]
Using the same hash instance makes using the same expansions for
both javascripts and stylesheets.
2010-12-22 09:44:46 +01:00
John Firebaugh
0b0e6f13c0 Typo (request -> response) 2010-12-21 19:32:34 -08:00
John Firebaugh
d4afde9ab0 Expand ActionDispatch::Reloader docs 2010-12-21 19:26:33 -08:00
Xavier Noria
880f8419c4 Merge branch 'master' of git://github.com/lifo/docrails 2010-12-20 20:13:34 +01:00
José Valim
0cbfd6c28d Small changes on AD::Reloader. 2010-12-20 12:43:02 +01:00
John Firebaugh
435bccda93 Replace AD::Callbacks.to_prepare with AD::Reloader.to_prepare
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-20 12:43:02 +01:00
John Firebaugh
0f7c970e4f Introduce ActionDispatch::Reloader
Based on the implementation on the 2-3-stable branch, patches by Hongli
Lai <hongli@phusion.nl>, and helpful suggestions from José Valim.

Hongli Lai's patches included locking around the request cycle; this is
now handled by Rack::Lock (https://github.com/rack/rack/issues/issue/87/).

[#2873]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-20 12:43:02 +01:00
Santiago Pastorino
ab2bde45f8 Remove require AS::Concern from places where is already in 2010-12-19 19:15:26 -02:00
Vijay Dev
4038a6bc0f minor fixesin READMEs 2010-12-20 01:07:33 +05:30
Santiago Pastorino
f249d07c44 Add missing require 2010-12-19 14:00:08 -02:00
Will
aebbbc78cc Fix respond_with example code so it makes sense 2010-12-19 14:16:54 +11:00
Will
1a6c4c86ea Correct deprecated AR usage in ActionController::MimeResponds documentation 2010-12-19 14:14:02 +11:00
Don Wilson
f71809f257 Fixed number_with_precision rounding error [#6182 state:resolved] 2010-12-18 10:00:37 +01:00
Aaron Patterson
5008d33eee dry up case / when statement 2010-12-17 11:31:15 -08:00
Piotr Sarnacki
07567aea5f Revert "Fixed number_with_precision rounding error [#6182 state:resolved]"
This reverts commit 006ec77e60163d57d655479602230672d98e0f10.
2010-12-17 16:11:47 +01:00
Don Wilson
006ec77e60 Fixed number_with_precision rounding error [#6182 state:resolved] 2010-12-17 11:32:19 +01:00
Piotr Sarnacki
f176b2552e Changelog and guide entries for config.action_view.cache_template_loading 2010-12-16 22:53:19 +01:00
Piotr Sarnacki
e89fff2f6b Bring back config.action_view.cache_template_loading [#5847 state:resolved] 2010-12-16 22:24:48 +01:00
Pavel Gorbokon
96bae30538 Replace rudimentary named_scope with scope. [#6052 state:resolved]
* rename method names (actually in tests)
* rename instance variable @_named_scopes_cache to @_scopes_cache
* rename references in doc comments
* don't touch CHANGELOG :)
2010-12-15 14:02:30 -08:00
brainopia
ebc47465a5 Fix edge cases for domain :all option on cookie store
Dont set explicit domain for cookies if host is not a domain name

[#6002 state:committed]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-12-16 01:49:30 +05:30
Piotr Sarnacki
a462a76bd3 Set proper engine's asset directories when assets are served from engine.
When using stylesheet_link_tag(:all) or javascript_include_tag(:all),
assets directories are searched for css or js files. When
config.serve_static_assets is set to true, those files can be
served directly from engine's directories. That's why assets paths
should be set individually for controllers inside engine
if we want to serve static assets with ActionDispatch::Static
2010-12-16 01:49:29 +05:30
Xavier Noria
3c9486f487 Merge branch 'master' of git://github.com/lifo/docrails 2010-12-15 20:18:36 +01:00
brainopia
439c23dce3 Fix edge cases for domain :all option on cookie store
Dont set explicit domain for cookies if host is not a domain name

[#6002 state:committed]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-12-15 11:03:03 -02:00
Aditya Sanghi
6fc3750471 eternal confusion! fixed doco to inform correctly 2010-12-15 16:13:36 +05:30
Piotr Sarnacki
0e5ee9af48 Set proper engine's asset directories when assets are served from engine.
When using stylesheet_link_tag(:all) or javascript_include_tag(:all),
assets directories are searched for css or js files. When
config.serve_static_assets is set to true, those files can be
served directly from engine's directories. That's why assets paths
should be set individually for controllers inside engine
if we want to serve static assets with ActionDispatch::Static
2010-12-15 10:01:27 +01:00
Ben Mills
73dafba6ca Added :placeholder option to ActionView::Helpers::FormTagHelper text_field_tag 2010-12-13 16:25:17 +10:00
Ryan Bigg
a81f68e879 Fix indentation on the namespace method's documentation 2010-12-13 13:03:41 +10:00
Ryan Bigg
a6bc1f9be4 Remove nodoc from FormBuilder because the methods inside are public API methods 2010-12-13 07:14:16 +10:00
Ryan Bigg
751733ab96 Provide an example for ActionDispatch::Routing::Mapper#scope 2010-12-11 17:27:14 +10:00
Xavier Noria
c6612d2bb3 Merge branch 'master' of git://github.com/lifo/docrails
Conflicts:
	activerecord/lib/active_record/transactions.rb
2010-12-11 00:55:25 +01:00
Ryan Bigg
dbf955c03b Action Controller Overview: Remove dead link to the API docs for filters 2010-12-10 15:55:46 +10:00
Ryan Bigg
f0d4b7f2a6 root method options are the same as the match method 2010-12-10 09:34:40 +10:00
Neeraj Singh
0027b65421 Ensure that while caching a page rails takes into
account the resolved mime type for the request

[#6110 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-09 16:14:57 +01:00
José Valim
d3f7e565d1 Ensure resolvers backward compatibility. 2010-12-09 14:06:44 +01:00
José Valim
8e6d27641c Clean up asset_host and asset_path. 2010-12-09 13:40:45 +01:00
José Valim
cc70ac9508 Properly check the arity for template handlers. 2010-12-09 13:15:40 +01:00
José Valim
28cf77203b Check if the routes object really responds to define_mount_prefix. 2010-12-09 13:15:25 +01:00
Ryan Bigg
fe0e3880e8 root route should go at the *top* of the routes file, because it is the most popular route and should be matched first 2010-12-09 20:21:08 +10:00
Ryan Bigg
d2f98e5b55 indent code samples for mount doc 2010-12-09 20:03:14 +10:00
Ryan Bigg
a47f31c593 mapper.rb: add "options" to make the default-to-namespace-name line read better 2010-12-09 20:01:42 +10:00
Xavier Noria
0aa78826e4 makes a pass to the action caching rdoc 2010-12-08 21:20:53 +01:00
Neeraj Singh
3ac844deec Add to documentation that action caching does
handle HTTP_ACCEPT attribute properly and might
provide wrong result. Use params[:format] to
avoid this issue.
2010-12-06 16:38:47 -05:00
Xavier Noria
48386d245b Merge branch 'master' of git://github.com/lifo/docrails 2010-12-05 10:33:50 +01:00
Carlos Antonio da Silva
e1d0d5ae81 Fix mime type doc typos 2010-12-04 22:40:05 -02:00
Santiago Pastorino
b696dd70db Allow back passing :rescue_format => nil and test added 2010-12-04 20:08:23 -02:00
Santiago Pastorino
be4551f63b Use ||= here 2010-12-04 19:01:00 -02:00
Sven Fuchs
896e25e994 Make TranslationHelper#translate use the :rescue_format option in I18n 0.5.0
Don't catch exceptions here. Instead only declare that we want exceptions to be rescued as :html, but also let users configure reactions to exceptions in I18n.

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-04 18:00:52 +01:00
Sven Fuchs
7ffd5daa7f bump i18n gem
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-04 18:00:31 +01:00
José Valim
226ea0e9e8 Wrap everything in class << self. 2010-12-03 13:27:43 +01:00
José Valim
78afe68afb Merge remote branch 'joshk/redirect_routing'
Conflicts:
	actionpack/CHANGELOG
	actionpack/lib/action_controller/metal/mime_responds.rb

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-03 12:27:50 +01:00
José Valim
ba63c0a9b5 Deprecate handler_class_for_extension as template handlers can be any Ruby object, not necessarily a class. 2010-12-01 11:22:48 +01:00
Aaron Patterson
831a2342c6 just use alias 2010-11-30 20:04:31 -08:00
Josh Kalderimis
1e26bda095 Added documentation explaining the new additional supported syntaxes for the routing redirect method, a small changelog note, and two extra tests for path interpolation when using the hash option syntax. 2010-11-30 17:55:33 +01:00
Josh Kalderimis
0bda6f1ec6 The redirect routing method now allows for a hash of options which only changes the relevant parts of the url, or an object which responds to call can be supplied so common redirect rules can be easily reused. This commit includes a change where url generation from parts has been moved to AD::Http::URL as a class method. 2010-11-30 16:36:01 +01:00
Neeraj Singh
3c7a33c051 Rewording existing comment 2010-11-30 10:00:47 -05:00
Neeraj Singh
aa9a3227a0 Rewording existing comment 2010-11-29 21:38:59 -05:00
José Valim
31906eecdf Fix tests on 1.9.2. 2010-11-28 12:48:50 +01:00
José Valim
a4c360e8c7 trailing star mimes should respect the order in which mime types are defined. 2010-11-28 11:54:00 +01:00
Neeraj Singh
9bd291407c make it clear that recompilation happens only in
development mode
2010-11-27 22:16:51 -05:00
Akira Matsuda
1662aa1a15 Added a space before "do" keyword 2010-11-28 09:42:19 +09:00
José Valim
927c582acf Update CHANGELOG. 2010-11-27 08:12:49 -08:00
Xavier Noria
fd83f9d515 Merge branch 'master' of git://github.com/lifo/docrails 2010-11-27 07:43:59 +01:00
Ryan Bigg
167964149e Add explicit statement that verify_authenticity_token can be turned off for actions. 2010-11-27 07:57:10 +11:00
Aditya Sanghi
5b9f6a74db Resolving LH #5986, cookies doc updates 2010-11-26 16:41:33 +05:30
Santiago Pastorino
74049b57fb implicit self here 2010-11-25 21:31:14 -02:00
Josh Kalderimis
a98d9d65ae move the setting up of the mime collector into the collector on init
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-11-25 21:24:45 -02:00
Josh Kalderimis
2c08ee97c7 move the setting up of the mime collector into the collector on init 2010-11-26 00:21:51 +01:00
José Valim
731ca00b48 Dynamically generaeted helpers on collection should not clobber resources url helper [#6028 state:resolved] 2010-11-25 11:50:29 +01:00
José Valim
90b0f61491 #:nodoc: internal methods. 2010-11-25 11:50:28 +01:00
raggi
cb1570936d Rakefiles are executables, and rake loads rake, not rakefile code 2010-11-25 06:49:55 +08:00
Neeraj Singh
fa2a5ae033 If a user wants json output then try best to render json output. In such cases prefer kind_of(String) over respond_to?(to_str)
[#5841 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-24 22:08:36 +01:00
Neeraj Singh
18adbe9347 process text/* if it appears in the middle of
HTTP_ACCEPT parameter
2010-11-25 04:38:51 +08:00
Neeraj Singh
5c9abb6cca processing image/* is an odditity because there is
a test case which expects image/* to not to be
expanded. So I am leaving image/* as it is and
process only text/* and application/*
2010-11-25 04:38:50 +08:00
Neeraj Singh
b52a6ba169 clean up test by using unregister method 2010-11-25 04:38:50 +08:00
Neeraj Singh
e870883625 unregister method implementation and test 2010-11-25 04:38:47 +08:00
Neeraj Singh
c6030e8562 Remove the not needed setup and teardown 2010-11-25 04:38:45 +08:00
José Valim
8624065bff Allow template handlers to store temp data. 2010-11-24 12:38:52 +01:00
Josh Kalderimis
e39138478b port_string bought back to life as it is part of the public api
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-24 10:34:18 +01:00
Neeraj Singh
8882e65ac8 No need to return anything 2010-11-24 08:00:40 +08:00
Ryan Bigg
e4a9af186a Add mention of nested resource to resources documentation 2010-11-24 09:31:29 +11:00
Ryan Bigg
fd47a4bf43 Document the :path option for resources :posts 2010-11-24 09:28:21 +11:00
Ryan Bigg
01af50d8b6 Add :module option documentation for the resources method 2010-11-24 09:27:12 +11:00
Ryan Bigg
2974f57aae Remove non-sensical first couple of lines for scope method documentation 2010-11-24 09:25:01 +11:00
Ryan Bigg
04af510b56 Paths in ActionDispatch::Scoping documentation should be for /admin/posts, not /admin/photos 2010-11-24 09:21:25 +11:00
Ryan Bigg
769575300a Fix formatting issue with rake routes output for the namespace method 2010-11-24 09:19:27 +11:00
Xavier Noria
0250c3eca4 copy-edits RDoc of 2fe43b6 2010-11-23 22:51:51 +01:00
José Valim
da583df50c Remove bazillion warnings from AP suite. 2010-11-23 10:09:24 +01:00
José Valim
56b1214024 Speed up subdomain and domain calculus. 2010-11-23 10:05:47 +01:00
Josh Kalderimis
2fe43b694f :subdomain, :domain and :tld_length options can now be used in url_for, allowing for easy manipulation of the host during link generation.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-23 09:54:42 +01:00
Aaron Patterson
e83d15376d adding a test for the runner module [#6027 state:resolved] 2010-11-22 15:57:03 -08:00
Aaron Patterson
4395d493c5 sort lists before comparing them 2010-11-22 15:51:29 -08:00
Sven Fuchs
5c86286dd6 add respond_to? to ActionDispatch::Integration::Runner
since Runner uses method_missing to delegate to the integration session it also should define respond_to? accordingly
2010-11-22 15:42:28 -08:00
Neeraj Singh
21fd93cedd make test more resilient to future changes by not
testing the count and not testing the internal value
of the registered mime type.

Ideally all mime type registration should be cleaned up
in teardown.

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:15 +01:00
Neeraj Singh
794b34306e remove select, collect and then inject with
something better

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:15 +01:00
Neeraj Singh
c5bfc6abe4 string include method is 10x faster than creating
a new regex object every single time

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:14 +01:00
Neeraj Singh
8154f4b816 Compile regex only once
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:14 +01:00
Neeraj Singh
cdbbf6fd6b move the mime registration code to setup so that
it could be cleaned up on teardown.

Currently the test code
test/controller/mime_responds_test.rb impacts
test/dispatch/mime_type_test.rb.

dispatch/mime_type_test.rb runs independently fine
but when run as part of rake breaks because of
new mime types registered in
controller/mime_responds_test.rb

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:14 +01:00
Neeraj Singh
23ea19e20d rename star star to just one star
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:14 +01:00
Neeraj Singh
c9147ebfa0 cleanup Mime::LOOKUP after registering image/gif
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:14 +01:00
Neeraj Singh
4154c659fe fix test
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:14 +01:00
Neeraj Singh
6f6e754bac implement code that handles text/*, appplication/*,
and image/*

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:13 +01:00
Neeraj Singh
b798a59bd5 test for text/*, application/* and image/*
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:13 +01:00
Neeraj Singh
d04a21b362 declare regex as a constant
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:13 +01:00
Neeraj Singh
cbb2651cc0 add the fixture file
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:13 +01:00
Neeraj Singh
eb6ccc9953 do not assume that there is no space between
leading */* and comma

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:12 +01:00
Neeraj Singh
f5fba917f8 failing test for #6022
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:12 +01:00
Neeraj Singh
61950a4b05 current code ignores http header "Accept" if it
has ....,*/* .

It is possible to a device to send
request such that */* appear at the beginning of the
"Accept" header. This patch ensures that "Accept" header
is ignored for such cases too.

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:12 +01:00
Santiago Pastorino
c937ddb5ce Remove unused constant 2010-11-22 19:00:05 -02:00
Santiago Pastorino
6e559168dc There's no need for ternary op here 2010-11-22 18:47:47 -02:00
Santiago Pastorino
559c4292bc Remove unneeded metaprogramming and method generation in favor of direct definition 2010-11-22 16:02:13 -02:00
Xavier Noria
799a6fa047 realigns a series of hash arrows 2010-11-21 10:25:23 +01:00
Neeraj Singh
7d5b097357 use_accept_header is no longer supported 2010-11-21 03:29:44 +01:00
Prem Sichanugrist
e65c23dc3e Mention the case that render will return nil if given :collection is nil or empty when rendering partial. 2010-11-21 03:29:44 +01:00
José Valim
d5779efaf2 Ensure calling reset session twice does not raise errors. 2010-11-20 21:56:08 +01:00
Josh Kalderimis
d7db6a8873 class inheritable attributes is used no more! all internal use of class inheritable has been changed to class_attribute. class inheritable attributes has been deprecated.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-20 19:40:29 +01:00
Santiago Pastorino
4f3b5b8ec1 Fix indentation 2010-11-20 02:46:55 -02:00
Santiago Pastorino
d3f8765482 Avoid range object creation 2010-11-20 02:29:57 -02:00
Aaron Patterson
938243feb9 do not require ruby-debug automatically. please require it if you have declared it as a dependency 2010-11-19 16:26:09 -08:00
Henning Koch
deff528947 Fix AssetIncludeTag ensuring that files are in the wrong directory [#6015 state:resolved]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-11-19 15:38:13 -02:00
Santiago Pastorino
bb7b705b0c Fix indentation 2010-11-19 14:26:44 -02:00
Santiago Pastorino
555b7cd04a Don't merge just directly add to the action to the :partial key 2010-11-19 14:26:42 -02:00
Santiago Pastorino
b1ffd65b8f Useless assignation 2010-11-19 14:26:39 -02:00
Santiago Pastorino
52b71c01fd Revert "Quick fix for not escaping []s (not ideal)"
According to http://www.ietf.org/rfc/rfc2616.txt and
http://tools.ietf.org/rfc/rfc3986.txt [ and ] are reserved characters
and should be escaped using "%" HEX HEX

This reverts commit 856d2fd874d72dd9f83204affff4edfef3308361 and
1ee9b40b18a0bed5bb10a0785f7e2730bac983f6..
2010-11-18 23:31:00 -02:00
José Valim
e3d8331c5b Revert "Remove deprecated form_for with strings or symbols"
This code was not deprecated. What was deprecated is the following:

  form_for(:foo, @foo)

Which now should be rewritten as:

  form_for(@foo, :as => :foo)

The following format is valid:

  form_for(:foo)

This reverts commit be797750e6ce866ea08307f63bf35304a965c8d4.
2010-11-18 20:22:14 +01:00
Leonardo Capillera
be797750e6 Remove deprecated form_for with strings or symbols
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-11-18 16:46:55 -02:00
Aaron Patterson
c52e2cf4b3 delegating path and open to internal tempfile 2010-11-18 10:10:25 -08:00
Piotr Sarnacki
ae56c82e2b Added config.action_controller.include_all_helpers to CHANGELOG.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-18 00:29:23 +01:00
Piotr Sarnacki
250fb3f6c2 Add config.action_controller.include_all_helpers, by default it is set to true.
In older rails versions there was a way to use only helpers from
helper file corresponding to current controller and you could also
include all helpers by saying 'helper :all' in controller. This config
allows to return to older behavior by setting it to false.
2010-11-18 00:20:57 +01:00
José Valim
f14c2bf582 Pass the view object as parameter to the handler. Useful if you need to access the lookup context or other information when compiling the template. 2010-11-17 23:50:45 +01:00
Neeraj Singh
fe2f168d40 fix warning during test execution
[#5997 state:resolved]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-11-17 20:19:07 -02:00
Santiago Pastorino
884e3506d2 Bump builder to 3.0.0 2010-11-17 19:35:58 -02:00
Carl Lerche
401c1835af Anchors should be allowed on constraints that are not on path segments 2010-11-16 21:46:15 -08:00
Carl Lerche
ccd2f3ede5 Update the version.rb files to include a PRE part 2010-11-16 17:19:46 -08:00
Josh Kalderimis
e1e780a31d Brought the domain method in AD http url inline with subdomain where @@tld_length is used by default. Also set the default value of @@tld_length to 1. 2010-11-16 18:57:51 +08:00
Josh Kalderimis
2bed4d94e6 changed asset_timestamps_cache to asset_ids_cache, added an rdoc comment to the new public api, and updated the railtie 2010-11-16 00:04:37 +01:00
Josh Kalderimis
ce1f87673c corrected the AV railtie to use the new home for cache_asset_timestamps, and merged asset id caching and asset paths together. 2010-11-16 00:04:37 +01:00
Josh Kalderimis
0ff1c5935f reorganised the the common asset helpers module into a class and have it include the id caching module, this class is now shared from the view instance to the asset include tag helpers (js and css) 2010-11-16 00:04:37 +01:00
Josh Kalderimis
6a609dbc82 incorporated most of the feedback from José 2010-11-16 00:04:37 +01:00
Josh Kalderimis
6747ae2708 reduced duplication between the javascript and stylesheet asset tag methods, also split the asset id caching methods into a separate module for easy inclusion and use by the asset include tag class and base asset tag helpers 2010-11-16 00:04:36 +01:00
Josh Kalderimis
7a38c8b9f5 removed an assert from a test as it was testing a private method 2010-11-16 00:04:36 +01:00
Josh Kalderimis
1c129f8f8e separated the asset id methods to a separate module, removed some dupliation with the various path methods, and moved the base asset tag methods to a base module so the asset id module can play nice with the path generation 2010-11-16 00:04:36 +01:00
Josh Kalderimis
91b0b65834 split the javascript and stylesheet tag helpers into separate files as a precusor before removing the duplication between the two 2010-11-16 00:04:36 +01:00
Aaron Patterson
2b2082eb09 rejecting blank strings 2010-11-15 15:02:18 -08:00
Aaron Patterson
e4591489d1 reduce method calls 2010-11-15 14:22:06 -08:00
Aaron Patterson
0be181bfa0 make sure we are only doing sanity checking against regular expressions 2010-11-15 13:37:27 -08:00
Xavier Noria
91a6db90cf Merge branch 'master' of git://github.com/lifo/docrails 2010-11-15 19:45:46 +01:00
Ryan Bigg
8b5700192e Merge branch 'master' of github.com:lifo/docrails
* 'master' of github.com:lifo/docrails:
  Getting Started guide: remove calls to f.error_messages as it has been removed from Rails
  deliver_* is no more
  removed unnecessary indentation
  added note with example for using flash in redirection
  corrected sample code to clear @_current_user class variable also
  the partial option is not required for simple partial rendering
  colorize_logging is a Rails General Configuration option not a specific option of ActiveRecord
  Fixed the name of the 'generator option'
  this reads better, i don't know what the other 'so on' are, doesn't help reader imho
  added missing word to clear up meaning in my previous commit
  Add a note to TextHelpers making explicit their default behavior of not escaping but sanitizing.
  removed indentation, for code style consistency and readibility
  Use Rails.logger, not ActiveRecord::Base.logger
  removed etc. not require
  added missing space and minor rewording
  corrected to Rails 3 syntax for declaring resources
  Fixes ActionMailer example error
2010-11-15 11:44:04 +08:00
Santiago Pastorino
0262218976 Add f.submit to forms just to show the most common use case 2010-11-14 21:40:34 -02:00
Santiago Pastorino
bdf70fd379 Merge branch 'spastorino-master' 2010-11-14 21:28:11 -02:00
Santiago Pastorino
f597d1ec80 This doesn't make sense here 2010-11-14 21:25:37 -02:00
Santiago Pastorino
4ef6d2e534 Add empty line between previous method and RDoc of submit to allow RDoc appear on api.rubyonrails.org 2010-11-14 21:01:59 -02:00
Ryan Bigg
74061f55be Document the constraints method 2010-11-14 07:32:54 +08:00
Santiago Pastorino
293c8a4de5 Tests added for rendering partial with layout, when the partial contains another render layout with block call added missing fixtures 2010-11-13 13:40:36 -02:00
Santiago Pastorino
e3b68e5f6b Tests added for rendering partial with layout, when the partial contains another render layout with block call 2010-11-13 13:38:40 -02:00
Santiago Pastorino
27f4ffd11a Make collection and collection_from_object methods return an array
This transforms for instance scoped objects into arrays and avoid unneeded queries

[#5958 state:committed]
2010-11-13 04:02:57 -02:00
Ryan Bigg
fe8446fcce Add documentation for :path_names option on resources 2010-11-13 11:16:32 +08:00
Ryan Bigg
95f41fe12e See the scope method for documentation for namespace's shallow_path option 2010-11-13 11:16:06 +08:00
Ryan Bigg
b235519777 Add documentation for the mount method in ActionDispatch's Mapper 2010-11-13 11:15:17 +08:00
Neeraj Singh
793967cd40 provide better error message if path is uri [#5914 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-11 17:27:47 +01:00
Neeraj Singh
fbaf3a23d9 fields_for should treat ActiveRecord::Relation as an array
[#5795 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-11 17:14:47 +01:00
José Valim
a897402863 Remove inline comment. 2010-11-11 17:07:06 +01:00
Marcelo Giorgi
2bb1c202b4 Make after_filter halt when before_filter renders or redirects [#5648 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-11 17:05:07 +01:00
Carlos Antonio da Silva
7846fb79e1 Fix render partial with layout and no block
When using a render :partial with :layout call, without giving a block,
if the given :partial had another render :partial call, the layout was
not being rendered. This commit fixes this context by storing variables
before rendering the partial, so they are not overrided in any successive
call to render partials down the path. All ActionPack tests are ok.
2010-11-11 16:22:39 +01:00
Carlos Antonio da Silva
50c7aab996 Fix issue with rendering partials and then yielding inside a render layout call
The given block was never being executed when another render :partial call
existed before the yield call, due to the block being overriden.

This commit also adds some more tests to render with :layout option.
2010-11-11 16:22:39 +01:00
Aditya Sanghi
920660b19c patching to ensure separator is printed with order [#5816 state:resolved]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-11-11 12:22:15 -02:00
José Valim
9c9f416d39 Allow AR Session Store to be renewed 2010-11-11 14:17:14 +01:00
Xavier Noria
41366cdec6 syncs CHANGELOGs for 3.0.2 in 3-0-stable with the ones in master 2010-11-09 20:56:41 +01:00
Xavier Noria
f57b5197b3 registers number_to_currency's :negative_format in the CHANGELOG 2010-11-09 09:37:32 +01:00
Andrew White
ef46b9f21a Strip regexp anchors from rake routes output [#5934 state:resolved] 2010-11-09 05:24:10 +00:00
José Valim
645f515843 Add a note to TextHelpers making explicit their default behavior of not escaping but sanitizing. 2010-11-08 01:47:49 -08:00
Michael Koziarski
9ecaa80300 Make safe_append= live on AV::OutputBuffer not AS::SafeBuffer
Conflicts:

	actionpack/lib/action_view/template/handlers/erb.rb
2010-11-08 10:10:30 +13:00
Jan Maurits Faber
f04ec6a227 Added support for Erubis <%== tag
<%== x %> is syntactic sugar for <%= raw(x) %>

Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#5918 status:committed]
2010-11-08 09:55:55 +13:00
David Trasbo
990f52ebd7 Make cookies hash in ActionDispatch::TestProcess indifferent access [#5761 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-11-07 14:48:51 -02:00
Ryan Bigg
b591989b5f Fix indentation for :as option documentation on the namespace method 2010-11-07 12:22:39 +10:00
Ryan Bigg
ff3a494e2e Document the :shallow_path option for scope 2010-11-07 12:21:56 +10:00
Ryan Bigg
e6aed6b6a8 Indent final comment for :path option 2010-11-07 12:18:19 +10:00
Ryan Bigg
ee646788fc Indent code example for :as option 2010-11-07 12:17:36 +10:00
Ryan Bigg
7d83673134 Document the :as option for the scope method 2010-11-07 12:11:39 +10:00
Ryan Bigg
ffe97e338e Space between module option documentation and path documentation 2010-11-07 12:09:58 +10:00
Ryan Bigg
4a6150a3eb Fix indentation on comment for :path option 2010-11-07 12:09:38 +10:00
Ryan Bigg
6ca042b3e4 Document the :as option for the namespace method 2010-11-07 12:07:41 +10:00
Ryan Bigg
66d1276d7f Document the :module option for namespace 2010-11-07 12:05:55 +10:00
Ryan Bigg
0eef4e3bfb Document the :path option for namespace 2010-11-07 12:05:14 +10:00
Ryan Bigg
379939e1e0 Begin to document the namespace method for AD's Mapper 2010-11-07 12:04:25 +10:00
Ryan Bigg
e5eece41b5 Document the controller method for AD's Mapper 2010-11-07 11:49:57 +10:00
Ryan Bigg
5f7f3adccd Document the defaults method 2010-11-07 11:39:57 +10:00
Ryan Bigg
5040ecbfea Document the :module and :path options for the scope method. 2010-11-07 11:39:55 +10:00
Ryan Bigg
35c7ca5c37 Separate comments and examples with "Examples" header. 2010-11-07 11:39:53 +10:00
Ryan Bigg
433e1aca86 Fix where the documentation says "photos", but the example shows "posts" or "comments" by switching both to simply "posts" 2010-11-07 11:39:50 +10:00
Ryan Bigg
203e45cd7f Add further documentation + examples for the get, post, put and delete methods in ActionDispatch::Routing::Mapper::HttpHelpers 2010-11-07 11:39:27 +10:00
Santiago Pastorino
46332e458c Move @assigns from the controller to the test itself 2010-11-06 21:15:59 -02:00
Santiago Pastorino
2382667955 Fix problems trying to functional test AC::Metal controllers
[#5393 state:committed]
2010-11-06 21:15:03 -02:00
Chris Eppstein
b1667c7c2c Correctly handle the case of an API response that returns a hash by treating a single hash argument as the resource instead of as options. 2010-11-06 06:56:36 +08:00
Santiago Pastorino
d7ec94f665 Just initialize options with an empty hash 2010-11-03 17:20:02 -02:00
Xavier Noria
208fb2920d made a pass to the docs of :negative_format 2010-11-03 06:20:26 +01:00