Commit 38163cc8
Changed files (2)
app
controllers
models
user
app/controllers/profiles_controller.rb
@@ -5,7 +5,7 @@ class ProfilesController < ApplicationController
end
def index
- @profiles = repository.artists.page(params[:page]).per(12)
+ @profiles = repository.search_with(params).page(params[:page]).per(12)
end
def show
app/models/user/repository.rb
@@ -16,6 +16,10 @@ class User
connection.includes(:avatar).artists
end
+ def search_with(params)
+ artists
+ end
+
private
attr_reader :connection