photomix/app/controllers/tags_controller.rb
2009-08-03 16:39:33 +02:00

17 lines
394 B
Ruby

class TagsController < ApplicationController
before_filter :check_public_access
def index
if params[:album_id]
@tags = Album.find( params[:album_id] ).photo_tags
else
@tags = Tag.find( :all, :order => 'title')
end
respond_to do |format|
format.html
format.json { render :json => @tags }
format.xml { render :xml => @tags }
end
end
end