Skip to content

Commit

Permalink
CodeClimate error fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
SidharthBansal committed Jun 3, 2018
1 parent 18f133e commit d96d8cd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/controllers/admin_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def reset_user_password
PasswordResetMailer.reset_notify(user, key).deliver_now unless user.nil? # respond the same to both successes and failures; security
end

flash[:notice] = "#{user.name} should receive an email with instructions on how to reset their password. If they do not, please double check that they are using the email they registered with."
redirect_to "/profile/" + user.name
flash[:notice] = "#{user.name} should receive an email with instructions on how to reset their password. If they do not, please double check that they are using the email they registered with."
redirect_to URI.parse("/profile/" + user.name).path
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/relationships_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class RelationshipsController < ApplicationController
def create
user = User.find(params[:followed_id])
current_user.follow(user)
redirect_to "/profile/#{user.username}"
redirect_to URI.parse("/profile/#{user.username}").path
end

def destroy
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/user_tags_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def create
exist = true
end

unless exist
unless exist
user_tag = user.user_tags.build(value: name)
if tagname.split(':')[0] == "oauth-facebook"
@output[:errors] << "This tag is used for associating a Facebook account. <a href='https://publiclab.org/wiki/oauth'>Click here to read more </a>"
Expand Down Expand Up @@ -53,7 +53,7 @@ def create
else
flash[:notice] = I18n.t('user_tags_controller.tag_created', tag_name: @output[:saved][0][0]).html_safe
end
redirect_to '/profile/' + user.username
redirect_to URI.parse('/profile/' + user.username).path
end
end

Expand Down

0 comments on commit d96d8cd

Please sign in to comment.