Skip to content

Instantly share code, notes, and snippets.

@mileszs
Created January 26, 2012 20:08
Show Gist options
  • Select an option

  • Save mileszs/1684796 to your computer and use it in GitHub Desktop.

Select an option

Save mileszs/1684796 to your computer and use it in GitHub Desktop.
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
@spraints

Copy link
Copy Markdown

<comment class="random from_the_ether">decent_exposure is a better way to do this type of thing.</comment>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment