This commit is contained in:
Thomas Blazek
2015-01-16 09:46:01 +01:00
parent 75667ae6ce
commit a9969a6c72
2 changed files with 3 additions and 3 deletions

View File

@@ -13,7 +13,7 @@
class Gallery < ActiveRecord::Base
WORD_COUNT = 20
attr_accessible :datum, :desc, :name, :foto_ids
has_many :fotos
has_many :fotos, :dependent => :destroy # Delete fotos if gallery is destroyed
has_many :nlinks, as: :link
# scope :search, ->(query) {where("name like ? or galleries.desc like ?", "%#{query}%", "%#{query}%")}
searchable do