Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

Commit

Permalink
Merge pull request #30 from tetzng/develop
Browse files Browse the repository at this point in the history
Add reviews#edit test code
  • Loading branch information
tetzng authored Dec 15, 2019
2 parents 5360967 + dd9fd39 commit 61a14fc
Show file tree
Hide file tree
Showing 6 changed files with 1,037 additions and 36 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@
# Ignore master key for decrypting credentials and more.
/config/master.key

/db/mysql_data/*
/db/mysql_data/*
.coverage
.coverage.*
32 changes: 0 additions & 32 deletions app/helpers/tracks_helper.rb
Original file line number Diff line number Diff line change
@@ -1,36 +1,4 @@
# frozen_string_literal: true

module TracksHelper
def spotify_info(track)
RSpotify::Track.find(track.spotify_id)
end

def album_id(track)
RSpotify::Track.find(track.spotify_id).album.id
end

def album_name(track)
RSpotify::Track.find(track.spotify_id).album.name
end

def album_image(track)
images = RSpotify::Track.find(track.spotify_id).album.images
images.blank? ? 'no_image.png' : images[0]['url']
end

def album_type(track)
RSpotify::Track.find(track.spotify_id).album.album_type
end

def album_release_date(track)
RSpotify::Track.find(track.spotify_id).album.release_date
end

def artist_id(track)
RSpotify::Track.find(track.spotify_id).artists[0].id
end

def artist_name(track)
RSpotify::Track.find(track.spotify_id).artists[0].name
end
end
Loading

0 comments on commit 61a14fc

Please sign in to comment.