aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/examples
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/examples')
-rw-r--r--actionpack/examples/minimal.rb8
-rw-r--r--actionpack/examples/very_simple.rb6
2 files changed, 6 insertions, 8 deletions
diff --git a/actionpack/examples/minimal.rb b/actionpack/examples/minimal.rb
index 9eb92cd8e7..7106149fa2 100644
--- a/actionpack/examples/minimal.rb
+++ b/actionpack/examples/minimal.rb
@@ -45,11 +45,9 @@ end
OK = [200, {}, []]
MetalPostController = lambda { OK }
-if ActionController.const_defined?(:Http)
- class HttpPostController < ActionController::Http
- def index
- self.response_body = ''
- end
+class HttpPostController < ActionController::Metal
+ def index
+ self.response_body = ''
end
end
diff --git a/actionpack/examples/very_simple.rb b/actionpack/examples/very_simple.rb
index 8d01cb39bd..422c4c3298 100644
--- a/actionpack/examples/very_simple.rb
+++ b/actionpack/examples/very_simple.rb
@@ -3,7 +3,7 @@ $:.push "rails/actionpack/lib"
require "action_controller"
-class Kaigi < ActionController::Http
+class Kaigi < ActionController::Metal
include AbstractController::Callbacks
include ActionController::RackConvenience
include ActionController::Renderer
@@ -13,7 +13,7 @@ class Kaigi < ActionController::Http
before_filter :set_name
append_view_path "views"
- def _action_view
+ def view_context
self
end
@@ -23,7 +23,7 @@ class Kaigi < ActionController::Http
DEFAULT_LAYOUT = Object.new.tap {|l| def l.render(*) yield end }
- def _render_template_from_controller(template, layout = DEFAULT_LAYOUT, options = {}, partial = false)
+ def render_template(template, layout = DEFAULT_LAYOUT, options = {}, partial = false)
ret = template.render(self, {})
layout.render(self, {}) { ret }
end