Closed apex-omontgomery closed 6 years ago
I'd like to work on this first.
@wimo7083 - It's yours! Let me know if you need a hand with anything.
When a new db table is created, you will also want to create a new SlackUser model. This is where the business logic will reside for validations, associations, etc.
Looking at the other models I'm getting an idea of what these do. These look like the private classes that manipulate the database directly that you can expose to the endpoint handlers. Since any email changes are coming from slack I probably don't need email validation. But I could put the query in here to perform the join to find user.
Other than that not sure what custom methods I should include.
Yes, exactly, things like that. Here is a model that uses a variety of validations, constants, scopes, queries, and instance methods:
https://github.com/OperationCode/operationcode_backend/blob/master/app/models/git_hub_statistic.rb
@wimo7083 - How goes on the code review comments? Any questions?
@wimo7083 - We need to get this issue closed in the next few days, as it is blocking the 5 remaining Slack issues.
I can take the issue over if you don't have the bandwidth. Pls let me know ASAP.
Feature
Why is this feature being added?
This feature is being added so that identifying information from the Slack API can be stored in the production database.
By adding a new DB we will reduce the bloat of
User
and allow new contributors to practice performing joins on the DB instance.What should your feature do?
SlackUser
tableUser:slack_name
SlackUser Table