photomix/app/models/collection.rb

9 lines
181 B
Ruby
Raw Normal View History

2009-06-03 01:33:39 +02:00
class Collection < ActiveRecord::Base
has_many :collection_albums
has_many :albums, :through => :collection_albums
2009-06-11 13:05:09 +02:00
def to_param
title.gsub(/[^a-z0-9]+/i, '-')
end
end