Models refactoring, artist page draft
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
class ApplicationController < ActionController::Base
|
||||
protect_from_forgery
|
||||
require 'pp'
|
||||
#require 'cobravsmongoose'
|
||||
end
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
# encoding: utf-8
|
||||
class ArtistController < ApplicationController
|
||||
require 'open-uri'
|
||||
def view
|
||||
@artist = Artist.getByName(params[:name])
|
||||
@albums = ReleaseGroup.getArtistAlbums(@artist.id)
|
||||
rg_ids = []
|
||||
@albums.each do |a|
|
||||
rg_ids << a.id
|
||||
end
|
||||
@releases = Release.getReleases(rg_ids, true, true);
|
||||
@artist = Artist.getByName(params[:name].gsub('+', ' ').gsub('%20', ' '))
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user