Assign valuators to groups
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
class ValuatorGroup < ActiveRecord::Base
|
||||
has_many :valuators
|
||||
end
|
||||
Reference in New Issue
Block a user