beathaven/app/controllers/api/albums_controller.rb

14 lines
275 B
Ruby
Raw Normal View History

2012-08-27 03:53:30 +04:00
module Api
class AlbumsController < BaseController
2012-08-27 03:53:30 +04:00
def picture
album = Album.find(params[:id])
redirect_to album.load_pic
end
2012-09-01 21:55:01 +04:00
def show
@album = Album.find(params[:id])
return render json: { fail: true } if @album.nil?
2012-09-01 21:55:01 +04:00
end
2012-08-27 03:53:30 +04:00
end
end