Permalink
Browse files

completely migrated

  • Loading branch information...
1 parent 3d26210 commit 932678d744e1e69e68b8773b84906e1b5a623138 @rkh committed Jan 29, 2010
Showing with 0 additions and 43 deletions.
  1. +0 −43 routes/home.rb
View
43 routes/home.rb
@@ -1,43 +0,0 @@
-warn "#{__FILE__} is currently undergoing a merger into lib/"
-
-module Bithug
- class Routes < Sinatra::Base
-
- helpers do
- def user
- User.find(:name => (params[:username] || current_user)).first
- end
- end
-
- get '/' do
- redirect "/#{current_user}"
- end
-
- get '/:username/?' do
- uzer = user
- haml :home, {},
- :user => uzer,
- :repositories => uzer.repositories,
- :writeable_repositories => Repository.writeable_repos(uzer),
- :readable_repositories => Repository.readable_repos(uzer),
- :following => this_user.following.include?(uzer)
- end
-
- post "/:username/?" do
- if params["post"]["key"]
- Key.add(:user => user,
- :name => params["post"]["name"],
- :value => params["post"]["key"])
- elsif params["post"]["follow"]
- uzer = user
- uzer.following << params[:username]
- uzer.save
- elsif params["post"]["unfollow"]
- uzer = user
- uzer.following.delete(params[:username])
- uzer.save
- end
- redirect request.path_info
- end
- end
-end

0 comments on commit 932678d

Please sign in to comment.