Skip to content

Instantly share code, notes, and snippets.

@dchapman1988
Created June 21, 2011 22:29
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 dchapman1988/1039091 to your computer and use it in GitHub Desktop.
Save dchapman1988/1039091 to your computer and use it in GitHub Desktop.
def show
if current_user
unless current_user.stocks?
redirect_to root_path, :notice => "You need to add some stocks first."
end
@stocks = current_user.stocks
else
redirect_to new_user_session_path
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment