Commit Graph

3824 Commits

Author SHA1 Message Date
Lucas Mazza
b5bb3f8558 raises an ArgumentError if no valid options are given to TemplateRenderer#determine_template
Signed-off-by: José Valim <jose.valim@gmail.com>
2011-12-21 21:17:17 +01:00
Aaron Patterson
d5ccb5cf65 adding integration test for journey #7 2011-12-21 11:46:59 -07:00
Aaron Patterson
79778ffac5 caches should not be global, so no need to clear in the teardown 2011-12-21 11:46:53 -07:00
Brian Rose
bd89946dd3 Ensure option for select helper responds to #first before comparison. 2011-12-20 13:26:10 -07:00
José Valim
437f1e0af1 Merge pull request #4064 from nashby/date-helper-field-error-proc
fix adding field_with_errors to date selects, closes #3487
2011-12-20 09:43:58 -08:00
José Valim
f29b4a02fd Add a test case for layout nil. 2011-12-20 14:56:18 +01:00
lest
e97aa2c22c remove warnings about @variable_for_layout
Signed-off-by: José Valim <jose.valim@gmail.com>
2011-12-20 14:24:01 +01:00
Aaron Patterson
9d0789c415 adding tests for #4029 2011-12-19 13:34:54 -08:00
Vasiliy Ermolovich
024d3b9fcc add failing tests for issue #3487 2011-12-19 21:55:37 +03:00
José Valim
941213040b Merge pull request #4012 from JustinCampbell/master
Allow symbols to be passed as extension aliases in Mime::Type.register
2011-12-17 05:58:18 -08:00
Justin Campbell
27f3619cd5 Add test for register_alias 2011-12-17 07:52:47 -05:00
Justin Campbell
a87690b02c Add test for type aliases 2011-12-17 07:40:54 -05:00
Justin Campbell
4d5266e270 Allow symbols to be passed for extension aliases 2011-12-17 07:40:25 -05:00
Arun Agrawal
23334be5b8 warning removed "warning: instance variable @variable_for_layout not initialized" 2011-12-17 12:00:57 +05:30
José Valim
654df86b7b Show detailed exceptions no longer returns true if the request is local in production. 2011-12-16 10:45:59 +01:00
José Valim
192e55c38e Do not raise an exception if an invalid route was generated automatically. 2011-12-16 10:45:59 +01:00
José Valim
5359262695 ShowExceptions should understand X-Cascade responses from exceptions app. 2011-12-16 10:45:59 +01:00
José Valim
7dd1c751f9 Improve the specs on exceptions app. 2011-12-16 10:45:59 +01:00
José Valim
deef8dd682 Extract the rendering of public exceptions pages into a Rack app. 2011-12-16 10:45:59 +01:00
José Valim
d142572567 Get rid of the close checks since we cannot reliably close the session anyway. 2011-12-16 10:45:59 +01:00
Arun Agrawal
aa39149b2f Warning removed "warning: (...) interpreted as grouped expression" 2011-12-16 10:30:20 +05:30
Xavier Noria
5e0dec5e10 it's -> its 2011-12-15 12:57:33 -08:00
José Valim
26e7400cc5 Fix diagnostics page for routing errors. 2011-12-15 19:43:49 +01:00
Sergey Nartimov
caa1c19787 fix separator insertion in date_select helper 2011-12-14 23:20:23 +03:00
José Valim
e3a4eb4b40 Close the response body on cascade pass, closes #3975. 2011-12-14 17:03:35 +01:00
choonkeat
5f67cfeda1 Fix url_for options[:subdomain] to allow objects as values
* e.g. blog_url(subdomain: current_user) instead of blog_url(subdomain: current_user.to_param)
2011-12-14 22:43:42 +08:00
José Valim
f3531a8fc9 Clean up details keys before some tests to expire the cache. 2011-12-14 09:23:34 +01:00
Sergey Nartimov
081431fdf1 log exception backtrace when all backtrace lines silenced 2011-12-13 22:32:39 +03:00
José Valim
0f4da5b393 Fix failing AP tests. 2011-12-13 15:45:16 +01:00
Aaron Patterson
810837dda8 use Array#join so that file encoding doesn't impact returned string.
Fixes #3957
2011-12-12 19:45:16 -08:00
José Valim
fa1d9a884c Speed up development by only reloading classes if dependencies files changed.
This can be turned off by setting `config.reload_classes_only_on_change` to false.

Extensions like Active Record should add their respective files like db/schema.rb and db/structure.sql to `config.watchable_files` if they want their changes to affect classes reloading.

Thanks to https://github.com/paneq/active_reload and Pastorino for the inspiration. <3
2011-12-12 22:54:04 +01:00
José Valim
ede647a505 Allow reloader to be configured. 2011-12-12 19:41:17 +01:00
Lennart Fridén
dc43e402a1 Added :use_two_digit_numbers option [Lennart Fridén & Kim Persson]
Added use_two_digit_numbers select_tag option for displaying months and days with leading zeros without affecting the values (useful for e.g. ISO-style dates, 2011-08-01).

Signed-off-by: José Valim <jose.valim@gmail.com>

Conflicts:

	actionpack/CHANGELOG.md
2011-12-11 22:54:28 +01:00
Will Farrington
3f65e7f7be Add button_tag support to ActionView::Helpers::FormBuilder.
This support is near-identical to the existing submit_tag support.

Example:

    <%= form_for @post do |f| %>
      <%= f.button %>
    <% end %>
2011-12-11 08:56:26 -05:00
Aaron Patterson
c212a34e1d only load converter if the encodings are different 2011-12-09 09:33:36 -08:00
José Valim
5ad5215211 Deprecate implicit layout lookup in favor of inheriting the _layout config. 2011-12-09 07:20:55 +01:00
Aaron Patterson
2c471b3ac8 load the encoding converter to work around [ruby-core:41556] when switching encodings 2011-12-08 15:14:07 -08:00
José Valim
d4d99bbc87 Fix another regression related to the layout optimization. 2011-12-08 22:56:50 +01:00
José Valim
ebd71fd0e3 Fix a regression and also fix broken test. 2011-12-08 21:00:34 +01:00
kennyj
3ade2f8e89 Fix warning for params_wrapper_test. 2011-12-08 23:09:09 +09:00
Jean-Francois Turcot
d5526218e4 ParamsWrapper only wrap the accessible attributes when they were set 2011-12-07 22:50:01 -05:00
José Valim
0df2ef3ef4 Merge pull request #3884 from sikachu/master-fix_layout
Allow layout fallback when using `layout` method
2011-12-07 08:00:45 -08:00
kennyj
a1986e7d55 Use default charset when we read content type without charset. 2011-12-07 12:35:44 +09:00
Prem Sichanugrist
18ceed201b Allow layout fallback when using layout method
Rails will now use your default layout (such as "layouts/application") when you specify a layout with `:only` and `:except` condition, and those conditions fail.

For example, consider this snippet:

    class CarsController
      layout 'single_car', :only => :show
    end

Rails will use 'layouts/single_car' when a request comes in `:show` action, and use 'layouts/application' (or 'layouts/cars', if exists) when a request comes in for any other actions.
2011-12-06 21:16:29 -05:00
Prem Sichanugrist
0460b3a469 Fix bug in assert_template when using only :layout option
Currently if you're do this:

    assert_template :layout => "foo"

Regardless of what layout you were using, the test will always pass. This was broken since the introduction of :layout option in [d9375f3f].

We have a lot of test cases in actionpack/test/controller/layout_test.rb that use this feature. This will make sure that those test cases are not true negative.
2011-12-06 21:15:27 -05:00
Santiago Pastorino
e58d663f3e Merge pull request #3428 from adrianpike/asset_path_conflicts
Issue #3427 - asset_path_conflicts
2011-12-06 05:16:24 -08:00
Thomas von Deyen
0da31a1839 Allowing string as url argument for expire_action 2011-12-06 13:05:15 +01:00
Adrian Pike
25007ad3fb Let's do the same trick for asset_path that we do for [image,javascript,stylesheet]_path to avoid namespace conflicts on named routes.
Closes #3427
2011-12-05 17:17:39 -08:00
José Valim
f6cc4fd7a2 Merge pull request #3861 from andyjeffries/master
Named Routes shouldn't override existing ones (currently route recognition goes with the earliest match, named routes use the latest match)
2011-12-05 08:48:25 -08:00
lest
1f0e21ce30 use classify in ParamsWrapper to derive model name from controller name 2011-12-05 19:15:36 +03:00