From ca9b4c1d68a0b1fdd5e7865f6354a78ae9c9b342 Mon Sep 17 00:00:00 2001 From: Rafael Reggiani Manzo Date: Wed, 17 Jun 2015 17:08:59 -0300 Subject: [PATCH] User is associated to RepositoryAttributes --- app/models/user.rb | 1 + spec/models/user_spec.rb | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 6b3294f..070d6e6 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -10,6 +10,7 @@ class User < ActiveRecord::Base has_many :project_attributes, class_name: 'ProjectAttributes' has_many :reading_group_attributes, class_name: 'ReadingGroupAttributes' + has_many :repository_attributes, class_name: 'RepositoryAttributes' has_many :kalibro_configuration_attributes, class_name: 'KalibroConfigurationAttributes' # Alert: when adding new parameters to this model, they should also be added to registrations_controller diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 17391a0..c65e983 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -13,6 +13,7 @@ describe User, :type => :model do it { is_expected.to have_many(:project_attributes) } it { is_expected.to have_many(:reading_group_attributes) } it { is_expected.to have_many(:kalibro_configuration_attributes) } + it { is_expected.to have_many(:repository_attributes) } end describe 'methods' do -- libgit2 0.21.2