Assign valuators to groups

This commit is contained in:
rgarcia
2018-02-08 20:47:47 +01:00
parent cddfdf4b84
commit 1dbbe331c9
14 changed files with 132 additions and 9 deletions

View File

@@ -43,7 +43,7 @@ module Abilities
can [:search, :create, :index, :destroy], ::Administrator
can [:search, :create, :index, :destroy], ::Moderator
can [:search, :create, :index, :destroy, :summary], ::Valuator
can [:search, :show, :edit, :update, :create, :index, :destroy, :summary], ::Valuator
can [:search, :create, :index, :destroy], ::Manager
can [:search, :index], ::User

View File

@@ -1,5 +1,7 @@
class Valuator < ActiveRecord::Base
belongs_to :user, touch: true
belongs_to :valuator_group
delegate :name, :email, :name_and_email, to: :user
has_many :valuation_assignments, dependent: :destroy

View File

@@ -1,2 +1,3 @@
class ValuatorGroup < ActiveRecord::Base
has_many :valuators
end