app/controllers/mystro_volley/home_controller.rb in mystro-volley-0.1.0.rc3 vs app/controllers/mystro_volley/home_controller.rb in mystro-volley-0.1.0
- old
+ new
@@ -1,15 +1,18 @@
require_dependency "mystro_volley/application_controller"
class MystroVolley::HomeController < ApplicationController
include MystroVolley::ApplicationHelper
def index
- @projects = MystroVolley::Project.all
+ #@projects = MystroVolley::Project.all
@myversions = MystroVolley::Version.desc(:timestamp).where(latest: true)
- #render "mystro_volley/versions/index"
end
+ def browser
+ @projects = MystroVolley::Project.all
+ end
+
def show
p = params[:project]
b = params[:branch]
v = params[:version]
@@ -23,23 +26,26 @@
if v
@version = @branch.versions.where(name: v).first
if @version
return render "mystro_volley/versions/show"
else
+ flash.now[:error] = "version #{v} not found"
return render "mystro_volley/branches/show"
end
else
return render "mystro_volley/branches/show"
end
else
+ flash.now[:error] = "branch #{b} not found"
return render "mystro_volley/projects/show"
end
else
return render "mystro_volley/projects/show"
end
else
- @myversions = MystroVolley::Version.desc(:timestamp).where(latest: true)
- render "mystro_volley/versions/index"
+ #@myversions = MystroVolley::Version.desc(:timestamp).where(latest: true)
+ #render "mystro_volley/versions/index"
+ flash.now[:error] = "project #{p} not found"
end
else
@myversions = MystroVolley::Version.desc(:timestamp).where(latest: true)
render "mystro_volley/versions/index"
end