Skip to content

Instantly share code, notes, and snippets.

@sllvn
Created March 21, 2012 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sllvn/2152742 to your computer and use it in GitHub Desktop.
Save sllvn/2152742 to your computer and use it in GitHub Desktop.
class ZombiesController < ApplicationController
before_filter :find_zombie
def show
render :action => :show
end
def find_zombie
@zombie = Zombie.find params[:id]
if @zombie.tweets.size == 0
redirect_to zombies_path
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment