find tag by title

This commit is contained in:
Espen Antonsen 2009-06-16 14:03:32 +02:00
parent 7488cb9844
commit 1317435506

View file

@ -4,7 +4,7 @@ class PhotosController < ApplicationController
def index def index
if params[:tag_id] if params[:tag_id]
@photos = Tag.find( params[:tag_id] ).photos.find(:all, :order => "photos.id ASC") @photos = Tag.find_by_title( params[:tag_id] ).photos.find(:all, :order => "photos.id ASC")
elsif params[:album_id] elsif params[:album_id]
@photos = Album.find( params[:album_id]).photos.find(:all, :order => "photos.id ASC") @photos = Album.find( params[:album_id]).photos.find(:all, :order => "photos.id ASC")
elsif params[:q] elsif params[:q]