Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make further progress deprecating Follower.user_id. #13945

Merged
merged 3 commits into from Mar 30, 2017

Conversation

ashercodeorg
Copy link
Contributor

@ashercodeorg ashercodeorg commented Mar 22, 2017

More steps towards removing the user_id column in the followers table.

  • Stop setting Follower.user_id in FactoryGirl.
  • Remove user_must_be_section_user validation on Follower.
  • Refactor Section#add_student to not go through Follower.user_id.

@ashercodeorg ashercodeorg changed the title Remove setting user_id from FactoryGirl follower. Remove user_must_be_section_user validation. Stop setting follower.user_id in FactoryGirl. Mar 27, 2017
section_code: @laurel_section_2.code,
redirect: '/'
}
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test should create and destroy a Follower, so it is misleading to assert that it does not create one.

def add_student(student, move_for_same_teacher: true)
if move_for_same_teacher && (follower = student.followeds.find_by(user_id: user_id))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As part of deprecating follower.user_id, this "search" no longer references follower.user_id.

@ashercodeorg ashercodeorg changed the title Remove user_must_be_section_user validation. Stop setting follower.user_id in FactoryGirl. Make further progress deprecating Follower.user_id. Mar 30, 2017
@ashercodeorg ashercodeorg requested review from Hamms and aoby March 30, 2017 01:56
@ashercodeorg ashercodeorg merged commit f9501e8 into staging Mar 30, 2017
@ashercodeorg ashercodeorg deleted the followerNextStep branch March 30, 2017 02:04
@ashercodeorg
Copy link
Contributor Author

FYI @davidwufer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants