forked from bofh/fetsite
AutoCommit Don Aug 6 21:03:01 CEST 2015
This commit is contained in:
@@ -43,6 +43,8 @@ cannot :destroy, Comment
|
||||
end
|
||||
if ((user.has_role?("moderator",Beispiel)) || user.has_role?("fetuser") || user.has_role?("fetadmin"))
|
||||
can :flag, Beispiel
|
||||
can [:create, :show], Beispiel, flag_delete: true
|
||||
|
||||
can [:edit, :update], Beispiel
|
||||
can :flag, Beispiel
|
||||
can :set_lecturer, Beispiel
|
||||
|
||||
@@ -20,6 +20,7 @@ class Beispiel < ActiveRecord::Base
|
||||
|
||||
belongs_to :lecturer
|
||||
FLAG_ICONS = {"badquality"=>"fa fa-flag","goodquality"=>"fa fa-flag", "delete"=>"fa fa-trash"}
|
||||
FLAG_CONFIRM={}
|
||||
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)}
|
||||
|
||||
@@ -5,6 +5,7 @@ class Survey::Question < ActiveRecord::Base
|
||||
has_many :answers, through: :choices
|
||||
include IsCommentable
|
||||
FLAG_ICONS={"delete" => "fa fa-trash"}
|
||||
FLAG_CONFIRM={}
|
||||
scope :templates, ->{ where(flag_template:true)}
|
||||
acts_as_flagable
|
||||
|
||||
|
||||
Reference in New Issue
Block a user