<NME> rendering.rb
<BEF> ADDFILE
<MSG> Rango::Controller split into several mixins + Rango::Controller with just basic functionality

<DFF> @@ -0,0 +1,41 @@
+# encoding: utf-8
+
+module Rango
+  module ImplicitRendering
+    def render(template, locals = Hash.new)
+      super(template, self.locals.merge!(locals))
+    end
+    
+    #   def show
+    #     # you can't use @explicit
+    #     post = Post.get(params[:id])
+    #     render "post.html", post: post
+    #   end
+    # end
+    #
+    # Context for rendering templates
+    # This context will be extended by same crucial methods from template mixin
+    # We are in context of current controller by default
+    def context
+      Object.new.extend(Rango::Helpers)
+    end
+
+    # def show
+    #   locals[:post] = Post.get(params[:id])
+    #   render "show.html", locals
+    # end
+    def locals
+      @locals ||= {message: self.message}
+    end
+  end
+
+  module ExplicitRendering
+    def context
+      self
+    end
+
+    def render(template)
+      super template
+    end
+  end
+end

Rango::Controller split into several mixins + Rango::Controller with just basic functionality