Jesse Storimer
ac81af40c0
Ensure that status codes are logged properly
...
Needed to move AC::Metal::Instrumentation before AM::Metal::Rescue
so that status codes rendered from rescue_from blocks are logged
properly.
2011-07-18 13:42:07 -04:00
Santiago Pastorino
e9bd83402e
Merge pull request #2046 from sikachu/master-test_fix
...
Fix a wrong assertion on url_helper_test, and add missing `#html_safe?` a
2011-07-17 12:48:49 -07:00
Prem Sichanugrist
edfb81d668
Fix a wrong assertion on url_helper_test, and refactor html_safe test to be in its method
2011-07-17 15:34:01 -04:00
Santiago Pastorino
7669c33c74
Merge pull request #2018 from bhus/render_partial_invalid_check
...
Render partial invalid check
2011-07-17 12:28:03 -07:00
Bradford Folkens
4755930727
assert nothing raised for setting a cookie value to nil in ActionDispatch
2011-07-14 14:01:39 -05:00
huskins
2668dce1c0
Added view template invalid name check, along with tests. No merges in commit.
2011-07-13 13:06:03 -04:00
Joseph Wong
66dee26930
Fixed session ID fixation for ActiveRecord::SessionStore
...
I have found that Rails will take an invalid session ID specified by the
client and materialize a session based on that session ID. This means
that it is possible, among other things, for a client to use an
arbitrarily weak session ID or for a client to resurrect a previous used
session ID. In other words, we cannot guarantee that all session IDs are
generated by the server and that they are (statistically) unique through
time.
The fix is to always generate a new session ID in #get_session if an
existing session cannot be found under the incoming session ID.
Also added new tests that make sure that an invalid session ID is never
materialized into a new session, regardless of whether it comes in via a
cookie or a URL parameter (when :cookie_only => false).
2011-07-12 11:09:11 -07:00
Andrew Radev
587dd7d56c
Grouped select helper
...
FormBuilder#select now works with a nested data structure.
2011-07-11 19:08:23 +03:00
Santiago Pastorino
d9182c0ae9
config should always be an AS::InheritableOptions object. Closes #1992
2011-07-08 21:45:53 -03:00
Xavier Noria
ad912c08a9
use Zlib.crc2 rather that bytes.sum, as per Aaron's suggestion
...
That integer is rather irrelevant, the only thing that matters is that
it is consistent and with no apparent bias. Zlib.crc32 is 8-10 times
faster than bytes.sum, so use that.
2011-07-08 00:58:14 +02:00
Aaron Patterson
215193d19a
removing brittle assertion
2011-07-07 13:12:28 -07:00
Albert Callarisa Roca
f6a6b51ae5
Using the sum of bytes instead the hash of the path when replacing the wildcard of the assets path because in ruby 1.9 is not consistent
2011-07-08 00:10:20 +08:00
José Valim
7da88c5b29
Remove stream at the class level.
...
This is because only template rendering works with streaming.
Setting it at the class level was also changing the behavior
of JSON and XML responses, closes #1337 .
2011-07-06 20:24:30 -03:00
José Valim
3875e449ab
Merge pull request #1925 from spohlenz/refactor-asset-paths
...
Refactor sprockets asset paths to allow for alternate asset environments
2011-07-02 20:23:47 -07:00
Damien Mathieu
ac15bcebf2
provide a more explicit message when using url_for with nil
...
This fixes the problem of having a non-explicit message when the :location option is not provided in respond_with.
2011-07-02 18:53:54 +02:00
José Valim
3da608e0b4
Revert "Add method fields_for_with_index to FormHelper"
...
This reverts commit 7c562d5e46 .
Conflicts:
actionpack/lib/action_view/helpers/form_helper.rb
2011-07-01 14:52:18 -03:00
Sam Pohlenz
0613f3bcdb
Add tests for alternate asset prefix/environment
2011-07-01 21:56:41 +09:30
José Valim
b31ce90e99
Merge pull request #1927 from bogdan/select_multiple_index
...
Fixed ActionView::FormOptionsHelper#select with :multiple => false
2011-07-01 04:31:48 -07:00
José Valim
9c9ec2172e
Make sure respond_with with :js tries to render a template in all cases
2011-06-30 11:47:36 -03:00
Bogdan Gusiev
0fdac01876
Fixed ActionView::FormOptionsHelper#select with :multiple => false
2011-06-30 16:27:01 +03:00
José Valim
f34f0b7e08
Add has_key? and key? methods to CookieJar removed in 0ca69ca65f
2011-06-30 08:01:53 -03:00
Arun Agrawal
8c1f62acda
No need to register again. As it's default now.
...
Removing gif from here because when it got unregister it start failing other places.
2011-06-28 18:20:28 +05:30
Arun Agrawal
1b957177e7
Fix test to use Mime::Zip
2011-06-28 16:51:19 +05:30
Esad Hajdarevic
2a61d47b55
Make send_file guess content-type from file extension, if type wasn't supplied (Issue #1847 ). Update tests & documentation.
2011-06-28 06:58:28 +02:00
Santiago Pastorino
4bcb05de2d
Merge pull request #1870 from chriseppstein/asset_urls_master
...
Asset urls master
2011-06-27 14:01:34 -07:00
Xavier Noria
a0960ec2d4
the generated ALT attribute for images no longer contains the digest, if any
2011-06-27 23:00:05 +02:00
Chris Eppstein
024bed387b
Added a configuration setting:
...
config.action_controller.default_asset_host_protocol
It's best to leave this unset.
When unset the :request protocol is used whenever it can be and
:relative is used in the other situations.
When set to :request then assets hosts will be disabled when there
is no request in scope and will use the request protocol whenever a
request is in scope.
If set to :relative, then a relative protocol is always used except
for stylesheet link tags which must use the :request protocol to
avoid double downloads in IE6&7.
Conflicts:
actionpack/lib/sprockets/helpers/rails_helper.rb
actionpack/test/template/sprockets_helper_test.rb
2011-06-27 13:58:51 -07:00
Chris Eppstein
6c64e1e3a3
Stylesheet link tags should use the request protocol to avoid duplicate download of stylesheets in IE7 and IE8.
...
Conflicts:
actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb
actionpack/lib/sprockets/helpers/rails_helper.rb
2011-06-27 13:54:54 -07:00
Chris Eppstein
96137e8bd0
Add asset_url helper and refactor the asset paths so that asset hosts can be used during asset precompilation.
...
Conflicts:
actionpack/lib/action_view/asset_paths.rb
actionpack/lib/sprockets/helpers/rails_helper.rb
actionpack/test/template/sprockets_helper_test.rb
2011-06-27 13:48:36 -07:00
David Chelimsky
a7af1e0051
Get the fixture_path from self.class instead of ActiveSupport::TestCase.
...
This allows test classes that are not subclasses of
ActiveSupport::TestCase (like those in rspec-rails) to interact with
with this variable without having to reference ActiveSupport::TestCase.
2011-06-25 13:59:49 -05:00
Santiago Pastorino
7f6eed0447
Merge pull request #1796 from jdeseno/master
...
link_to doesn't allow rel attribute when also specifying method
2011-06-22 20:34:33 -07:00
Santiago Pastorino
6b3342d971
Merge pull request #1798 from jeroenj/cachesweeper-fix
...
Fixes an issue where cache sweepers with only after filters would have no controller object
2011-06-22 10:48:19 -07:00
Jeroen Jacobs
93ff522120
Tests only after filters in cache sweepers
2011-06-22 18:00:46 +02:00
José Valim
3c8c379848
Merge pull request #1778 from spohlenz/hash-models
...
Fix nested fields_for when Hash-based model is passed.
2011-06-22 02:33:12 -07:00
Sam Pohlenz
237f87089c
Use real hash model in nested fields_for with hash model test
2011-06-22 10:54:45 +09:30
Josh
9c1d0d88a7
Adds a test to check link_to with method & rel options
2011-06-21 07:49:10 -07:00
Tadas Tamosauskas
f292f0971f
Do not change a frozen text passed to simple_format text helper
2011-06-20 14:51:07 +01:00
Sam Pohlenz
e69eed0e10
Test for extractable_options? within nested fields_for.
...
This fixes an error when a record object that is a subclass of Hash is
passed to fields_for, which is incorrectly interpreted as field options.
2011-06-20 11:50:44 +09:30
Lukáš Konarovský
c0d82ba030
Use assert_equal instead of assert in uploaded file test.
2011-06-15 03:09:27 -07:00
Andrew White
0ac0d7a0f0
Make MissingTranslation exception handler respect :rescue_format
2011-06-15 01:21:04 +01:00
Damien Mathieu
383fd143bf
all requests are utf-8. Don't use the external encoding.
2011-06-14 17:01:33 +02:00
Damien Mathieu
383d56b5ee
encode the uploaded file's name in the default external encoding - Closes #869
2011-06-14 14:34:30 +02:00
Andrew White
1fa059cd01
Define ActiveSupport#to_param as to_str - closes #1663
2011-06-12 15:32:46 +01:00
Piotr Sarnacki
f5e1548c1b
Merge pull request #1552 from bogdan/select
...
Fixing select[multiple] html specification problem.
2011-06-11 08:21:22 -07:00
José Valim
28f2b981fc
Merge pull request #549 from dlee/utf8_enforcer
...
Utf8 enforcer param customization
2011-06-11 08:04:06 -07:00
David Lee
1cbe917237
There are no snowmen here
2011-06-11 01:58:26 -07:00
Neeraj Singh
f3c9f32664
remove meaningless assert true
2011-06-11 03:11:06 -04:00
Neeraj Singh
6688b6393a
expected message should come first
2011-06-11 03:11:06 -04:00
Neeraj Singh
5da89af6f6
try not to use assert_blank when nil will would
...
be considered as failure
Test for specific value to the extent possible
2011-06-11 03:11:05 -04:00
Santiago Pastorino and José Ignacio Costa
94df84a8a4
Revert "Make sure that we don't perform in-place mutation on SafeBuffer string"
...
This reverts commit 115e80dccc .
2011-06-10 23:08:00 -03:00