init commit
This commit is contained in:
parent
93efff9452
commit
9ba1224867
307 changed files with 11053 additions and 0 deletions
21
app/controllers/profile_controller.rb
Normal file
21
app/controllers/profile_controller.rb
Normal file
|
@ -0,0 +1,21 @@
|
|||
class ProfileController < ApplicationController
|
||||
def show
|
||||
@user = current_user
|
||||
end
|
||||
|
||||
def password
|
||||
@user = current_user
|
||||
end
|
||||
|
||||
def password_update
|
||||
params[:user].reject!{ |k, v| k != "password" && k != "password_confirmation"}
|
||||
@user = current_user
|
||||
|
||||
if @user.update_attributes(params[:user])
|
||||
flash[:notice] = "Password was successfully updated. Please login with it"
|
||||
redirect_to new_user_session_path
|
||||
else
|
||||
render :action => "password"
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue