This repository was archived by the owner on Mar 16, 2022. It is now read-only.
Open
Conversation
Created a migration to add columns (first_name, last_name, blurb, hobbies, projects, contacts) to the user database. Updated the profile views to show the new fields and created an edit view and edit form to user profiles. Updated the profile controller. Created variables for the current user and added secure edit and update methods using the params variable.
objects. Also migrated a public boolean for users to checkbox their profile into public status or private. 2: Created a Profiles resource in routes to create a page for the index of the profiles. 3: Profile Controller: Defined an index for all of the users profiles. Added an if statement to the show definition to determine whether or not the current_user was viewing their page or someone elses. Added public and email to the updateable params. 4: Added more asthetic changes to the format of the profile view in show.html. Added a link to Edit the profile if the current user is on their page. Changed the current_user variable to @Profile from the profile controller. 5: Added an error statement in the view form and added parameteres to the User model for the size and presence of first_name, last_name, and contact to coincide with the error message.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added more information to the User database
--Profile information: first_name, last_name, hobbies, projects, contact, and a public option
Made the information editable by the user
Created an index page of all of the public user profiles to promote collaboration and community for members