Last active
January 29, 2019 17:25
-
-
Save MartianLee/d3629fc4faae4d1cb8635d01e9bfaf6d to your computer and use it in GitHub Desktop.
users_controller.rb에서 프로필이 업데이트될 때 broadcast를 수행합니다.
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
def update | |
...... | |
if @user.update_attributes(user_params) | |
flash[:success] = '저장되었습니다' | |
broadcast_user_updated(@user) | |
redirect_to @meeting | |
else | |
..... | |
end | |
..... | |
private | |
def broadcast_user_updated(user) | |
UserBroadcastJob.perform_async(user.id) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment