app/controllers/lentil/photographers_controller.rb in lentil-0.2.3 vs app/controllers/lentil/photographers_controller.rb in lentil-0.3.0
- old
+ new
@@ -1,8 +1,8 @@
module Lentil
class PhotographersController < Lentil::ApplicationController
def index
- @photographers = User.joins(:images).where("state = 1").group(:id).order(:user_name)
+ @photographers = User.joins(:images).where("state = 1").group('lentil_users.id').order(:user_name)
@title = "Photographers"
end
def show
@images = Image.search(params[:page]).approved.where(:user_id => params[:id]).includes(:user).order("original_datetime DESC")
\ No newline at end of file