Created
January 26, 2012 20:08
-
-
Save mileszs/1684796 to your computer and use it in GitHub Desktop.
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
| class ThingsController < ApplicationController | |
| before_filter :load_thing, :except => :index | |
| def index | |
| # ... | |
| end | |
| def show | |
| # ... | |
| end | |
| # etc ... | |
| private | |
| def load_thing | |
| @thing = Thing.find(params[:id]) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
<comment class="random from_the_ether">decent_exposure is a better way to do this type of thing.</comment>