Sha256: cd20dc1cc58c58baa4f34e63aafae27d5a2e25f1b7701d0932d42b7f41de4d8e

Contents?: true

Size: 589 Bytes

Versions: 6

Compression:

Stored size: 589 Bytes

Contents

module Lentil
  class PhotographersController < Lentil::ApplicationController
    def index
      @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")


      if @images.empty?
        head :internal_server_error
      else
        @photographer = @images.first!.user
        @title = @photographer.user_name + " - Photographers"
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lentil-1.0.5 app/controllers/lentil/photographers_controller.rb
lentil-1.0.4 app/controllers/lentil/photographers_controller.rb
lentil-1.0.3 app/controllers/lentil/photographers_controller.rb
lentil-1.0.2 app/controllers/lentil/photographers_controller.rb
lentil-1.0.1 app/controllers/lentil/photographers_controller.rb
lentil-1.0.0 app/controllers/lentil/photographers_controller.rb