Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Relpace `=~ Regexp.new str` with `.include? str` in AC::Base#_valid_action_name? | Viktar Basharymau | 2014-06-19 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because it is more natural way to test substring inclusion. Also, in this particular case it is much faster. In general, using `Regexp.new str` for such kind of things is dangerous. The string must be escaped, unless you know what you're doing. Example: Regexp.new "\\" # HELLO WINDOWS # RegexpError: too short escape sequence: /\/ The right way to do this is escape the string Regexp.new Regexp.escape "\\" # => /\\/ Here is the benchmark showing how faster `include?` call is. ``` require 'benchmark/ips' Benchmark.ips do |x| x.report('include?') { !"index".to_s.include? File::SEPARATOR } x.report(' !~ ') { "index" !~ Regexp.new(File::SEPARATOR) } end __END__ Calculating ------------------------------------- include? 75754 i/100ms !~ 21089 i/100ms ------------------------------------------------- include? 3172882.3 (±4.5%) i/s - 15832586 in 5.000659s !~ 322918.8 (±8.6%) i/s - 1602764 in 4.999509s ``` Extra `.to_s` call is needed to handle the case when `action_name` is `nil`. If it is omitted, some tests fail. | ||||
* | Remove duplicated to_s method call. | Guo Xiang Tan | 2014-05-25 | 1 | -1/+1 |
| | |||||
* | docs, make `ActionNotFound` public API. [ci skip] | Yves Senn | 2014-05-11 | 1 | -1/+2 |
| | | | | | | | | | This is a follow up to #15058. This exception is regularly raised during development. This means it will enter the user realm. We should provide an API page to show that this exception is public API. /cc @schneems | ||||
* | adding complete message in documentation [ci skip] | Gaurav Sharma | 2014-05-11 | 1 | -3/+4 |
| | |||||
* | Only accept actions without File::SEPARATOR in the name. | Rafael Mendonça França | 2014-05-06 | 1 | -3/+25 |
| | | | | | | | | | This will avoid directory traversal in implicit render. Fixes: CVE-2014-0130 Conflicts: actionpack/lib/abstract_controller/base.rb | ||||
* | Get rid of extra local var that does not add to the logic | Carlos Antonio da Silva | 2014-05-05 | 1 | -2/+2 |
| | | | | There are too many "action name" variables around the process method. | ||||
* | Capitalize the first letter of sentence | Tatsuro Baba | 2013-03-18 | 1 | -1/+1 |
| | |||||
* | fix uninitialized ivar warnings | Aaron Patterson | 2012-10-25 | 1 | -0/+10 |
| | |||||
* | remove 'then' from conditional statement | Nihad Abbasov | 2012-10-14 | 1 | -2/+4 |
| | |||||
* | copy edit[ci skip] | Vijay Dev | 2012-05-23 | 1 | -1/+1 |
| | |||||
* | Update documentation for AbstractController::Base | Henrik Hodne | 2012-05-20 | 1 | -3/+11 |
| | |||||
* | avoid empty api pages | Vijay Dev | 2012-04-08 | 1 | -2/+5 |
| | |||||
* | AbstractController.action_methods should return a Set | Santiago Pastorino | 2012-03-10 | 1 | -2/+3 |
| | |||||
* | Fix AbstractController#controller_path doc | Alexey Vakhov | 2012-02-19 | 1 | -1/+1 |
| | |||||
* | Fix AbstractController::Base#hidden_actions comment | Alexey Vakhov | 2012-02-18 | 1 | -2/+2 |
| | |||||
* | Remove extra white spaces on ActionPack docs. | Sebastian Martinez | 2011-05-23 | 1 | -1/+1 |
| | |||||
* | better styling on #available_action? docs | Sebastian Martinez | 2011-05-06 | 1 | -2/+2 |
| | |||||
* | Revert to old semantics, use available_action? instead of action_method?. | José Valim | 2011-05-06 | 1 | -13/+25 |
| | |||||
* | Implicit actions named not_implemented can be rendered | Santiago Pastorino | 2011-04-02 | 1 | -0/+2 |
| | |||||
* | Make action_method? public and change implicit rendering to override it instead. | José Valim | 2011-03-30 | 1 | -15/+18 |
| | |||||
* | Rewording existing comment | Neeraj Singh | 2010-11-30 | 1 | -4/+3 |
| | |||||
* | Fix a few bugs when trying to use Head standalone | wycats | 2010-10-10 | 1 | -0/+1 |
| | |||||
* | oops, missed a uniq | Aaron Patterson | 2010-09-29 | 1 | -1/+1 |
| | |||||
* | dry up action_methods | Aaron Patterson | 2010-09-29 | 1 | -4/+4 |
| | |||||
* | fixed capitalization | Joost Baaij | 2010-08-25 | 1 | -8/+8 |
| | |||||
* | change rdoc to conform to api guidelines | Joost Baaij | 2010-08-25 | 1 | -11/+13 |
| | |||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 1 | -1/+1 |
| | | | | 's/[ \t]*$//' -i {} \;) | ||||
* | Reload action_methods in AbstractController after defining new method. | Piotr Sarnacki | 2010-08-04 | 1 | -0/+12 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | ActiveRecord and ActionPack now use the new descendants implementation. | José Valim | 2010-06-19 | 1 | -11/+2 |
| | |||||
* | Missing method error doesn't specify which controller it is missing from ↵ | Alan Harper | 2010-06-10 | 1 | -1/+1 |
| | | | | | | | | | [#4436 state:resolved] The error page shown when the method you are requesting on a controller doesn't specify which controller the method is missing from Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Changes made while working on upgrading cells to Rails 3 | wycats | 2010-06-03 | 1 | -0/+1 |
| | |||||
* | Clean up the config object in ActionPack. Create config_accessor which just ↵ | José Valim | 2010-04-22 | 1 | -13/+4 |
| | | | | delegates to the config object, reducing the number of deprecations and add specific tests. | ||||
* | Move layout lookup to views. | José Valim | 2010-03-08 | 1 | -6/+0 |
| | |||||
* | Add a method for configuring abstract controllers | Carl Lerche | 2010-03-04 | 1 | -0/+4 |
| | |||||
* | Modifying configurations on the instance of a controller should not affect ↵ | Carl Lerche | 2010-03-03 | 1 | -1/+1 |
| | | | | the class | ||||
* | Tweak how ActionPack handles InheritableOptions | Carl Lerche | 2010-03-03 | 1 | -0/+2 |
| | |||||
* | Move the original config method onto AbstractController | Carl Lerche | 2010-03-03 | 1 | -0/+8 |
| | |||||
* | Fix controller_path returnsing an empty string in Ruby 1.8.7 [#4036 ↵ | José Valim | 2010-02-26 | 1 | -1/+1 |
| | | | | status:resolved] | ||||
* | Clear out AS callback method pollution in AC::Base.action_methods | Joshua Peek | 2010-01-17 | 1 | -8/+12 |
| | |||||
* | Base#action_methods delegates to Base.action_methods | Joshua Peek | 2010-01-17 | 1 | -58/+62 |
| | |||||
* | @_formats initialization should be AbstractController::Base. | José Valim | 2010-01-04 | 1 | -0/+5 |
| | |||||
* | controller_path is required by ActionView, so move it up to ↵ | José Valim | 2009-12-31 | 1 | -0/+15 |
| | | | | AbstractController and refactor AbstractController::Layouts. | ||||
* | Make ActionMailer::Base inherit from AbstractController::Base | José Valim | 2009-12-22 | 1 | -4/+4 |
| | | | | Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local> | ||||
* | AC::Head now doesn't have an unfulfilled Rendering dependency, and instead ↵ | Yehuda Katz | 2009-12-20 | 1 | -0/+1 |
| | | | | works just fine standalone (which means that ConditionalGet also doesn't have a Rendering dependency) | ||||
* | Fix response_body warning in AC | Joshua Peek | 2009-12-14 | 1 | -0/+2 |
| | |||||
* | Relocate AbstractController exceptions into their proper parent modules | Joshua Peek | 2009-12-12 | 1 | -1/+3 |
| | |||||
* | Create new ActionController::Middleware class that will work as a normal ↵ | Yehuda Katz | 2009-08-26 | 1 | -1/+0 |
| | | | | | | Rack middleware. * This initial implementation is a bit hackish, but it uses a normal middleware API so it's future-proof when we improve the internals. | ||||
* | Move AbstractController to a top-level component | Yehuda Katz | 2009-08-06 | 1 | -0/+159 |