Rails plug-ins and their basic structure
How to customize the render method to accept custom options
Rails rendering-stack basics
class PostsController < ApplicationController
if client_authenticated? ...