Artist import, page

This commit is contained in:
Gregory Eremin
2012-08-27 03:53:30 +04:00
parent 235c0b809e
commit b5f616a9d9
36 changed files with 1268 additions and 312 deletions
+8
View File
@@ -0,0 +1,8 @@
module Api
class AlbumsController < ::ApplicationController
def picture
album = Album.find(params[:id])
redirect_to album.load_pic
end
end
end
+10
View File
@@ -0,0 +1,10 @@
module Api
class ArtistsController < ::ApplicationController
def show
artist = Artist.with_name(params[:id].gsub("+", " "))
return render json: { fail: true } if artist.nil?
render json: artist.dump_json
end
end
end
@@ -1,3 +1,7 @@
class ApplicationController < ActionController::Base
protect_from_forgery
def main
end
end