Commit Graph

6904 Commits

Author SHA1 Message Date
Aaron Patterson
e3abd78ee5 bumping to rc3 2013-10-11 14:16:06 -07:00
Aaron Patterson
5ede19b772 bumping to rc2 2013-10-04 13:46:35 -07:00
Aaron Patterson
5e277c8208 bumping version to 3.2.15.rc1 2013-10-03 11:52:44 -07:00
Tamir Duberstein
85106decc4 make sure both headers are set before checking for ip spoofing 2013-10-01 01:26:07 -07:00
Brian Hahn
03ac291526 pass the extra params to the rack test environment so that routes with block constraints have access 2013-09-06 11:08:41 -07:00
Kassio Borges
424a5a7d46 fix issue #11605 2013-08-24 15:24:36 -03:00
Rafael Mendonça França
2b3ce8627b Merge branch '3-2-14' into 3-2-stable 2013-07-22 20:24:09 -03:00
Rafael Mendonça França
2fcd13eff2 Preparing for 3.2.14 release 2013-07-22 12:05:41 -03:00
Alexey Chernenkov
0f5ba6e124 Fix assert_redirected_to does not show user-supplied message.
Issue: when `assert_redirected_to` fails due to the response redirect not
matching the expected redirect the user-supplied message (second parameter)
is not shown. This message is only shown if the response is not a redirect.
2013-07-18 10:54:36 +06:00
Rafael Mendonça França
a96df04aac Preparing for 3.2.14.rc2 release 2013-07-16 13:00:33 -03:00
Rafael Mendonça França
facfc24f25 Preparing for 3.2.14.rc1 release 2013-07-12 21:06:50 -03:00
Santiago Pastorino
e359e3ab93 Add missing require 2013-07-02 17:00:33 -07:00
Andrew White
622e4ab424 Fix shorthand routes where controller and action are in the scope
Merge `:action` from routing scope and assign endpoint if both `:controller`
and `:action` are present. The endpoint assignment only occurs if there is
no `:to` present in the options hash so should only affect routes using the
shorthand syntax (i.e. endpoint is inferred from the the path).

Fixes #9856

Backport of 37b4276
2013-06-25 11:00:19 +01:00
Rafael Mendonça França
2553bd785c Merge pull request #10971 from dtaniwaki/escape_link_to_unless
Always escape the result of link_to_unless method
2013-06-24 16:15:56 -03:00
Rafael Mendonça França
9f754e801f Compare host scheme using case-insensitive regexp
Before:

    image_tag("HTTP://google.com")
    # => "<img alt=\"Google\" src=\"/assets/HTTP://google.com\" />"
    image_tag("http://google.com")
    # => "<img alt=\"Google\" src=\"http://google.com\" />"

After:

    image_tag("HTTP://google.com")
    # => "<img alt=\"Google\" src=\"HTTP://google.com\" />"
    image_tag("http://google.com")
    # => "<img alt=\"Google\" src=\"http://google.com\" />"

Backport of #10969
2013-06-16 22:05:26 -03:00
Rafael Mendonça França
0b35a3aacc Merge pull request #10478 from cainlevy/patch-1
use canonical #controller_path logic in controller test cases
Conflicts:
	actionpack/lib/action_controller/test_case.rb
2013-05-06 22:19:46 -03:00
Ben Tucker
5a6d9d5491 Merging in fix from #8222 2013-05-06 09:36:40 -04:00
Aaron Patterson
ba12ef6ae1 just clear the caches on clear! rather than replacing. fixes #10251 2013-04-17 11:36:08 -07:00
Ryan McGeary
44a9aedd7b Fix explicit names on multiple file fields
If a file field tag is passed the multiple option, it is turned into an
array field (appending "[]"), but if the file field is passed an
explicit name as an option, leave the name alone (do not append "[]").

Fixes #9830
2013-04-05 15:35:20 -04:00
Dmitry Vorotilin
2c22376fe0 Common behavior with adding formats to lookup_context for TemplateRenderer and PartialRenderer 2013-04-02 10:36:23 -07:00
Fred Wu
dee5915aac Fixed test failures on 1.8.7 caused by 74e59ea 2013-03-27 11:29:37 +11:00
Mack Earnhardt
74e59ea8b6 Backport #5808
df36c5f - Fix assert_template assertion with :layout option
4bd05a7 - Fix assert_template :layout => nil assertion
0d19a08 - Improve assert_template layout checking
2013-03-24 08:16:26 -04:00
Aaron Patterson
d1577cfe3d Merge branch '3-2-stable' into fredwu-slow_view_loading_fix
* 3-2-stable:
  Merge pull request #9802 from newsline/fix-broken-action-missing
  Remove bad changelog entry from AR [ci skip]
  Wrong exception is occured when raising no translatable exception
  Don't crash exception translation w/ nil result attribute.

Conflicts:
	actionpack/CHANGELOG.md
2013-03-20 16:41:01 -07:00
Rafael Mendonça França
2c8f349953 Merge pull request #9802 from newsline/fix-broken-action-missing
Fix missing action_missing

Conflicts:
	actionpack/CHANGELOG.md

Conflicts:
	actionpack/test/controller/base_test.rb

Fixes #9799
2013-03-20 18:22:31 -03:00
Fred Wu
687e68d88f Fixed assets loading performance in 3.2.13
The PR #8756 uses Sprockets for resolving files that already exists on disk, for those files their extensions don't need to be rewritten.

Fixes #9803
2013-03-20 16:13:30 +11:00
hoffm
1b12d08a0f Backport #9347 to rails 3.2 2013-03-19 09:30:50 -05:00
Aaron Patterson
afcd01bf25 Merge branch '3-2-13' into 3-2-stable
* 3-2-13:
  bumping to 3.2.13
  fix protocol checking in sanitization [CVE-2013-1857]
  JDOM XXE Protection [CVE-2013-1856]
  fix incorrect ^$ usage leading to XSS in sanitize_css [CVE-2013-1855]
  stop calling to_sym when building arel nodes [CVE-2013-1854]
  Merge pull request #9616 from exviva/multiple_select_name_double_square_brackets
  bumping to rc2
  Revert "Merge pull request #8209 from senny/backport_8176"
  Freeze columns only once per Result
  Preparing for 3.2.13.rc1 release
  Update CHANGELOGs for 3.2.13 release.

Conflicts:
	actionmailer/CHANGELOG.md
	actionpack/CHANGELOG.md
	activemodel/CHANGELOG.md
	activeresource/CHANGELOG.md
	activesupport/CHANGELOG.md
	railties/CHANGELOG.md
2013-03-18 10:17:04 -07:00
Aaron Patterson
a4b5582772 bumping to 3.2.13 2013-03-18 09:23:04 -07:00
Yves Senn
f662a748a5 do not freeze NumberHelper defaults.
Closes #9767.
2013-03-18 16:51:35 +01:00
Aaron Patterson
99123ad12f fix protocol checking in sanitization [CVE-2013-1857]
Conflicts:
	actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb
2013-03-15 17:48:42 -07:00
Charlie Somerville
ff3b9ca130 fix incorrect ^$ usage leading to XSS in sanitize_css [CVE-2013-1855] 2013-03-15 17:48:12 -07:00
Juan Barreneche
ce755697fc Extract hardcoded lists to Redo::RestaurantsList 2013-03-14 18:02:20 -03:00
Carlos Antonio da Silva
488699166c Merge pull request #9616 from exviva/multiple_select_name_double_square_brackets
Fix incorrectly appended square brackets to a multiple select box

Before:

    select(:category, [], {}, {:multiple => true, :name => "post[category][]"})
    # => <select name="post[category][][]" ...>

After:

    select(:category, [], {}, {:multiple => true, :name => "post[category][]"})
    # => <select name="post[category][]" ...>

Conflicts:
	actionpack/CHANGELOG.md
	actionpack/lib/action_view/helpers/tags/base.rb
	actionpack/test/template/form_options_helper_test.rb
2013-03-12 19:58:22 -03:00
Carlos Antonio da Silva
a0c3c1e1f7 Merge pull request #9616 from exviva/multiple_select_name_double_square_brackets
Fix incorrectly appended square brackets to a multiple select box

Before:

    select(:category, [], {}, {:multiple => true, :name => "post[category][]"})
    # => <select name="post[category][][]" ...>

After:

    select(:category, [], {}, {:multiple => true, :name => "post[category][]"})
    # => <select name="post[category][]" ...>

Conflicts:
	actionpack/CHANGELOG.md
	actionpack/lib/action_view/helpers/tags/base.rb
	actionpack/test/template/form_options_helper_test.rb
2013-03-09 12:05:30 -03:00
Aaron Patterson
ccf256d8dc bumping to rc2 2013-03-06 15:05:13 -08:00
maximerety
d0f22a99f9 Backport fixes about #7774 to 3-2-stable
Fix ActionDispatch::Request#formats when HTTP_ACCEPT header is an empty
string.
2013-03-05 12:53:10 +01:00
Kornelius Kalnbach
98739cf45f remove unused path_without_format variable
Was forgotten in a72dab0.
2013-03-03 19:14:37 +01:00
Steve Klabnik
5ca59b02d1 Preparing for 3.2.13.rc1 release 2013-02-27 12:19:06 -08:00
Prem Sichanugrist
979e198c14 Check for method_missing in public and protected
Ruby 2.0 changed the behavior of `respond_to?` without argument to
return only search for public method. We actually want to perform the
action only if `method_missing` is either in public or protected.
2013-02-24 16:32:25 -05:00
thedarkone
abf0c71021 There is already a Set of non-hidden action_names lying around. 2013-02-24 16:32:25 -05:00
Yves Senn
a72dab0b6a determine the match shorthand target early.
Backport #9361.
Closes #7554.

This patch determines the `controller#action` directly
in the `match` method when the shorthand syntax is used.
this prevents problems with namespaces and scopes.
2013-02-22 09:04:04 +01:00
Carlos Antonio da Silva
fdcd7c0f2e Change tabs to spaces in form options helper [ci skip] 2013-02-21 12:48:45 -03:00
Aaron Patterson
f1efecfc3f Merge branch '3-2-sec' into 3-2-stable
* 3-2-sec:
  bumping version
  remove ruby-prof
  Fix issue with attr_protected where malformed input could circumvent protection
  fixing call to columns hash. run the damn tests when you backport!
  Bump rack dependency to 1.4.5
  Merge pull request #9224 from dylanahsmith/bigdecimal-takes-string
  Merge pull request #9208 from dylanahsmith/3-2-mysql-quote-numeric

Conflicts:
	Gemfile
	activerecord/CHANGELOG.md
2013-02-11 10:19:31 -08:00
Aaron Patterson
1dccd44a5c bumping version 2013-02-10 19:05:41 -08:00
Rodrigo Rosenfeld Rosas
d82b5db059 Add another NumberHelper missing dependency
Another missing dependency, now affecting #number_to_percentage.

It depends on reverse_merge.
2013-01-29 17:13:39 -02:00
Rodrigo Rosenfeld Rosas
56fd56406c Add NumberHelper missing dependency
symbolize_keys depends on hash/keys AS core extension
2013-01-29 16:34:48 -02:00
Andrew White
431759614d Duplicate possible frozen string from route
Ruby 1.9 freezes Hash string keys by default so where a route is
defined like this:

get 'search' => 'search'

then the Mapper will derive the action from the key. This blows up
later when the action is added to the parameters hash and the
encoding is forced.

Closes #3429
2013-01-21 17:20:51 +00:00
Carlos Antonio da Silva
a3aca81b21 Remove warning of not used variable 2013-01-17 10:28:16 -02:00
José Valim
a5013bb5af Merge pull request #5288 from lest/patch-2
force response body to be read in assert_template
Conflicts:
	actionpack/lib/action_controller/test_case.rb
2013-01-17 09:25:12 -02:00
Aditya Sanghi
5f3b40e824 fixes #8631 local inflections from interfereing with HTTP_METHOD_LOOKUP dispatch logic 2013-01-16 15:59:17 +05:30