This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Given a controller that looks like this | |
| class ModelsController < ApplicationController | |
| load_and_authorize_resource #CanCan | |
| def show | |
| if stale? @model | |
| respond_to do |format| | |
| format.json do | |
| @model | |
| end |