public
Description: A Web-2.0 style, AJAX powered lyrics database using Ruby on Rails
Homepage: http://shanesveller.com/projects/
Clone URL: git://github.com/shanesveller/rails-lyrics.git
Album stuff started
shanesveller (author)
Thu Jul 17 08:19:56 -0700 2008
commit  d439351de686a79f00b57f7bbf978c138377a82c
tree    c5b29f9aa4b92e2e547e1480d027d24190b145e9
parent  33b5902cc162deac242c326e32b04f27b2063395
...
9
10
11
12
 
13
14
15
16
 
17
18
19
...
9
10
11
 
12
13
14
15
 
16
17
18
19
0
@@ -9,11 +9,11 @@ class LyricsController < ApplicationController
0
   end
0
 
0
   def current_objects
0
- @current_objects ||= Lyric.paginate :page => params[:page], :order => "artist_id ASC, album ASC, track ASC, title ASC"
0
+ @current_objects = Lyric.paginate :page => params[:page], :order => "artist_id ASC, album_id ASC, track ASC, title ASC"
0
   end
0
   
0
   def blank
0
- @current_objects = Lyric.blank.paginate :page => params[:page], :order => "artist_id ASC, album ASC, track ASC, title ASC"
0
+ @current_objects = Lyric.blank.paginate :page => params[:page], :order => "artist_id ASC, album_id ASC, track ASC, title ASC"
0
     render :action => 'index'
0
   end
0
   
...
1
2
3
4
5
 
6
7
8
9
10
11
12
 
 
 
13
14
15
16
17
18
 
 
 
 
 
 
 
...
 
 
1
 
 
2
3
 
 
 
 
 
 
4
5
6
7
 
 
 
 
 
8
9
10
11
12
13
14
0
@@ -1,18 +1,14 @@
0
-%h1 Viewing album
0
-
0
 %div[current_object]
0
- %p.title
0
- %strong Title
0
+ %h1.title
0
     = h current_object.title
0
- %p.year
0
- %strong Year
0
- = h current_object.year
0
- %p.artist
0
- %strong Artist
0
- = h current_object.artist
0
+ - if current_object.year
0
+ = "(#{h current_object.year})"
0
+ %h2.artist= link_to h(current_object.artist.name), artist_path(current_object.artist)
0
 
0
-= link_to 'Edit', edit_object_path
0
-|
0
-= link_to 'Destroy', object_path, :confirm => 'Really destroy album?', :method => :delete
0
-|
0
-= link_to 'Back', objects_path
0
+#toolbar
0
+ - if @user
0
+ = link_to 'Edit', edit_object_path
0
+ |
0
+ = link_to 'Destroy', object_path, :confirm => 'Really destroy album?', :method => :delete
0
+ |
0
+ = link_to 'Back', objects_path
...
27
28
29
30
31
32
33
...
27
28
29
 
30
31
32
0
@@ -27,7 +27,6 @@ ActiveRecord::Schema.define(:version => 20080715193737) do
0
 
0
   create_table "lyrics", :force => true do |t|
0
     t.string "title"
0
- t.string "album"
0
     t.integer "year", :limit => 11
0
     t.integer "track", :limit => 11
0
     t.string "genre"
...
46
47
48
49
 
50
51
52
...
46
47
48
 
49
50
51
52
0
@@ -46,7 +46,7 @@ namespace :import do
0
           alb.save
0
         end
0
 
0
- song = Lyric.find_or_initialize_by_title_and_artist_id_and_album_id(title,art.id,alb.id || '')
0
+ song = Lyric.find_or_initialize_by_title_and_artist_id_and_album_id(title,art.id,alb.id || nil)
0
         song.year = year
0
         song.genre = genre
0
         song.track = track

Comments

    No one has commented yet.