lukeredpath (owner)

Revisions

  • bebcc2 lukered... Mon Aug 04 04:48:26 -0700 2008
gist: 3876 Download_button fork
public
Public Clone URL: git://gist.github.com/3876.git
Embed All Files: show embed
projects_controller.rb #
1
2
3
4
5
6
7
8
def show
  if @project = @user.projects.find_by_name(params[:project_name])
    # congrats, it exists
  elsif project = @user.projects.find_by_old_name(params[:project_name])
    redirect_to project_url(project), :status => :moved_permanently
  end
end