2009-05-25 21:39:43 +02:00
|
|
|
class TagsController < ApplicationController
|
2009-08-03 16:39:33 +02:00
|
|
|
before_filter :check_public_access
|
2009-05-25 21:39:43 +02:00
|
|
|
|
|
|
|
def index
|
2009-06-30 21:24:06 +02:00
|
|
|
if params[:album_id]
|
|
|
|
@tags = Album.find( params[:album_id] ).photo_tags
|
|
|
|
else
|
|
|
|
@tags = Tag.find( :all, :order => 'title')
|
|
|
|
end
|
2009-05-25 21:39:43 +02:00
|
|
|
respond_to do |format|
|
|
|
|
format.html
|
|
|
|
format.json { render :json => @tags }
|
|
|
|
format.xml { render :xml => @tags }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|