Module: ActionController::Compatibility
- Extended by:
- ActiveSupport::Concern
- Included in:
- Base
- Defined in:
- lib/action_controller/metal/compatibility.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #_handle_method_missing ⇒ Object
- #_normalize_options(options) ⇒ Object
- #assign_shortcuts ⇒ Object
-
#initialize_template_class ⇒ Object
For old tests.
- #method_for_action(action_name) ⇒ Object
- #performed? ⇒ Boolean
- #render_to_body(options) ⇒ Object
Instance Method Details
#_handle_method_missing ⇒ Object
58 59 60 |
# File 'lib/action_controller/metal/compatibility.rb', line 58 def _handle_method_missing method_missing(@_action_name.to_sym) end |
#_normalize_options(options) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/action_controller/metal/compatibility.rb', line 41 def () if [:action] && [:action].to_s.include?(?/) ActiveSupport::Deprecation.warn "Giving a path to render :action is deprecated. " << "Please use render :template instead", caller [:template] = .delete(:action) end [:text] = nil if .delete(:nothing) == true [:text] = " " if .key?(:text) && [:text].nil? super end |
#assign_shortcuts ⇒ Object
39 |
# File 'lib/action_controller/metal/compatibility.rb', line 39 def assign_shortcuts(*) end |
#initialize_template_class ⇒ Object
For old tests
38 |
# File 'lib/action_controller/metal/compatibility.rb', line 38 def initialize_template_class(*) end |
#method_for_action(action_name) ⇒ Object
62 63 64 |
# File 'lib/action_controller/metal/compatibility.rb', line 62 def method_for_action(action_name) super || (respond_to?(:method_missing) && "_handle_method_missing") end |
#performed? ⇒ Boolean
66 67 68 |
# File 'lib/action_controller/metal/compatibility.rb', line 66 def performed? response_body end |
#render_to_body(options) ⇒ Object
53 54 55 56 |
# File 'lib/action_controller/metal/compatibility.rb', line 53 def render_to_body() [:template].sub!(/^\//, '') if .key?(:template) super || " " end |