aboutsummaryrefslogtreecommitdiff
path: root/app/models/agent.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/agent.rb')
-rw-r--r--app/models/agent.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/agent.rb b/app/models/agent.rb
index 07e0b8e..6264ba3 100644
--- a/app/models/agent.rb
+++ b/app/models/agent.rb
@@ -2,4 +2,15 @@ class Agent < ApplicationRecord
has_many :agencies
has_many :members, through: :agencies, source: :user
has_many :resources
+ has_many :taxonomies
+ has_many :categories, through: :taxonomies
+ has_many :sections, through: :categories
+
+ def to_param
+ uuid
+ end
+
+ def to_s
+ name
+ end
end