| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
The error was moved outside of the `ClassMethods` module.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When helper try to require missing file rails will throw exception about
missing helper.
# app/helpers/my_helper.rb
require 'missing'
module MyHelper
end
And when we try do load helper
class ApplicationController
helper :my
end
Rails will throw exception. This is wrong because there is a helper
file.
Missing helper file helpers/my_helper.rb
Now when helper try to require non-existed file rails will throw proper
exception.
No such file to load -- missing
|
| |
|
| |
|
|
|
|
|
| |
This reverts commit 637a7d9d357a0f3f725b0548282ca8c5e7d4af4a, reversing
changes made to 5937bd02dee112646469848d7fe8a8bfcef5b4c1.
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit e1f8ec59f2cc83f052b15233147aa2d6d8114a4d.
Reason: seems bad styling
[ci skip]
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* Avoid calling class_eval when not needed
* Remove helpers_path attr accessor, it's defined as a class attribute a
few lines later
* Avoid creating extra arrays when finding helpers, use flat_map and sort!
* Remove not required refer variable when redirecting :back
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
The `path` method on missing helper errors is inconsistent with the
implementation on LoadError in Ruby 2.0. Wrap up the missing helper
exceptions so that the inconsistent behavior is mirrored in Ruby 2.0
(until we can figure out *why* it's inconsistent).
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
ActionController::Base.all_helpers_from_path public methods
|
|
|
|
|
|
| |
clear_helpers [#5348 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
| |
maintaing just the helper with the same name as the controller.
|
| |
|
|
|
|
| |
delegates to the config object, reducing the number of deprecations and add specific tests.
|
|
|
|
| |
need for ActionView::Base.for_controller
|
|
|
|
| |
status:resolved]
|
|
|
|
| |
docs I'm working on.
|
|
|
|
| |
Signed-off-by: Yehuda Katz <yehudakatz@YK.local>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
flushing due to runtime Kernel#extend:
* The helper module adds a new _helper_serial property onto AbstractController subclasses
* When #helper is used to add helpers to a class, the serial number is updated
* An ActionView subclass is created and cached based on this serial number.
* That subclass includes the helper module from the controller
* Subsequent requests using the same controller with the same serial will result in
reusing that subclass, rather than being forced to take an action (like include
or extend) that will result in a global method cache flush on MRI and a flush
of the entire AV class' cache on JRuby.
* For now, this optimization is not applied to the RJS helpers, which results in
a global method cache flush in MRI and a flush of the JavaScriptGenerator class in
JRuby only when using RJS.
* Since the effects are limited to using RJS, and would only affect JavaScriptGenerator
in JRuby (as opposed to the entire view object), it seems worthwhile to apply this
now.
* This resulted in a significant performance improvement. I will have benchmarks
in the next day or two that show the performance impact of the last several
commits.
* There is a small chance this could break existing code (although I'm not sure how).
If that happens, please report it immediately.
|
| |
|
|
|