Sha256: 836cb242f14c67a0eb902c32216135bb7f2bc120c9e28a867b19622cacf5722f

Contents?: true

Size: 580 Bytes

Versions: 14

Compression:

Stored size: 580 Bytes

Contents

module Lentil
  class PhotographersController < Lentil::ApplicationController
    def index
      @photographers = User.joins(:images).where("state = 1").group(: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.find(:first).user
        @title = @photographer.user_name + " - Photographers"
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
lentil-0.2.3 app/controllers/lentil/photographers_controller.rb
lentil-0.2.2 app/controllers/lentil/photographers_controller.rb
lentil-0.2.1 app/controllers/lentil/photographers_controller.rb
lentil-0.2.0 app/controllers/lentil/photographers_controller.rb
lentil-0.1.8 app/controllers/lentil/photographers_controller.rb
lentil-0.1.7 app/controllers/lentil/photographers_controller.rb
lentil-0.1.6 app/controllers/lentil/photographers_controller.rb
lentil-0.1.3 app/controllers/lentil/photographers_controller.rb
lentil-0.1.2 app/controllers/lentil/photographers_controller.rb
lentil-0.1.1 app/controllers/lentil/photographers_controller.rb
lentil-0.1.0 app/controllers/lentil/photographers_controller.rb
lentil-0.0.3.pre app/controllers/lentil/photographers_controller.rb
lentil-0.0.2.pre app/controllers/lentil/photographers_controller.rb
lentil-0.0.1.pre app/controllers/lentil/photographers_controller.rb