actionpack 1.11.2 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of actionpack might be problematic. Click here for more details.
- data/CHANGELOG +392 -5
- data/lib/action_controller.rb +8 -4
- data/lib/action_controller/assertions.rb +9 -10
- data/lib/action_controller/base.rb +177 -88
- data/lib/action_controller/benchmarking.rb +5 -5
- data/lib/action_controller/caching.rb +44 -36
- data/lib/action_controller/cgi_ext/cgi_methods.rb +71 -6
- data/lib/action_controller/cgi_ext/cookie_performance_fix.rb +1 -1
- data/lib/action_controller/cgi_process.rb +36 -24
- data/lib/action_controller/components.rb +152 -52
- data/lib/action_controller/dependencies.rb +1 -1
- data/lib/action_controller/deprecated_redirects.rb +2 -2
- data/lib/action_controller/deprecated_request_methods.rb +34 -0
- data/lib/action_controller/filters.rb +59 -19
- data/lib/action_controller/flash.rb +53 -47
- data/lib/action_controller/helpers.rb +2 -2
- data/lib/action_controller/integration.rb +524 -0
- data/lib/action_controller/layout.rb +58 -23
- data/lib/action_controller/mime_responds.rb +163 -0
- data/lib/action_controller/mime_type.rb +142 -0
- data/lib/action_controller/pagination.rb +13 -7
- data/lib/action_controller/request.rb +59 -56
- data/lib/action_controller/rescue.rb +1 -1
- data/lib/action_controller/routing.rb +29 -10
- data/lib/action_controller/scaffolding.rb +8 -0
- data/lib/action_controller/session/active_record_store.rb +21 -10
- data/lib/action_controller/session/mem_cache_store.rb +18 -12
- data/lib/action_controller/session_management.rb +30 -11
- data/lib/action_controller/templates/rescues/_trace.rhtml +1 -1
- data/lib/action_controller/templates/scaffolds/layout.rhtml +4 -4
- data/lib/action_controller/templates/scaffolds/list.rhtml +1 -1
- data/lib/action_controller/test_process.rb +189 -118
- data/lib/action_controller/vendor/html-scanner/html/node.rb +20 -1
- data/lib/action_controller/vendor/html-scanner/html/tokenizer.rb +3 -0
- data/lib/action_controller/vendor/html-scanner/html/version.rb +1 -1
- data/lib/action_controller/vendor/xml_node.rb +97 -0
- data/lib/action_controller/verification.rb +2 -0
- data/lib/action_pack/version.rb +3 -3
- data/lib/action_view.rb +0 -2
- data/lib/action_view/base.rb +109 -36
- data/lib/action_view/compiled_templates.rb +1 -1
- data/lib/action_view/helpers/active_record_helper.rb +4 -2
- data/lib/action_view/helpers/asset_tag_helper.rb +6 -7
- data/lib/action_view/helpers/capture_helper.rb +49 -12
- data/lib/action_view/helpers/date_helper.rb +14 -4
- data/lib/action_view/helpers/form_helper.rb +136 -20
- data/lib/action_view/helpers/form_options_helper.rb +29 -7
- data/lib/action_view/helpers/form_tag_helper.rb +22 -20
- data/lib/action_view/helpers/java_script_macros_helper.rb +29 -9
- data/lib/action_view/helpers/javascript_helper.rb +50 -446
- data/lib/action_view/helpers/javascripts/controls.js +95 -30
- data/lib/action_view/helpers/javascripts/dragdrop.js +161 -21
- data/lib/action_view/helpers/javascripts/effects.js +310 -211
- data/lib/action_view/helpers/javascripts/prototype.js +228 -28
- data/lib/action_view/helpers/number_helper.rb +9 -9
- data/lib/action_view/helpers/pagination_helper.rb +1 -1
- data/lib/action_view/helpers/prototype_helper.rb +900 -0
- data/lib/action_view/helpers/scriptaculous_helper.rb +135 -0
- data/lib/action_view/helpers/text_helper.rb +7 -6
- data/lib/action_view/helpers/url_helper.rb +23 -14
- data/lib/action_view/partials.rb +12 -4
- data/rakefile +13 -5
- data/test/abstract_unit.rb +4 -3
- data/test/active_record_unit.rb +88 -0
- data/test/{controller → activerecord}/active_record_assertions_test.rb +7 -50
- data/test/{controller → activerecord}/active_record_store_test.rb +27 -4
- data/test/activerecord/pagination_test.rb +161 -0
- data/test/controller/action_pack_assertions_test.rb +18 -15
- data/test/controller/base_test.rb +31 -42
- data/test/controller/benchmark_test.rb +8 -11
- data/test/controller/capture_test.rb +33 -1
- data/test/controller/cgi_test.rb +33 -0
- data/test/controller/custom_handler_test.rb +8 -0
- data/test/controller/fake_controllers.rb +9 -17
- data/test/controller/filters_test.rb +32 -3
- data/test/controller/flash_test.rb +26 -41
- data/test/controller/fragment_store_setting_test.rb +1 -1
- data/test/controller/layout_test.rb +73 -0
- data/test/controller/mime_responds_test.rb +257 -0
- data/test/controller/mime_type_test.rb +24 -0
- data/test/controller/new_render_test.rb +157 -1
- data/test/controller/redirect_test.rb +23 -0
- data/test/controller/render_test.rb +54 -56
- data/test/controller/request_test.rb +25 -0
- data/test/controller/routing_test.rb +74 -66
- data/test/controller/test_test.rb +66 -1
- data/test/controller/verification_test.rb +3 -1
- data/test/controller/webservice_test.rb +255 -0
- data/test/fixtures/companies.yml +24 -0
- data/test/fixtures/company.rb +9 -0
- data/test/fixtures/db_definitions/sqlite.sql +42 -0
- data/test/fixtures/developer.rb +7 -0
- data/test/fixtures/developers.yml +21 -0
- data/test/fixtures/developers_projects.yml +13 -0
- data/test/fixtures/layout_tests/layouts/controller_name_space/nested.rhtml +1 -0
- data/test/fixtures/layout_tests/layouts/item.rhtml +1 -0
- data/test/fixtures/layout_tests/layouts/layout_test.rhtml +1 -0
- data/test/fixtures/layout_tests/layouts/third_party_template_library.mab +1 -0
- data/test/fixtures/layout_tests/views/hello.rhtml +1 -0
- data/test/fixtures/multipart/mona_lisa.jpg +0 -0
- data/test/fixtures/project.rb +3 -0
- data/test/fixtures/projects.yml +7 -0
- data/test/fixtures/replies.yml +13 -0
- data/test/fixtures/reply.rb +5 -0
- data/test/fixtures/respond_to/all_types_with_layout.rhtml +1 -0
- data/test/fixtures/respond_to/all_types_with_layout.rjs +1 -0
- data/test/fixtures/respond_to/layouts/standard.rhtml +1 -0
- data/test/fixtures/respond_to/using_defaults.rhtml +1 -0
- data/test/fixtures/respond_to/using_defaults.rjs +1 -0
- data/test/fixtures/respond_to/using_defaults.rxml +1 -0
- data/test/fixtures/respond_to/using_defaults_with_type_list.rhtml +1 -0
- data/test/fixtures/respond_to/using_defaults_with_type_list.rjs +1 -0
- data/test/fixtures/respond_to/using_defaults_with_type_list.rxml +1 -0
- data/test/fixtures/test/block_content_for.rhtml +2 -0
- data/test/fixtures/test/delete_with_js.rjs +2 -0
- data/test/fixtures/test/dot.directory/render_file_with_ivar.rhtml +1 -0
- data/test/fixtures/test/enum_rjs_test.rjs +6 -0
- data/test/fixtures/test/erb_content_for.rhtml +2 -0
- data/test/fixtures/test/hello_world.rxml +3 -0
- data/test/fixtures/test/hello_world_with_layout_false.rhtml +1 -0
- data/test/fixtures/test/non_erb_block_content_for.rxml +4 -0
- data/test/fixtures/topic.rb +3 -0
- data/test/fixtures/topics.yml +22 -0
- data/test/template/active_record_helper_test.rb +4 -0
- data/test/template/asset_tag_helper_test.rb +7 -2
- data/test/template/date_helper_test.rb +39 -2
- data/test/template/form_helper_test.rb +238 -5
- data/test/template/form_options_helper_test.rb +78 -0
- data/test/template/form_tag_helper_test.rb +11 -0
- data/test/template/java_script_macros_helper_test.rb +51 -6
- data/test/template/javascript_helper_test.rb +7 -153
- data/test/template/number_helper_test.rb +14 -13
- data/test/template/prototype_helper_test.rb +423 -0
- data/test/template/scriptaculous_helper_test.rb +90 -0
- data/test/template/text_helper_test.rb +12 -9
- data/test/template/url_helper_test.rb +31 -15
- metadata +291 -246
- data/lib/action_controller/cgi_ext/multipart_progress.rb +0 -169
- data/lib/action_controller/upload_progress.rb +0 -473
- data/lib/action_controller/vendor/html-scanner/html/node.rb.rej +0 -17
- data/lib/action_view/helpers/upload_progress_helper.rb +0 -433
- data/lib/action_view/vendor/builder.rb +0 -13
- data/lib/action_view/vendor/builder/blankslate.rb +0 -53
- data/lib/action_view/vendor/builder/xmlbase.rb +0 -143
- data/lib/action_view/vendor/builder/xmlevents.rb +0 -63
- data/lib/action_view/vendor/builder/xmlmarkup.rb +0 -308
- data/test/controller/multipart_progress_testx.rb +0 -365
- data/test/controller/upload_progress_testx.rb +0 -89
- data/test/template/upload_progress_helper_testx.rb +0 -136
data/CHANGELOG
CHANGED
@@ -1,44 +1,431 @@
|
|
1
|
+
*1.12.0* (March 27th, 2005)
|
2
|
+
|
3
|
+
* Add documentation for respond_to. [Jamis Buck]
|
4
|
+
|
5
|
+
* Fixed require of bluecloth and redcloth when gems haven't been loaded #4446 [murphy@cYcnus.de]
|
6
|
+
|
7
|
+
* Update to Prototype 1.5.0_pre1 [Sam Stephenson]
|
8
|
+
|
9
|
+
* Change #form_for and #fields_for so that the second argument is not required [Dave Thomas]
|
10
|
+
|
11
|
+
<% form_for :post, @post, :url => { :action => 'create' } do |f| -%>
|
12
|
+
|
13
|
+
becomes...
|
14
|
+
|
15
|
+
<% form_for :post, :url => { :action => 'create' } do |f| -%>
|
16
|
+
|
17
|
+
* Update to script.aculo.us 1.6 [Thomas Fuchs]
|
18
|
+
|
19
|
+
* Enable application/x-yaml processing by default [Jamis Buck]
|
20
|
+
|
21
|
+
* Fix double url escaping of remote_function. Add :escape => false option to ActionView's url_for. [Nicholas Seckar]
|
22
|
+
|
23
|
+
* Add :script option to in_place_editor to support evalScripts (closes #4194) [codyfauser@gmail.com]
|
24
|
+
|
25
|
+
* Fix mixed case enumerable methods in the JavaScript Collection Proxy (closes #4314) [codyfauser@gmail.com]
|
26
|
+
|
27
|
+
* Undo accidental escaping for mail_to; add regression test. [Nicholas Seckar]
|
28
|
+
|
29
|
+
* Added nicer message for assert_redirected_to (closes #4294) [court3nay]
|
30
|
+
|
31
|
+
assert_redirected_to :action => 'other_host', :only_path => false
|
32
|
+
|
33
|
+
when it was expecting...
|
34
|
+
|
35
|
+
redirected_to :action => 'other_host', :only_path => true, :host => 'other.test.host'
|
36
|
+
|
37
|
+
gives the error message...
|
38
|
+
|
39
|
+
response is not a redirection to all of the options supplied (redirection is <{:only_path=>false, :host=>"other.test.host", :action=>"other_host"}>), difference: <{:only_path=>"true", :host=>"other.test.host"}>
|
40
|
+
|
41
|
+
* Change url_for to escape the resulting URLs when called from a view. [Nicholas Seckar, coffee2code]
|
42
|
+
|
43
|
+
* Added easy support for testing file uploads with fixture_file_upload #4105 [turnip@turnipspatch.com]. Example:
|
44
|
+
|
45
|
+
# Looks in Test::Unit::TestCase.fixture_path + '/files/spongebob.png'
|
46
|
+
post :change_avatar, :avatar => fixture_file_upload('/files/spongebob.png', 'image/png')
|
47
|
+
|
48
|
+
* Fixed UrlHelper#current_page? to behave even when url-escaped entities are present #3929 [jeremy@planetargon.com]
|
49
|
+
|
50
|
+
* Add ability for relative_url_root to be specified via an environment variable RAILS_RELATIVE_URL_ROOT. [isaac@reuben.com, Nicholas Seckar]
|
51
|
+
|
52
|
+
* Fixed link_to "somewhere", :post => true to produce valid XHTML by using the parentnode instead of document.body for the instant form #3007 [Bob Silva]
|
53
|
+
|
54
|
+
* Added :function option to PrototypeHelper#observe_field/observe_form that allows you to call a function instead of submitting an ajax call as the trigger #4268 [jonathan@daikini.com]
|
55
|
+
|
56
|
+
* Make Mime::Type.parse consider q values (if any) [Jamis Buck]
|
57
|
+
|
58
|
+
* XML-formatted requests are typecast according to "type" attributes for :xml_simple [Jamis Buck]
|
59
|
+
|
60
|
+
* Added protection against proxy setups treating requests as local even when they're not #3898 [stephen_purcell@yahoo.com]
|
61
|
+
|
62
|
+
* Added TestRequest#raw_post that simulate raw_post from CgiRequest #3042 [francois.beausoleil@gmail.com]
|
63
|
+
|
64
|
+
* Underscore dasherized keys in formatted requests [Jamis Buck]
|
65
|
+
|
66
|
+
* Add MimeResponds::Responder#any for managing multiple types with identical responses [Jamis Buck]
|
67
|
+
|
68
|
+
* Make the xml_http_request testing method set the HTTP_ACCEPT header [Jamis Buck]
|
69
|
+
|
70
|
+
* Add Verification to scaffolds. Prevent destructive actions using GET [Michael Koziarski]
|
71
|
+
|
72
|
+
* Avoid hitting the filesystem when using layouts by using a File.directory? cache. [Stefan Kaes, Nicholas Seckar]
|
73
|
+
|
74
|
+
* Simplify ActionController::Base#controller_path [Nicholas Seckar]
|
75
|
+
|
76
|
+
* Added simple alert() notifications for RJS exceptions when config.action_view.debug_rjs = true. [Sam Stephenson]
|
77
|
+
|
78
|
+
* Added :content_type option to render, so you can change the content type on the fly [DHH]. Example: render :action => "atom.rxml", :content_type => "application/atom+xml"
|
79
|
+
|
80
|
+
* CHANGED DEFAULT: The default content type for .rxml is now application/xml instead of type/xml, see http://www.xml.com/pub/a/2004/07/21/dive.html for reason [DHH]
|
81
|
+
|
82
|
+
* Added option to render action/template/file of a specific extension (and here by template type). This means you can have multiple templates with the same name but a different extension [DHH]. Example:
|
83
|
+
|
84
|
+
class WeblogController < ActionController::Base
|
85
|
+
def index
|
86
|
+
@posts = Post.find :all
|
87
|
+
|
88
|
+
respond_to do |type|
|
89
|
+
type.html # using defaults, which will render weblog/index.rhtml
|
90
|
+
type.xml { render :action => "index.rxml" }
|
91
|
+
type.js { render :action => "index.rjs" }
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
* Added better support for using the same actions to output for different sources depending on the Accept header [DHH]. Example:
|
97
|
+
|
98
|
+
class WeblogController < ActionController::Base
|
99
|
+
def create
|
100
|
+
@post = Post.create(params[:post])
|
101
|
+
|
102
|
+
respond_to do |type|
|
103
|
+
type.js { render } # renders create.rjs
|
104
|
+
type.html { redirect_to :action => "index" }
|
105
|
+
type.xml do
|
106
|
+
headers["Location"] = url_for(:action => "show", :id => @post)
|
107
|
+
render(:nothing, :status => "201 Created")
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
* Added Base#render(:xml => xml) that works just like Base#render(:text => text), but sets the content-type to text/xml and the charset to UTF-8 [DHH]
|
114
|
+
|
115
|
+
* Integration test's url_for now runs in the context of the last request (if any) so after post /products/show/1 url_for :action => 'new' will yield /product/new [Tobias Luetke]
|
116
|
+
|
117
|
+
* Re-added mixed-in helper methods for the JavascriptGenerator. Moved JavascriptGenerators methods to a module that is mixed in after the helpers are added. Also fixed that variables set in the enumeration methods like #collect are set correctly. Documentation added for the enumeration methods [Rick Olson]. Examples:
|
118
|
+
|
119
|
+
page.select('#items li').collect('items') do |element|
|
120
|
+
element.hide
|
121
|
+
end
|
122
|
+
# => var items = $$('#items li').collect(function(value, index) { return value.hide(); });
|
123
|
+
|
124
|
+
* Added plugin support for parameter parsers, which allows for better support for REST web services. By default, posts submitted with the application/xml content type is handled by creating a XmlSimple hash with the same name as the root element of the submitted xml. More handlers can easily be registered like this:
|
125
|
+
|
126
|
+
# Assign a new param parser to a new content type
|
127
|
+
ActionController::Base.param_parsers['application/atom+xml'] = Proc.new do |data|
|
128
|
+
node = REXML::Document.new(post)
|
129
|
+
{ node.root.name => node.root }
|
130
|
+
end
|
131
|
+
|
132
|
+
# Assign the default XmlSimple to a new content type
|
133
|
+
ActionController::Base.param_parsers['application/backpack+xml'] = :xml_simple
|
134
|
+
|
135
|
+
Default YAML web services were retired, ActionController::Base.param_parsers carries an example which shows how to get this functionality back. As part of this new plugin support, request.[formatted_post?, xml_post?, yaml_post? and post_format] were all deprecated in favor of request.content_type [Tobias Luetke]
|
136
|
+
|
137
|
+
* Fixed Effect.Appear in effects.js to work with floats in Safari #3524, #3813, #3044 [Thomas Fuchs]
|
138
|
+
|
139
|
+
* Fixed that default image extension was not appended when using a full URL with AssetTagHelper#image_tag #4032, #3728 [rubyonrails@beautifulpixel.com]
|
140
|
+
|
141
|
+
* Added that page caching will only happen if the response code is less than 400 #4033 [g.bucher@teti.ch]
|
142
|
+
|
143
|
+
* Add ActionController::IntegrationTest to allow high-level testing of the way the controllers and routes all work together [Jamis Buck]
|
144
|
+
|
145
|
+
* Added support to AssetTagHelper#javascript_include_tag for having :defaults appear anywhere in the list, so you can now make one call ala javascript_include_tag(:defaults, "my_scripts") or javascript_include_tag("my_scripts", :defaults) depending on how you want the load order #3506 [Bob Silva]
|
146
|
+
|
147
|
+
* Added support for visual effects scoped queues to the visual_effect helper #3530 [Abdur-Rahman Advany]
|
148
|
+
|
149
|
+
* Added .rxml (and any non-rhtml template, really) supportfor CaptureHelper#content_for and CaptureHelper#capture #3287 [Brian Takita]
|
150
|
+
|
151
|
+
* Added script.aculo.us drag and drop helpers to RJS [Thomas Fuchs]. Examples:
|
152
|
+
|
153
|
+
page.draggable 'product-1'
|
154
|
+
page.drop_receiving 'wastebasket', :url => { :action => 'delete' }
|
155
|
+
page.sortable 'todolist', :url => { action => 'change_order' }
|
156
|
+
|
157
|
+
* Fixed that form elements would strip the trailing [] from the first parameter #3545 [ruby@bobsilva.com]
|
158
|
+
|
159
|
+
* During controller resolution, update the NameError suppression to check for the expected constant. [Nicholas Seckar]
|
160
|
+
|
161
|
+
* Update script.aculo.us to V1.5.3 [Thomas Fuchs]
|
162
|
+
|
163
|
+
* Added various InPlaceEditor options, #3746, #3891, #3896, #3906 [Bill Burcham, ruairi, sl33p3r]
|
164
|
+
|
165
|
+
* Added :count option to pagination that'll make it possible for the ActiveRecord::Base.count call to using something else than * for the count. Especially important for count queries using DISTINCT #3839 [skaes]
|
166
|
+
|
167
|
+
* Update script.aculo.us to V1.5.2 [Thomas Fuchs]
|
168
|
+
|
169
|
+
* Added element and collection proxies to RJS [DHH]. Examples:
|
170
|
+
|
171
|
+
page['blank_slate'] # => $('blank_slate');
|
172
|
+
page['blank_slate'].show # => $('blank_slate').show();
|
173
|
+
page['blank_slate'].show('first').up # => $('blank_slate').show('first').up();
|
174
|
+
|
175
|
+
page.select('p') # => $$('p');
|
176
|
+
page.select('p.welcome b').first # => $$('p.welcome b').first();
|
177
|
+
page.select('p.welcome b').first.hide # => $$('p.welcome b').first().hide();
|
178
|
+
|
179
|
+
* Add JavaScriptGenerator#replace for replacing an element's "outer HTML". #3246 [tom@craz8.com, Sam Stephenson]
|
180
|
+
|
181
|
+
* Remove over-engineered form_for code for a leaner implementation. [Nicholas Seckar]
|
182
|
+
|
183
|
+
* Document form_for's :html option. [Nicholas Seckar]
|
184
|
+
|
185
|
+
* Major components cleanup and speedup. #3527 [Stefan Kaes]
|
186
|
+
|
187
|
+
* Fix problems with pagination and :include. [Kevin Clark]
|
188
|
+
|
189
|
+
* Add ActiveRecordTestCase for testing AR integration. [Kevin Clark]
|
190
|
+
|
191
|
+
* Add Unit Tests for pagination [Kevin Clark]
|
192
|
+
|
193
|
+
* Add :html option for specifying form tag options in form_for. [Sam Stephenson]
|
194
|
+
|
195
|
+
* Replace dubious controller parent class in filter docs. #3655, #3722 [info@rhalff.com, eigentone@gmail.com]
|
196
|
+
|
197
|
+
* Don't interpret the :value option on text_area as an html attribute. Set the text_area's value. #3752 [gabriel@gironda.org]
|
198
|
+
|
199
|
+
* Fix remote_form_for creates a non-ajax form. [Rick Olson]
|
200
|
+
|
201
|
+
* Don't let arbitrary classes match as controllers -- a potentially dangerous bug. [Nicholas Seckar]
|
202
|
+
|
203
|
+
* Fix Routing tests. Fix routing where failing to match a controller would prevent the rest of routes from being attempted. [Nicholas Seckar]
|
204
|
+
|
205
|
+
* Add :builder => option to form_for and friends. [Nicholas Seckar, Rick Olson]
|
206
|
+
|
207
|
+
* Fix controller resolution to avoid accidentally inheriting a controller from a parent module. [Nicholas Seckar]
|
208
|
+
|
209
|
+
* Set sweeper's @controller to nil after a request so that the controller may be collected between requests. [Nicholas Seckar]
|
210
|
+
|
211
|
+
* Subclasses of ActionController::Caching::Sweeper should be Reloadable. [Rick Olson]
|
212
|
+
|
213
|
+
* Document the :xhr option for verifications. #3666 [leeo]
|
214
|
+
|
215
|
+
* Added :only and :except controls to skip_before/after_filter just like for when you add filters [DHH]
|
216
|
+
|
217
|
+
* Ensure that the instance variables are copied to the template when performing render :update. [Nicholas Seckar]
|
218
|
+
|
219
|
+
* Add the ability to call JavaScriptGenerator methods from helpers called in update blocks. [Sam Stephenson] Example:
|
220
|
+
module ApplicationHelper
|
221
|
+
def update_time
|
222
|
+
page.replace_html 'time', Time.now.to_s(:db)
|
223
|
+
page.visual_effect :highlight, 'time'
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
class UserController < ApplicationController
|
228
|
+
def poll
|
229
|
+
render :update { |page| page.update_time }
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
* Add render(:update) to ActionView::Base. [Sam Stephenson]
|
234
|
+
|
235
|
+
* Fix render(:update) to not render layouts. [Sam Stephenson]
|
236
|
+
|
237
|
+
* Fixed that SSL would not correctly be detected when running lighttpd/fcgi behind lighttpd w/mod_proxy #3548 [stephen_purcell@yahoo.com]
|
238
|
+
|
239
|
+
* Added the possibility to specify atomatic expiration for the memcachd session container #3571 [Stefan Kaes]
|
240
|
+
|
241
|
+
* Change layout discovery to take into account the change in semantics with File.join and nil arguments. [Marcel Molina Jr.]
|
242
|
+
|
243
|
+
* Raise a RedirectBackError if redirect_to :back is called when there's no HTTP_REFERER defined #3049 [kevin.clark@gmail.com]
|
244
|
+
|
245
|
+
* Treat timestamps like datetimes for scaffolding purposes #3388 [Maik Schmidt]
|
246
|
+
|
247
|
+
* Fix IE bug with link_to "something", :post => true #3443 [Justin Palmer]
|
248
|
+
|
249
|
+
* Extract Test::Unit::TestCase test process behavior into an ActionController::TestProcess module. [Sam Stephenson]
|
250
|
+
|
251
|
+
* Pass along blocks from render_to_string to render. [Sam Stephenson]
|
252
|
+
|
253
|
+
* Add render :update for inline RJS. [Sam Stephenson] Example:
|
254
|
+
class UserController < ApplicationController
|
255
|
+
def refresh
|
256
|
+
render :update do |page|
|
257
|
+
page.replace_html 'user_list', :partial => 'user', :collection => @users
|
258
|
+
page.visual_effect :highlight, 'user_list'
|
259
|
+
end
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
* allow nil objects for error_messages_for [Michael Koziarski]
|
264
|
+
|
265
|
+
* Refactor human_size to exclude decimal place if it is zero. [Marcel Molina Jr.]
|
266
|
+
|
267
|
+
* Update to Prototype 1.5.0_pre0 [Sam Stephenson]
|
268
|
+
|
269
|
+
* Automatically discover layouts when a controller is namespaced. #2199, #3424 [me@jonnii.com rails@jeffcole.net Marcel Molina Jr.]
|
270
|
+
|
271
|
+
* Add support for multiple proxy servers to CgiRequest#host [gaetanot@comcast.net]
|
272
|
+
|
273
|
+
* Documentation typo fix. #2367 [Blair Zajac]
|
274
|
+
|
275
|
+
* Remove Upload Progress. #2871 [Sean Treadway]
|
276
|
+
|
277
|
+
* Fix typo in function name mapping in auto_complete_field. #2929 #3446 [doppler@gmail.com phil.ross@gmail.com]
|
278
|
+
|
279
|
+
* Allow auto-discovery of third party template library layouts. [Marcel Molina Jr.]
|
280
|
+
|
281
|
+
* Have the form builder output radio button, not check box, when calling the radio button helper. #3331 [LouisStAmour@gmail.com]
|
282
|
+
|
283
|
+
* Added assignment of the Autocompleter object created by JavaScriptMacroHelper#auto_complete_field to a local javascript variables [DHH]
|
284
|
+
|
285
|
+
* Added :on option for PrototypeHelper#observe_field that allows you to specify a different callback hook to have the observer trigger on [DHH]
|
286
|
+
|
287
|
+
* Added JavaScriptHelper#button_to_function that works just like JavaScriptHelper#link_to_function but uses a button instead of a href [DHH]
|
288
|
+
|
289
|
+
* Added that JavaScriptHelper#link_to_function will honor existing :onclick definitions when adding the function call [DHH]
|
290
|
+
|
291
|
+
* Added :disable_with option to FormTagHelper#submit_tag to allow for easily disabled submit buttons with different text [DHH]
|
292
|
+
|
293
|
+
* Make auto_link handle nil by returning quickly if blank? [Scott Barron]
|
294
|
+
|
295
|
+
* Make auto_link match urls with a port number specified. [Marcel Molina Jr.]
|
296
|
+
|
297
|
+
* Added support for toggling visual effects to ScriptaculousHelper::visual_effect, #3323. [Thomas Fuchs]
|
298
|
+
|
299
|
+
* Update to script.aculo.us to 1.5.0 rev. 3343 [Thomas Fuchs]
|
300
|
+
|
301
|
+
* Added :select option for JavaScriptMacroHelper#auto_complete_field that makes it easier to only use part of the auto-complete suggestion as the value for insertion [Thomas Fuchs]
|
302
|
+
|
303
|
+
* Added delayed execution of Javascript from within RJS #3264 [devslashnull@gmail.com]. Example:
|
304
|
+
|
305
|
+
page.delay(20) do
|
306
|
+
page.visual_effect :fade, 'notice'
|
307
|
+
end
|
308
|
+
|
309
|
+
* Add session ID to default logging, but remove the verbose description of every step [DHH]
|
310
|
+
|
311
|
+
* Add the following RJS methods: [Sam Stephenson]
|
312
|
+
|
313
|
+
* alert - Displays an alert() dialog
|
314
|
+
* redirect_to - Changes window.location.href to simulate a browser redirect
|
315
|
+
* call - Calls a JavaScript function
|
316
|
+
* assign - Assigns to a JavaScript variable
|
317
|
+
* << - Inserts an arbitrary JavaScript string
|
318
|
+
|
319
|
+
* Fix incorrect documentation for form_for [Nicholas Seckar]
|
320
|
+
|
321
|
+
* Don't include a layout when rendering an rjs template using render's :template option. [Marcel Molina Jr.]
|
322
|
+
|
1
323
|
*1.1.2* (December 13th, 2005)
|
2
324
|
|
325
|
+
* Become part of Rails 1.0
|
326
|
+
|
3
327
|
* Update to script.aculo.us 1.5.0 final (equals 1.5.0_rc6) [Thomas Fuchs]
|
4
328
|
|
5
329
|
* Update to Prototype 1.4.0 final [Sam Stephenson]
|
6
330
|
|
7
|
-
*
|
8
|
-
|
331
|
+
* Added form_remote_for (form_for meets form_remote_tag) [DHH]
|
9
332
|
|
10
|
-
*1.
|
333
|
+
* Update to script.aculo.us 1.5.0_rc6
|
11
334
|
|
12
335
|
* More robust relative url root discovery for SCGI compatibility. This solves the 'SCGI routes problem' -- you no longer need to prefix all your routes with the name of the SCGI mountpoint. #3070 [Dave Ringoen]
|
13
336
|
|
14
337
|
* Fix docs for text_area_tag. #3083. [Christopher Cotton]
|
15
|
-
|
338
|
+
|
339
|
+
* Change form_for and fields_for method signatures to take object name and object as separate arguments rather than as a Hash. [DHH]
|
340
|
+
|
341
|
+
* Introduce :selected option to the select helper. Allows you to specify a selection other than the current value of object.method. Specify :selected => nil to leave all options unselected. #2991 [Jonathan Viney <jonathan@bluewire.net.nz>]
|
342
|
+
|
343
|
+
* Initialize @optional in routing code to avoid warnings about uninitialized access to an instance variable. [Nicholas Seckar]
|
344
|
+
|
16
345
|
* Make ActionController's render honor the :locals option when rendering a :file. #1665. [Emanuel Borsboom, Marcel Molina Jr.]
|
17
346
|
|
347
|
+
* Allow assert_tag(:conditions) to match the empty string when a tag has no children. Closes #2959. [Jamis Buck]
|
348
|
+
|
349
|
+
* Update html-scanner to handle CDATA sections better. Closes #2970. [Jamis Buck]
|
350
|
+
|
18
351
|
* Don't put flash in session if sessions are disabled. [Jeremy Kemper]
|
19
352
|
|
20
353
|
* Strip out trailing &_= for raw post bodies. Closes #2868. [Sam Stephenson]
|
21
354
|
|
355
|
+
* Pass multiple arguments to Element.show and Element.hide in JavaScriptGenerator instead of using iterators. [Sam Stephenson]
|
356
|
+
|
357
|
+
* Improve expire_fragment documentation. #2966 [court3nay@gmail.com]
|
358
|
+
|
22
359
|
* Correct docs for automatic layout assignment. #2610. [Charles M. Gerungan]
|
23
360
|
|
24
361
|
* Always create new AR sessions rather than trying too hard to avoid database traffic. #2731 [Jeremy Kemper]
|
25
362
|
|
26
363
|
* Update to Prototype 1.4.0_rc4. Closes #2943 (old Array.prototype.reverse behavior can be obtained by passing false as an argument). [Sam Stephenson]
|
27
364
|
|
365
|
+
* Use Element.update('id', 'html') instead of $('id').innerHTML = 'html' in JavaScriptGenerator#replace_html so that script tags are evaluated. [Sam Stephenson]
|
366
|
+
|
367
|
+
* Make rjs templates always implicitly skip out on layouts. [Marcel Molina Jr.]
|
368
|
+
|
369
|
+
* Correct length for the truncate text helper. #2913 [Stefan Kaes]
|
370
|
+
|
28
371
|
* Update to Prototype 1.4.0_rc3. Closes #1893, #2505, #2550, #2748, #2783. [Sam Stephenson]
|
29
372
|
|
30
|
-
*
|
373
|
+
* Add support for new rjs templates which wrap an update_page block. [Marcel Molina Jr.]
|
31
374
|
|
32
375
|
* Rename Version constant to VERSION. #2802 [Marcel Molina Jr.]
|
33
376
|
|
377
|
+
* Correct time_zone_options_for_select docs. #2892 [pudeyo@rpi.com]
|
378
|
+
|
34
379
|
* Remove the unused, slow response_dump and session_dump variables from error pages. #1222 [lmarlow@yahoo.com]
|
35
380
|
|
381
|
+
* Performance tweaks: use Set instead of Array to speed up prototype helper include? calls. Avoid logging code if logger is nil. Inline commonly-called template presence checks. #2880, #2881, #2882, #2883 [Stefan Kaes]
|
382
|
+
|
383
|
+
* MemCache store may be given multiple addresses. #2869 [Ryan Carver <ryan@fivesevensix.com>]
|
384
|
+
|
385
|
+
* Handle cookie parsing irregularity for certain Nokia phones. #2530 [zaitzow@gmail.com]
|
386
|
+
|
387
|
+
* Added PrototypeHelper::JavaScriptGenerator and PrototypeHelper#update_page for easily modifying multiple elements in an Ajax response. [Sam Stephenson] Example:
|
388
|
+
|
389
|
+
update_page do |page|
|
390
|
+
page.insert_html :bottom, 'list', '<li>Last item</li>'
|
391
|
+
page.visual_effect :highlight, 'list'
|
392
|
+
page.hide 'status-indicator', 'cancel-link'
|
393
|
+
end
|
394
|
+
|
395
|
+
generates the following JavaScript:
|
396
|
+
|
397
|
+
new Insertion.Bottom("list", "<li>Last item</li>");
|
398
|
+
new Effect.Highlight("list");
|
399
|
+
["status-indicator", "cancel-link"].each(Element.hide);
|
400
|
+
|
401
|
+
* Refactored JavaScriptHelper into PrototypeHelper and ScriptaculousHelper [Sam Stephenson]
|
402
|
+
|
36
403
|
* Update to latest script.aculo.us version (as of [3031])
|
37
404
|
|
405
|
+
* Updated docs for in_place_editor, fixes a couple bugs and offers extended support for external controls [Justin Palmer]
|
406
|
+
|
38
407
|
* Update documentation for render :file. #2858 [Tom Werner]
|
39
408
|
|
40
409
|
* Only include builtin filters whose filenames match /^[a-z][a-z_]*_helper.rb$/ to avoid including operating system metadata such as ._foo_helper.rb. #2855 [court3nay@gmail.com]
|
41
410
|
|
411
|
+
* Added FormHelper#form_for and FormHelper#fields_for that makes it easier to work with forms for single objects also if they don't reside in instance variables [DHH]. Examples:
|
412
|
+
|
413
|
+
<% form_for :person, @person, :url => { :action => "update" } do |f| %>
|
414
|
+
First name: <%= f.text_field :first_name %>
|
415
|
+
Last name : <%= f.text_field :last_name %>
|
416
|
+
Biography : <%= f.text_area :biography %>
|
417
|
+
Admin? : <%= f.check_box :admin %>
|
418
|
+
<% end %>
|
419
|
+
|
420
|
+
<% form_for :person, person, :url => { :action => "update" } do |person_form| %>
|
421
|
+
First name: <%= person_form.text_field :first_name %>
|
422
|
+
Last name : <%= person_form.text_field :last_name %>
|
423
|
+
|
424
|
+
<% fields_for :permission => person.permission do |permission_fields| %>
|
425
|
+
Admin? : <%= permission_fields.check_box :admin %>
|
426
|
+
<% end %>
|
427
|
+
<% end %>
|
428
|
+
|
42
429
|
* options_for_select allows any objects which respond_to? :first and :last rather than restricting to Array and Range. #2824 [Jacob Robbins <jrobbins@cmj.com>, Jeremy Kemper]
|
43
430
|
|
44
431
|
* The auto_link text helper accepts an optional block to format the link text for each url and email address. Example: auto_link(post.body) { |text| truncate(text, 10) } [Jeremy Kemper]
|
data/lib/action_controller.rb
CHANGED
@@ -36,22 +36,25 @@ end
|
|
36
36
|
|
37
37
|
require 'action_controller/base'
|
38
38
|
require 'action_controller/deprecated_redirects'
|
39
|
+
require 'action_controller/request'
|
40
|
+
require 'action_controller/deprecated_request_methods'
|
39
41
|
require 'action_controller/rescue'
|
40
42
|
require 'action_controller/benchmarking'
|
43
|
+
require 'action_controller/flash'
|
41
44
|
require 'action_controller/filters'
|
42
45
|
require 'action_controller/layout'
|
43
|
-
require 'action_controller/flash'
|
44
46
|
require 'action_controller/dependencies'
|
47
|
+
require 'action_controller/mime_responds'
|
45
48
|
require 'action_controller/pagination'
|
46
49
|
require 'action_controller/scaffolding'
|
47
50
|
require 'action_controller/helpers'
|
48
51
|
require 'action_controller/cookies'
|
49
52
|
require 'action_controller/cgi_process'
|
50
53
|
require 'action_controller/caching'
|
51
|
-
require 'action_controller/components'
|
52
54
|
require 'action_controller/verification'
|
53
55
|
require 'action_controller/streaming'
|
54
56
|
require 'action_controller/session_management'
|
57
|
+
require 'action_controller/components'
|
55
58
|
require 'action_controller/macros/auto_complete'
|
56
59
|
require 'action_controller/macros/in_place_editing'
|
57
60
|
|
@@ -59,21 +62,22 @@ require 'action_view'
|
|
59
62
|
ActionController::Base.template_class = ActionView::Base
|
60
63
|
|
61
64
|
ActionController::Base.class_eval do
|
65
|
+
include ActionController::Flash
|
62
66
|
include ActionController::Filters
|
63
67
|
include ActionController::Layout
|
64
|
-
include ActionController::Flash
|
65
68
|
include ActionController::Benchmarking
|
66
69
|
include ActionController::Rescue
|
67
70
|
include ActionController::Dependencies
|
71
|
+
include ActionController::MimeResponds
|
68
72
|
include ActionController::Pagination
|
69
73
|
include ActionController::Scaffolding
|
70
74
|
include ActionController::Helpers
|
71
75
|
include ActionController::Cookies
|
72
76
|
include ActionController::Caching
|
73
|
-
include ActionController::Components
|
74
77
|
include ActionController::Verification
|
75
78
|
include ActionController::Streaming
|
76
79
|
include ActionController::SessionManagement
|
80
|
+
include ActionController::Components
|
77
81
|
include ActionController::Macros::AutoComplete
|
78
82
|
include ActionController::Macros::InPlaceEditing
|
79
83
|
end
|