Feature: my page & user information edit
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
-
-
-
-
-
resolved all discussions
Toggle commit list -
-
merged
Toggle commit list
Step 1. Fetch and check out the branch for this merge request
git fetch origin git checkout -b feature/user_information origin/feature/user_information
Step 2. Review the changes locally
Step 3. Merge the branch and fix any conflicts that come up
git checkout master git merge --no-ff feature/user_information
Step 4. Push the result of the merge to GitLab
git push origin master
Note that pushing to GitLab requires write access to this repository.
Tip: You can also checkout merge requests locally by following these guidelines.
| 6 | 6 | devise_for :users |
| 7 | 7 | root "static_pages#index" |
| 8 | 8 | get "static_pages/index" |
| 9 | get "my", to: "users/my_page#index" | |
Please
register
or
sign in
to reply
|
||
| 1 | <h1>My Page</h1> | |
| 2 | ||
| 3 | <div class="container"> | |
| 4 | <h3>Email: <%= current_user.email %></h3> | |
| 5 | <h3>Full name: <%= current_user.first_name %> <%= current_user.last_name %></h3> | |
| 6 | <h3>My CV: <%= current_user.cv_path %></h3> | |
| 7 | <br> | |
| 8 | <%= link_to "Update", edit_user_registration_path, class: "btn btn-lg btn-primary" %> | |
|
||
| 1 | class Users::RegistrationsController < Devise::RegistrationsController | |
| 2 | before_action :sign_up_params, only: :create | |
| 3 | before_action :account_update_params, only: :update | |
| 4 | ||
| 5 | private | |
| 6 | ||
| 7 | def sign_up_params | |
| 8 | params.require(:user).permit(:first_name, :last_name, :email, :password, :password_confirmation) | |
| 9 | end | |
| 10 | ||
| 11 | def account_update_params | |
| 12 | params.require(:user).permit(:first_name, :last_name, :email, :password, :password_confirmation, :current_password) | |
| 13 | end | |
|
||
| 1 | class Users::RegistrationsController < Devise::RegistrationsController | |
|
||
resolved all discussions
resolved all discussions
added 1 commit
mentioned in commit 27e07bd1
mentioned in commit 27e07bd1
merged
merged