Permalink
Browse files

Refactored /:name/resolve

  • Loading branch information...
tj committed Mar 4, 2010
1 parent 5f99410 commit 343fab89337fa1c9a1511992f17e03d413ae9bfa
Showing with 5 additions and 5 deletions.
  1. +5 −5 server/server/routes.rb
View
@@ -29,12 +29,12 @@
# Resolve the given :version for seed _name_.
get '/:name/resolve/?' do
- seed = Kiwi::Seed.new params[:name]
- require_seed seed
- if params[:version] && !params[:version].empty?
- seed.resolve(params[:version]) or not_found 'seed version does not exist.'
+ version = params[:version]
+ require_seed params[:name]
+ if version and not version.empty?
+ @seed.resolve(version) or not_found 'seed version does not exist.'
else
- seed.current_version
+ @seed.current_version.number
end
end

0 comments on commit 343fab8

Please sign in to comment.