Commit Graph

3837 Commits

Author SHA1 Message Date
Aaron Patterson
63f7a61246 When generating routes, the last defined named route wins. This is in
contrast to route recognition where the first recognized route wins.
This behavior will not exist in Rails 4.0.

See:

  https://github.com/rails/rails/issues/4245
  https://github.com/rails/rails/issues/4164
2012-01-03 14:00:24 -08:00
Aaron Patterson
e9122112fa Revert "Named Routes shouldn't override existing ones (currently route recognition goes with the earliest match, named routes use the latest match)"
This reverts commit 71d769e3b5.
2012-01-03 13:56:12 -08:00
Santiago Pastorino
8c129f18d2 Pass extensions to javascript_path and stylesheet_path helpers. Closes #3417 2012-01-03 17:51:10 -02:00
José Valim
d38dac8ea9 Override respond_to? since we are also overriding method_missing. 2012-01-03 20:27:38 +01:00
Santiago Pastorino
0d7d3a6e77 Add font_path helper method 2012-01-03 17:05:43 -02:00
Sergey Nartimov
5f09414f85 deprecate ActiveSupport::Base64
extend and define ::Base64 if needed
2012-01-03 00:57:03 +03:00
Aaron Patterson
50af25ba87 last named route wins. fixes #4164
This differs from route recognition where first recognized route wins.
This will not be supported in Rails 4.0 so that route recognition and
generation rules are consistent.
2011-12-28 16:33:40 -08:00
José Valim
ba868929d3 Provide a class optin for page_cache_compression. 2011-12-24 10:52:45 +01:00
Andrey A.I. Sitnik
754823dd66 Gzip files on page caching
Signed-off-by: José Valim <jose.valim@gmail.com>
2011-12-24 10:52:45 +01:00
Aaron Patterson
5f2bfce9e0 adding an integration test for splat regexp substitutions. fixes #4138 2011-12-22 18:53:09 -07:00
Aaron Patterson
a32d3d0ad9 Adding an integration test. Fixes #4136 2011-12-22 18:04:59 -07:00
Aaron Patterson
2bc3f81c89 rack bodies should be a list 2011-12-22 13:09:54 -07:00
Aaron Patterson
585e291250 refactoring routing tests 2011-12-22 12:56:36 -07:00
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