A Q&A Forum for Instacart Employees
- Users create questions that are answered by, commented on, and liked by other users.
- Users can also like answers and comments, and comment on answers.
- Question authors can mark an answer as "accepted"
- Authors can edit or delete their questions, answers, and comments, respectively.
- Users can sort by most recent, most commented, most answered, or most popular (most likes).
- Users can search the database for matches on
question.summary,question.body, andtag_list.
- Rails 4.1
- 100% React Client with React Router and Redux
- Server/Client Integration with React_on_rails
- Rails sends data as packaged json through Active Model Serializers
Allow users to comment on questions OR answers via @context (another suggestion from Rich on Rails) to determine the association.
def context
if params[:question_id]
id = params[:question_id]
Question.find(params[:question_id])
elsif params[:answer_id]
id = params[:answer_id]
Answer.find(params[:answer_id])
end
end
@context = context
- We integrated Acts As Votable to allow users to upvote questions and answers.
- We used Acts as Taggable On for tag functionality.
- User auth on server side via OmniAuth Google OAuth2 Strategy and this tutorial form Rich on Rails
- Extracts several features from Devise, such as the
current_userobject, but with a much lighter framework and faster implementation time - Will create a new user if one does not exist.
- Access Restricted to instacart.com and option to whitelist other domains