Add status messages for blocking/unblocking users
This commit is contained in:
parent
d67ae1eb19
commit
14dfef6a52
|
@ -16,7 +16,7 @@ class Ajax::RelationshipController < AjaxController
|
|||
type: params[:type]
|
||||
)
|
||||
@response[:success] = true
|
||||
@response[:message] = t("messages.friend.create.okay")
|
||||
@response[:message] = t("messages.#{params[:type]}.create.okay")
|
||||
rescue Errors::Base => e
|
||||
@response[:message] = t(e.locale_tag)
|
||||
ensure
|
||||
|
@ -30,7 +30,7 @@ class Ajax::RelationshipController < AjaxController
|
|||
type: params[:type]
|
||||
)
|
||||
@response[:success] = true
|
||||
@response[:message] = t("messages.friend.destroy.okay")
|
||||
@response[:message] = t("messages.#{params[:type]}.destroy.okay")
|
||||
rescue Errors::Base => e
|
||||
@response[:message] = t(e.locale_tag)
|
||||
ensure
|
||||
|
|
|
@ -72,13 +72,20 @@ en:
|
|||
destroy:
|
||||
nopriv: "can't delete other people's comments"
|
||||
okay: "Successfully deleted comment."
|
||||
friend:
|
||||
follow:
|
||||
create:
|
||||
fail: "You are already following that user."
|
||||
okay: "Successfully followed user."
|
||||
destroy:
|
||||
fail: "You are not following that user."
|
||||
okay: "Successfully unfollowed user."
|
||||
block:
|
||||
create:
|
||||
fail: "You are already blocking that user."
|
||||
okay: "Successfully blocked user."
|
||||
destroy:
|
||||
fail: "You are not blocking that user."
|
||||
okay: "Successfully unblocked user."
|
||||
list:
|
||||
create:
|
||||
noname: "Please give that list a name."
|
||||
|
|
Loading…
Reference in New Issue