AutoCommit Don Jun 25 16:03:19 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-06-25 16:03:20 +02:00
parent b9d436789c
commit 88877ccab0
4 changed files with 20 additions and 2 deletions

View File

@@ -13,10 +13,11 @@
class Beispiel < ActiveRecord::Base
has_paper_trail
attr_accessible :desc, :name, :lva_id, :beispieldatei, :beispieldatei_cache, :datum
attr_accessible :desc, :name, :lva_id, :beispieldatei, :beispieldatei_cache, :datum, :lecturer_id
acts_as_votable
acts_as_flagable
belongs_to :lva
belongs_to :lecturer
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)}