Commit a4af2e232488967334471b8dee5b4a78795d6d4e

Authored by Rafael Manzo
2 parents 5031856d a9338d88

Merge pull request #213 from mezuro/fix_project_wrong_association

Fix wrong association to Project in ProjectAttributes
app/models/project_attributes.rb
1 1 class ProjectAttributes < ActiveRecord::Base
2 2 belongs_to :user
3   - belongs_to :project
4   -
  3 +
5 4 def project
6 5 Project.find(self.project_id)
7 6 end
... ...
spec/models/project_attributes_spec.rb
... ... @@ -3,7 +3,6 @@ require &#39;rails_helper&#39;
3 3 RSpec.describe ProjectAttributes, type: :model do
4 4 describe 'associations' do
5 5 it { is_expected.to belong_to(:user) }
6   - it { is_expected.to belong_to(:project) }
7 6 end
8 7  
9 8 describe 'methods' do
... ...