aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #17502 from vipulnsward/configurable-delimited-regexRafael Mendonça França2015-08-286-2/+35
|\ | | | | Support for custom regular expression for number_to_delimeted
| * - Extracted `DELIMITED_REGEX` to `delimited_regex` method and made use of ↵Vipul A M2015-08-286-2/+35
| | | | | | | | | | | | | | | | | | | | user passed `options[:delimited_regex]` if available. Changed `DELIMITED_REGEX` to `DEFAULT)DELIMITED_REGEX` to signify what it means. - Added tests for number to delimited and number to currency in both actionview and activesupport. Changes Changes
* | Merge pull request #21396 from rodzyn/code-cleanupGuillermo Iguaran2015-08-282-13/+2
|\ \ | |/ |/| Code cleanup
| * Code cleanupMarcin Olichwirowicz2015-08-272-13/+2
| | | | | | | | | | | | | | | | Cleanup for `ActionDispatch::Http::Parameters` - no need for required libraries and remove not used private method. Apparently this method was used in `ActionDispatch::Http::Request` - fixed by calling `Request::Utils` explicitly (as was done in other parts of the codebase)
* | Disable warnings in railties testsRafael Mendonça França2015-08-271-1/+1
| |
* | Merge pull request #21411 from ↵Rafael Mendonça França2015-08-271-5/+5
|\ \ | | | | | | | | | | | | byroot/perf-improvement-in-dependencies-loadable-constants 10X speed improvements for AS::Dependencies.loadable_constants_for_path
| * | 10X speed improvements for AS::Dependencies.loadable_constants_for_pathJean Boussier2015-08-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the autoload_paths start to grows, this methods is quite a hotspot >> ActiveSupport::Dependencies.autoload_paths.size => 49 >> Benchmark.ips { |x| x.report('baseline') { ActiveSupport::Dependencies.loadable_constants_for_path(File.expand_path('app/models/shop')) }} Calculating ------------------------------------- baseline 90.000 i/100ms ------------------------------------------------- baseline 1.073k (±20.2%) i/s - 4.950k After the patch Calculating ------------------------------------- patched 883.000 i/100ms ------------------------------------------------- patched 11.050k (±19.7%) i/s - 50.331k
* | | Merge pull request #21409 from piton4eg/patch-9Claudio B.2015-08-271-2/+2
|\ \ \ | |/ / |/| | Fix Configuring Active Record [ci skip]
| * | Fix Configuring Active Record [ci skip]Alexey Markov2015-08-271-2/+2
| | |
* | | Merge pull request #21410 from y-yagi/fix_link_in_plugin_guideSean Griffin2015-08-271-1/+0
|\ \ \ | | | | | | | | remove link to outdated article in plugins guide [ci skip]
| * | | remove link to outdated article in plugins guide [ci skip]yuuji.yaginuma2015-08-281-1/+0
|/ / / | | | | | | | | | linked article is a description of the plugins in Rails 2.1.
* | | Revert "this always sets :public to false, so just do that"Aaron Patterson2015-08-271-1/+1
| | | | | | | | | | | | | | | | | | This reverts commit cae2b5bb59212961c4a35c939381ebece48d1177. I am an idiot.
* | | this always sets :public to false, so just do thatAaron Patterson2015-08-271-1/+1
| | |
* | | remove dependency on `@cache_control` ivarAaron Patterson2015-08-271-6/+6
|/ / | | | | | | | | eventually we'll remove this instance variable, but this is the first step
* | remove `@etag` ivarAaron Patterson2015-08-271-5/+7
| | | | | | | | | | we're storing the value in the headers hash, so lets just store the value in one place.
* | use the abstract API in modulesAaron Patterson2015-08-272-14/+15
| | | | | | | | | | Modules should be using the API that the abstract modules use so that we can move these modules between implementations
* | remove useless conditionalAaron Patterson2015-08-271-2/+0
| | | | | | | | | | cookies are always stored as a string in the header hash, so it will not need to be joined.
* | implement the API required by the abstract Rack request.Aaron Patterson2015-08-272-17/+9
| |
* | use the non-hash dependent Rack utils APIAaron Patterson2015-08-272-3/+3
| | | | | | | | eventually we will refactor this to not know about header hashes
* | minor copy edit. [ci skip]Yves Senn2015-08-271-2/+2
| | | | | | | | Follow up to #21384.
* | Merge pull request #21384 from ↵Yves Senn2015-08-273-2/+17
|\ \ | | | | | | | | | | | | jeremyf/updating-ActionController-TestSession-to-behave-as-a-hash-with-indifferent Updating TestSession to access with indifference
| * | Updating TestSession to access with indifferenceJeremy Friesen2015-08-263-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following Rails code failed (with a `KeyError` exception) under test: ```ruby class ApplicationController < ActionController::Base def user_strategy # At this point: # ```ruby # session == { # "user_strategy"=>"email", # "user_identifying_value"=>"hello@world.com" # } # ``` if session.key?(:user_strategy) session.fetch(:user_strategy) end end end ``` When I checked the session's keys (`session.keys`), I got an array of strings. If I accessed `session[:user_strategy]` I got the expected `'email'` value. However if I used `session.fetch(:user_strategy)` I got a `KeyError` exception. This appears to be a Rails 4.2.4 regression (as the code works under Rails 4.2.3). Closes #21383
* | | Merge pull request #21392 from y-yagi/rm_require_support_filesYves Senn2015-08-271-3/+0
|\ \ \ | | | | | | | | remove require of files under support that do not use
| * | | remove require of files under support that do not useyuuji.yaginuma2015-08-271-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | I do not know why files under the support has been require. However, under the support even rails application does not use. In addition, since the default under the support file nor is generated, it requires I think not necessary
* | | | Merge pull request #21389 from Gaurav2728/gaurav-unused_require_fileYves Senn2015-08-274-4/+0
|\ \ \ \ | |_|_|/ |/| | | no more require minitest mock here
| * | | no more require minitest mockGaurav Sharma2015-08-274-4/+0
| | | |
* | | | remove redefined methodAaron Patterson2015-08-261-3/+0
| | | | | | | | | | | | | | | | | | | | Rack::Response::Helpers implements this method, so we can safely remove it
* | | | Remove useless conditionalAaron Patterson2015-08-261-1/+1
| | | | | | | | | | | | | | | | | | | | If the response method is defined, then calling `response` will return a response.
* | | | remove useless codeAaron Patterson2015-08-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If AV::Rendering is mixed in, then `rendered_format` will be calculated based on the current `lookup_context`, but calling `_process_format` will set the `rendered_format` back on to the same lookup context where we got the information in the first place! Instead of getting information from an object, then setting the same information back on to that object, lets just do nothing instead!
* | | | only call self.content_type= when there is a responseAaron Patterson2015-08-263-4/+18
| | | | | | | | | | | | | | | | | | | | Apparently the AbstractController (whatever "abstract" means) is expected to work without a request and response.
* | | | Pull `plain` content type handling up to `render`Aaron Patterson2015-08-263-9/+6
| | | | | | | | | | | | | | | | | | | | `render` is the only possible source for the `plain` option. Pulling the conditional up to the `render` method removes far away conditionals
* | | | stop passing the options hash to `_process_format`Aaron Patterson2015-08-263-5/+5
|/ / / | | | | | | | | | | | | | | | We don't need to pass the full hash just to pull one value out. It's better to just pass the value that the method needs to know about so that we can abstract it away from "options"
* | | remove RackDelegation moduleAaron Patterson2015-08-2614-74/+16
| | | | | | | | | | | | | | | | | | Since all controller instances are required to have a request and response object, RackDelegation is no longer needed (we always have to delegate to the response)
* | | remove useless methodAaron Patterson2015-08-261-5/+0
| | | | | | | | | | | | | | | the subclass sets the body on the response object, so we don't need the superclass doing it too
* | | include ActionView::Rendering in the minimal controllerAaron Patterson2015-08-262-1/+2
| | | | | | | | | | | | without this module, the content type is not set correctly
* | | Merge pull request #21387 from ronakjangir47/remove_dup_minitestKasper Timm Hansen2015-08-265-7/+0
|\ \ \ | | | | | | | | Removed duplicate require 'minitest/mock'
| * | | Removed duplicate requiring minitest/mock as it is already required in ↵Ronak Jangir2015-08-265-7/+0
| | | | | | | | | | | | | | | | method_call_assertions
* | | | `headers` should delegate to the response objectAaron Patterson2015-08-261-1/+2
| | | |
* | | | remove useless status setAaron Patterson2015-08-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Now that `Controller#status=` just delegates to the response object, we don't need to set the response on the controller and the response. We can just set it in one place.
* | | | remove useless conditionalAaron Patterson2015-08-261-1/+1
| | | | | | | | | | | | | | | | we always have a response object, so there is no reason to test it
* | | | remove ivars from the "protected" listAaron Patterson2015-08-261-1/+1
| | | | | | | | | | | | | | | | these ivars don't exist anymore, so we can remove them from the list
* | | | use the content_type method on the request objectAaron Patterson2015-08-261-1/+1
| | | | | | | | | | | | | | | | | | | | since the controller always has a request on it, we can just ask the request for the content type.
* | | | ask the response for the statusAaron Patterson2015-08-261-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | The controller instance always has an instance of a response object. We should store the status code on the response object so that it's only store in one place.
* | | | remove useless conditionalAaron Patterson2015-08-261-1/+1
| | | | | | | | | | | | | | | | | | | | We always have a response object in controller instances, so we can remove this conditional
* | | | remove useless conditionalAaron Patterson2015-08-261-1/+1
| | | | | | | | | | | | | | | | | | | | controller instances always have a response object, so we don't need to test to see if there is one, just always call to_a on the response.
* | | | Merge pull request #21386 from ronakjangir47/remove_dupsRafael Mendonça França2015-08-264-4/+0
|\ \ \ \ | | | | | | | | | | Removed duplicate requires
| * | | | Removed duplicate require ‘models/computer’Ronak Jangir2015-08-264-4/+0
| |/ / /
* | | | Merge pull request #21336 from yui-knk/refactor/to_use_getterRafael Mendonça França2015-08-261-7/+7
|\ \ \ \ | | | | | | | | | | Use `ActiveRecord::Migration#connection` instead of `@connection`
| * | | | Use `ActiveRecord::Migration#connection` instead of `@connection`yui-knk2015-08-231-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | `ActiveRecord::Migration` has `connetion` method so replace to use `connection` method to get `@connection` as much as possible
* | | | | Merge pull request #21382 from akihiro17/fix-testYves Senn2015-08-261-1/+0
|\ \ \ \ \ | |_|_|_|/ |/| | | | Fix the unused variable warning