18 lines
334 B
Ruby
18 lines
334 B
Ruby
# -*- encoding : utf-8 -*-
|
|
class GalleryImage < ActiveRecord::Base
|
|
belongs_to :image_file
|
|
belongs_to :gallery
|
|
belongs_to :gallery_content
|
|
|
|
validates :title, :presence => true
|
|
|
|
|
|
def tags_class
|
|
to_r = []
|
|
self.tags.to_s.split(",").each do |tag|
|
|
to_r << tag.to_slug
|
|
end
|
|
to_r = to_r.join(" ")
|
|
end
|
|
end
|