photomix/app/controllers/tags_controller.rb

17 lines
394 B
Ruby
Raw Normal View History

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
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