forked from bofh/fetsite
AutoCommit Son Jun 21 00:03:01 CEST 2015
This commit is contained in:
@@ -17,9 +17,13 @@ class Beispiel < ActiveRecord::Base
|
||||
acts_as_votable
|
||||
acts_as_flagable
|
||||
belongs_to :lva
|
||||
FLAG_ICONS = {"badquality"=>"fa fa-flag", "delete"=>"icon-trash"}
|
||||
|
||||
mount_uploader :beispieldatei, AttachmentUploader
|
||||
FLAG_ICONS = {"badquality"=>"fa fa-flag","goodquality"=>"fa fa-flag", "delete"=>"fa fa-trash"}
|
||||
scope :not_flag_badquality, ->{where("flag_badquality IS NULL OR flag_badquality=?",false)}
|
||||
scope :flag_badquality, ->{where("flag_badquality=?",true)}
|
||||
scope :not_flag_delete, ->{where("flag_delete IS NULL OR flag_delete=?",false)}
|
||||
scope :flag_delete, ->{where("flag_delete=?",true)}
|
||||
|
||||
mount_uploader :beispieldatei, AttachmentUploader
|
||||
validates :beispieldatei, :presence => true
|
||||
validates :name, :presence => true
|
||||
validates :lva_id, :presence => true
|
||||
|
||||
Reference in New Issue
Block a user