Skip to content

Instantly share code, notes, and snippets.

@ericallam
Created November 20, 2010 21:46
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 ericallam/708198 to your computer and use it in GitHub Desktop.
Save ericallam/708198 to your computer and use it in GitHub Desktop.
class ZombiesController < ApplicationController
before_filter :find_zombie
before_filter :check_for_tweets
def show
render :action => :show
end
def find_zombie
@zombie = Zombie.find params[:id]
end
def check_for_tweets
if @zombies.tweets.empty?
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