Find right @repositories in repositories#index
This commit is contained in:
parent
b9c4ab3170
commit
b835c7ad3c
|
@ -7,7 +7,11 @@ class RepositoriesController < ApplicationController
|
||||||
before_filter :check_global_access, :only => [:index, :new, :create]
|
before_filter :check_global_access, :only => [:index, :new, :create]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@repositories = Repository.paginate(:page => params[:repository_page])
|
if params[:platform_id]
|
||||||
|
@repositories = Platform.find(params[:platform_id]).repositories.paginate(:page => params[:repository_page])
|
||||||
|
else
|
||||||
|
@repositories = Repository.paginate(:page => params[:repository_page])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|
Loading…
Reference in New Issue