LegacySystem.pdf

B6049d83fae261dbba42a27a629704d7?s=47 k-motoyan-diverse
November 27, 2018
910

 LegacySystem.pdf

B6049d83fae261dbba42a27a629704d7?s=128

k-motoyan-diverse

November 27, 2018
Tweet

Transcript

  1. 13.
  2. 16.

    class UserController < ApplicationController def index @user = User.find_by!(id: params[:id],

    status: :active) if !@user.is_debug_user? AccessLog.create user_id: @user.id, user_name: @user.name, access_page: "user_index" end begin @user.friends.each do |friend| if !friend.enabled_friend_access_notification @notification = Notification.create user_id: @friend.id friend_id: @user.id message: "#{@user.name}͕ϚΠϖʔδʹΞΫηε͠·ͨ͠" end PushService.send(@notification) end rescue => e @error = ErrorLog.create message: "ϑϨϯυͷ௨஌ʹࣦഊ͠·ͨ͠" redirect_to error_page_path(@error) end case @user.score when 0..10 render :score1_user when 11..30 render :score2_user when 31..50 render :score3_user when 51..70 render :score4_user when 81..100 render :score5_user end end end
  3. 17.

    class UserController < ApplicationController def index @user = User.find_by!(id: params[:id],

    status: :active) if !@user.is_debug_user? AccessLog.create user_id: @user.id, user_name: @user.name, access_page: "user_index" end begin @user.friends.each do |friend| if !friend.enabled_friend_access_notification @notification = Notification.create user_id: @friend.id friend_id: @user.id message: "#{@user.name}͕ϚΠϖʔδʹΞΫηε͠·ͨ͠" end PushService.send(@notification) end rescue => e @error = ErrorLog.create message: "ϑϨϯυͷ௨஌ʹࣦഊ͠·ͨ͠" redirect_to error_page_path(@error) end case @user.score when 0..10 render :score1_user when 11..30 render :score2_user when 31..50 render :score3_user when 51..70 render :score4_user when 81..100 render :score5_user end end end これは かくうの ソースコードです
  4. 23.

    class UserController < ApplicationController def index @user = User.find_by!(id: params[:id],

    status: :active) if !@user.is_debug_user? AccessLog.create user_id: @user.id, user_name: @user.name, access_page: "user_index" end begin @user.friends.each do |friend| if !friend.enabled_friend_access_notification @notification = Notification.create user_id: @friend.id friend_id: @user.id message: "#{@user.name}͕ϚΠϖʔδʹΞΫηε͠·ͨ͠" end PushService.send(@notification) end rescue => e @error = ErrorLog.create message: "ϑϨϯυͷ௨஌ʹࣦഊ͠·ͨ͠" redirect_to error_page_path(@error) end case @user.score when 0..10 render :score1_user when 11..30 render :score2_user when 31..50 render :score3_user when 51..70 render :score4_user when 81..100 render :score5_user end end end
  5. 24.

    class UserController < ApplicationController def index @user = User.find_by!(id: params[:id],

    status: :active) if !@user.is_debug_user? AccessLog.create user_id: @user.id, user_name: @user.name, access_page: "user_index" end begin @user.friends.each do |friend| if !friend.enabled_friend_access_notification @notification = Notification.create user_id: @friend.id friend_id: @user.id message: "#{@user.name}͕ϚΠϖʔδʹΞΫηε͠·ͨ͠" end PushService.send(@notification) end rescue => e @error = ErrorLog.create message: "ϑϨϯυͷ௨஌ʹࣦഊ͠·ͨ͠" redirect_to error_page_path(@error) end case @user.score when 0..10 render :score1_user when 11..30 render :score2_user when 31..50 render :score3_user when 51..70 render :score4_user when 81..100 render :score5_user end end end
  6. 25.

    class UserController < ApplicationController def index @user = User.find_by!(id: params[:id],

    status: :active) if !@user.is_debug_user? AccessLog.create user_id: @user.id, user_name: @user.name, access_page: "user_index" end begin @user.friends.each do |friend| if !friend.enabled_friend_access_notification @notification = Notification.create user_id: @friend.id friend_id: @user.id message: "#{@user.name}͕ϚΠϖʔδʹΞΫηε͠·ͨ͠" end PushService.send(@notification) end rescue => e @error = ErrorLog.create message: "ϑϨϯυͷ௨஌ʹࣦഊ͠·ͨ͠" redirect_to error_page_path(@error) end case @user.score when 0..10 render :score1_user when 11..30 render :score2_user when 31..50 render :score3_user when 51..70 render :score4_user when 81..100 render :score5_user end end end
  7. 31.

    class UserController < ApplicationController def index @user = User.find_by!(id: params[:id],

    status: :active) if !@user.is_debug_user? AccessLog.create user_id: @user.id, user_name: @user.name, access_page: "user_index" end begin @user.friends.each do |friend| if !friend.enabled_friend_access_notification @notification = Notification.create user_id: @friend.id friend_id: @user.id message: "#{@user.name}͕ϚΠϖʔδʹΞΫηε͠·ͨ͠" end PushService.send(@notification) end rescue => e @error = ErrorLog.create message: "ϑϨϯυͷ௨஌ʹࣦഊ͠·ͨ͠" redirect_to error_page_path(@error) end case @user.score when 0..10 render :score1_user when 11..30 render :score2_user when 31..50 render :score3_user when 51..70 render :score4_user when 81..100 render :score5_user end end end
  8. 32.

    class UserController < ApplicationController def index @user = User.find_by!(id: params[:id],

    status: :active) if !@user.is_debug_user? AccessLog.create user_id: @user.id, user_name: @user.name, access_page: "user_index" end begin @user.friends.each do |friend| if !friend.enabled_friend_access_notification @notification = Notification.create user_id: @friend.id friend_id: @user.id message: "#{@user.name}͕ϚΠϖʔδʹΞΫηε͠·ͨ͠" end PushService.send(@notification) end rescue => e @error = ErrorLog.create message: "ϑϨϯυͷ௨஌ʹࣦഊ͠·ͨ͠" redirect_to error_page_path(@error) end case @user.score when 0..10 render :score1_user when 11..30 render :score2_user when 31..50 render :score3_user when 51..70 render :score4_user when 81..100 render :score5_user end end end
  9. 33.

    class UserController < ApplicationController def index @user = User.find_by!(id: params[:id],

    status: :active) if !@user.is_debug_user? AccessLog.create user_id: @user.id, user_name: @user.name, access_page: "user_index" end begin @user.friends.each do |friend| if !friend.enabled_friend_access_notification @notification = Notification.create user_id: @friend.id friend_id: @user.id message: "#{@user.name}͕ϚΠϖʔδʹΞΫηε͠·ͨ͠" end PushService.send(@notification) end rescue => e @error = ErrorLog.create message: "ϑϨϯυͷ௨஌ʹࣦഊ͠·ͨ͠" redirect_to error_page_path(@error) end case @user.score when 0..10 render :score1_user when 11..30 render :score2_user when 31..50 render :score3_user when 51..70 render :score4_user when 81..100 render :score5_user end end end
  10. 34.

    class UserController < ApplicationController def index @user = User.find_by!(id: params[:id],

    status: :active) if !@user.is_debug_user? AccessLog.create user_id: @user.id, user_name: @user.name, access_page: "user_index" end begin @user.friends.each do |friend| if !friend.enabled_friend_access_notification @notification = Notification.create user_id: @friend.id friend_id: @user.id message: "#{@user.name}͕ϚΠϖʔδʹΞΫηε͠·ͨ͠" end PushService.send(@notification) end rescue => e @error = ErrorLog.create message: "ϑϨϯυͷ௨஌ʹࣦഊ͠·ͨ͠" redirect_to error_page_path(@error) end case @user.score when 0..10 render :score1_user when 11..30 render :score2_user when 31..50 render :score3_user when 51..70 render :score4_user when 81..100 render :score5_user end end end 71 から 80 のケースがない!?