Module: ActionController::Compatibility
- Extended by:
- ActiveSupport::Concern
- Included in:
- Base
- Defined in:
- lib/action_controller/metal/compatibility.rb
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
- #render_to_body(options) ⇒ Object
Instance Method Details
#_handle_method_missing ⇒ Object
53 54 55 56 57 58 |
# File 'lib/action_controller/metal/compatibility.rb', line 53 def _handle_method_missing ActiveSupport::Deprecation.warn "Using `method_missing` to handle non" \ " existing actions is deprecated and will be removed in Rails 4.0, " \ " please use `action_missing` instead.", caller method_missing(@_action_name.to_sym) end |
#_normalize_options(options) ⇒ Object
42 43 44 45 46 |
# File 'lib/action_controller/metal/compatibility.rb', line 42 def () [:text] = nil if .delete(:nothing) == true [:text] = " " if .key?(:text) && [:text].nil? super end |
#assign_shortcuts ⇒ Object
38 39 40 |
# File 'lib/action_controller/metal/compatibility.rb', line 38 def assign_shortcuts(*) ActiveSupport::Deprecation.warn "Calling `assign_shortcuts` is deprecated and has no effect anymore.", caller end |
#initialize_template_class ⇒ Object
For old tests
34 35 36 |
# File 'lib/action_controller/metal/compatibility.rb', line 34 def initialize_template_class(*) ActiveSupport::Deprecation.warn "Calling `initialize_template_class` is deprecated and has no effect anymore.", caller end |
#method_for_action(action_name) ⇒ Object
60 61 62 63 |
# File 'lib/action_controller/metal/compatibility.rb', line 60 def method_for_action(action_name) super || ((self.class.public_method_defined?(:method_missing) || self.class.protected_method_defined?(:method_missing)) && "_handle_method_missing") end |
#render_to_body(options) ⇒ Object
48 49 50 51 |
# File 'lib/action_controller/metal/compatibility.rb', line 48 def render_to_body() [:template].sub!(/^\//, '') if .key?(:template) super || " " end |