Commit Graph

10017 Commits

Author SHA1 Message Date
Aaron Patterson
06573a3a76 module_eval is not necessary here 2013-01-24 15:33:08 -08:00
Aaron Patterson
345fc3badb don't need to eval everything 2013-01-24 15:24:07 -08:00
Akira Matsuda + Koichi Sasada
b7b27fc2a3 Set Thread.abort_on_exception for the whole AS, AP, and AR tests
this would give us some more clues in case a test silently dies inside Thread
2013-01-24 20:00:45 +09:00
Xavier Noria
8ac94d7c89 ActionDispatch::Http::UploadedFile is a permitted scalar [Closes #9051] 2013-01-23 23:15:26 +01:00
Rafael Mendonça França
cb56c39b51 Lets kepp using Ruby 1.9 syntax 2013-01-22 10:40:33 -02:00
Rafael Mendonça França
16e0c8816c Only check for unpermmited parameters if
action_on_unpermitted_parameters is present
2013-01-22 10:38:03 -02:00
Xavier Noria
2d9c4017dd avoid creating an object in every call
This was a suggestion of @carlosantoniodasilva, thanks!
2013-01-22 11:18:41 +01:00
Carlos Antonio da Silva
bf112e551b Remove tabs, use spaces ✂️
[ci skip]
2013-01-22 00:35:33 -02:00
Akira Matsuda
1e8d5e62c6 Merge branch 'isolating_tests'
Now we're almost ready to remove this: https://github.com/rails/rails/blob/5294ad8/activesupport/lib/active_support/test_case.rb#L29
2013-01-22 10:27:12 +09:00
Akira Matsuda
9b520d31e5 Restore I18n.locale after running tests 2013-01-22 10:26:44 +09:00
Rafael Mendonça França
5e4fb4da83 Stylistic pass at form_helper_test 2013-01-21 23:01:09 -02:00
José Mota
ee82ce7829 Capture block so content won't leak.
The [following pull request](https://github.com/rails/rails/pull/8916) fixed
the block being passed to the appropriate helper method. However, the content
being passed into the block is generating repeated markup on the page due to
some weird ERb evaluation.

This commit tries to capture the block's generated output so the page isn't
flooded with markup.

[Rafael França + José Mota]

Closes #8936
2013-01-21 22:02:02 -02:00
Piotr Sarnacki
351b0d9092 Update actionpack's CHANGELOG for 445f14e 2013-01-21 21:53:06 +01:00
Akira Matsuda
d1c02a7fc2 Make sure to reset default_url_options 2013-01-22 05:24:23 +09:00
Piotr Sarnacki
445f14e975 Fix asset_path in mounted engine
Historically serving assets from a mountable engine could be achieved by
running ActionDispatch::Static as a part of engine middleware stack or
to copy assets prefixed with an engine name. After introduction of
assets pipeline this is not needed as all of the assets are served or
compiled into main application's assets.

This commit removes the obsolete line making asset_path always generate
paths relative to the root or config.relative_url_root if it's set.

(closes #8119)
2013-01-21 21:21:39 +01:00
Andrew White
c4106d0c08 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:14:10 +00:00
Rafael Mendonça França
c6a39c01f7 Merge pull request #9014 from virusman/form_helpers_ar_tests
AR integration tests for form helpers
2013-01-21 05:52:42 -08:00
virusman
9047ca019a Added AR integration tests for form helpers 2013-01-21 17:09:12 +04:00
Rafael Mendonça França
68a6fb6953 Merge pull request #9001 from schneems/schneems/routes-path-js
In Browser Path Matching with Javascript
2013-01-21 04:06:31 -08:00
Carlos Antonio da Silva
57b65ef416 Fix setting expected value in translation tests
It was being set to nil instead due to the wrong assignment.
2013-01-21 09:29:03 -02:00
schneems
8b72d689e3 In Browser Path Matching with Javascript
When debugging routes ,it can sometimes be difficult to understand exactly how the paths are matched. This PR adds a JS based path matching widget to the `/rails/info/routes` output. You can enter in a path, and it will tell you which of the routes that path matches, while preserving order (top match wins).

The matching widget in action:

![](http://f.cl.ly/items/3A2F0v2m3m1Z1p3P3O3k/path-match.gif)

Prior to this PR the only way to check matching paths is via mental math, or typing in a path in the url bar and seeing where it goes. This feature will be an invaluable debugging tool by dramatically decreasing the time needed to check a path match. 

ATP actionpack
2013-01-20 23:10:24 -06:00
Rafael Mendonça França
e4dbfce1c3 Merge pull request #9007 from dpree/master
Enhanced tests for AbstractController::Translation module
2013-01-20 20:26:17 -08:00
Carlos Antonio da Silva
9a7411a92b Refactor grep call to remove .each
Grep already yields the matching keys to the given block.
2013-01-20 22:09:32 -02:00
Carlos Antonio da Silva
e0cc7ab3ff Add missing assert calls 2013-01-20 22:03:31 -02:00
Carlos Antonio da Silva
5a69fe724e Use 1.9 hash style in docs/comments [ci skip] 2013-01-20 22:03:25 -02:00
Carlos Antonio da Silva
f12f08d61f Fix markdown formatting to highlight block in changelog [ci skip] 2013-01-20 21:45:05 -02:00
Arun Agrawal
53ea940c5b Removing warning: shadowing outer local variable 2013-01-20 23:02:02 +05:30
Xavier Noria
cbec22ce57 strong parameters filters permitted scalars 2013-01-20 17:59:53 +01:00
Jens Bissinger
4685d75736 Removed ActionController::Base dependency from abstract controller translation tests. 2013-01-20 15:53:43 +01:00
Jens Bissinger
1de60c54d3 Test abstract controller's localize method. 2013-01-20 15:44:03 +01:00
Aaron Patterson
b718998f3e Merge pull request #8978 from chrismcg/remove_i18n_symbol_dependency
Remove i18n symbol dependency
2013-01-19 11:20:50 -08:00
Rafael Mendonça França
57126ee5e3 Restore and adapt the implementation reverted at
cc1c3c5be0

Now instead of raise, we log by default in development and test
2013-01-19 15:32:27 -02:00
Thomas Drake-Brockman
130370b1c8 Added ability to raise or log on unpermitted params. 2013-01-20 00:39:24 +08:00
Aaron Patterson
f209b176c3 Merge pull request #8977 from Soylent/master
Resovled issue rails#7774
2013-01-18 17:27:19 -08:00
Guillermo Iguaran
e636f55531 Fix syntax error 😁 2013-01-18 17:16:30 -05:00
schneems
f654c3cfc0 Remove "Application" section title from routes
This PR standardizes the output of the HTML and console based routes to not include the title for "Application Routes" those that are defined by the application. Instead only routes defined in engines get any special treatment. 

Based on this conversation:

af5c0fd85f (commitcomment-2458823)

ATP actionpack /cc @carlosantoniodasilva
2013-01-18 15:41:19 -06:00
Guillermo Iguaran
8aebe30ef4 Revert "Merge pull request #8989 from robertomiranda/use-rails-4-find-by"
This reverts commit 637a7d9d357a0f3f725b0548282ca8c5e7d4af4a, reversing
changes made to 5937bd02dee112646469848d7fe8a8bfcef5b4c1.
2013-01-18 09:15:19 -05:00
robertomiranda
7baecc4802 User Rails 4 find_by 2013-01-18 07:56:05 -05:00
Chris McGrath
60289ab659 Don't change the original i18n data 2013-01-17 16:01:19 +00:00
Chris McGrath
6bb784eab0 Remove i18n symbol dependency
date.order is the only key in rails i18n that is required to be a
symbol. This patch allows for symbols or strings which means:

* No requirement for symbol type in .yml files. A future
  YAML.safe_load wouldn't need to load symbols
* Rails could actually use json rather than yml as the backend
2013-01-17 15:21:26 +00:00
Konstantin Papkovskiy
bebb02fd1c Fix ActionDispatch::Request#formats when HTTP_ACCEPT header is empty string 2013-01-17 17:42:49 +04:00
Carlos Antonio da Silva
ee314a5e5a Remove useless || operation 2013-01-17 09:28:07 -02:00
Arun Agrawal
c9362182c8 Removing : warning: ambiguous first argument; 2013-01-17 14:43:11 +05:30
Carlos Antonio da Silva
038574a538 Deprecate direct calls to AC::RecordIdentifier.dom_id and dom_class
Also add some generic tests to ensure they're properly deprecated.
2013-01-16 23:09:36 -02:00
Colin Burn-Murdoch
3daff0508b Fix date_select :selected option so you can pass it nil 2013-01-16 21:52:09 +00:00
Carlos Antonio da Silva
e5f5863e86 Remove warnings: "(...) interpreted as grouped expression" 2013-01-16 09:41:08 -02:00
Aditya Sanghi
3c19064610 adding regression test in master for #8631 2013-01-16 16:59:45 +05:30
Rafael Mendonça França
e42b5f99eb Merge pull request #8958 from balexand/strong_parameters_exception_handling
Strong parameters exception handling
2013-01-15 17:28:29 -08:00
Brian Alexander
8e221127ab strong parameters exception handling 2013-01-15 17:45:34 -07:00
Edward Anderson
7925884b5e Remove header bloat introduced by BestStandardsSupport middleware
The same headers were being duplicated on every request.
2013-01-15 19:16:08 -05:00