Class: Jail::GithubsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/jail/githubs_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
# File 'app/controllers/jail/githubs_controller.rb', line 5

def index
  @githubs = Github.all
end

#installObject



13
14
15
16
17
# File 'app/controllers/jail/githubs_controller.rb', line 13

def install
  @github = Github.find(params[:name], params[:repo])
  @github.install
  redirect_to( "/jail/#{params[:name]}/#{params[:repo]}", :notice => "Installed!" )
end

#removeObject



19
20
21
22
23
# File 'app/controllers/jail/githubs_controller.rb', line 19

def remove
  @github = Github.find(params[:name], params[:repo])
  @github.remove
  redirect_to( "/jail/#{params[:name]}/#{params[:repo]}", :notice => "Removed!" )
end

#showObject



9
10
11
# File 'app/controllers/jail/githubs_controller.rb', line 9

def show
  @github = Github.find(params[:name], params[:repo], params[:path])
end