Skip to content

Instantly share code, notes, and snippets.

@edjasperdev
Created August 21, 2014 03:30
Show Gist options
  • Save edjasperdev/7f76a219ac4a863f2b13 to your computer and use it in GitHub Desktop.
Save edjasperdev/7f76a219ac4a863f2b13 to your computer and use it in GitHub Desktop.
Class Playlist
def arrangement_for_tempo
sorted_songs = self.songs.order(tempo: :asc).to_a
cool_down = sorted_songs.pop(5).reverse
workout_songs = sorted_songs + cool_down
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment