Remove subscription ajax controller locales
This commit is contained in:
parent
e670a50adf
commit
6d4478b7c4
|
@ -3,16 +3,14 @@ class Ajax::SubscriptionController < AjaxController
|
||||||
|
|
||||||
def subscribe
|
def subscribe
|
||||||
params.require :answer
|
params.require :answer
|
||||||
@response[:status] = 418
|
@response[:status] = :okay
|
||||||
@response[:message] = I18n.t('messages.subscription.torpedo')
|
|
||||||
state = Subscription.subscribe(current_user, Answer.find(params[:answer])).nil?
|
state = Subscription.subscribe(current_user, Answer.find(params[:answer])).nil?
|
||||||
@response[:success] = state == false
|
@response[:success] = state == false
|
||||||
end
|
end
|
||||||
|
|
||||||
def unsubscribe
|
def unsubscribe
|
||||||
params.require :answer
|
params.require :answer
|
||||||
@response[:status] = 418
|
@response[:status] = :okay
|
||||||
@response[:message] = I18n.t('messages.subscription.torpedo')
|
|
||||||
state = Subscription.unsubscribe(current_user, Answer.find(params[:answer])).nil?
|
state = Subscription.unsubscribe(current_user, Answer.find(params[:answer])).nil?
|
||||||
@response[:success] = state == false
|
@response[:success] = state == false
|
||||||
end
|
end
|
||||||
|
|
|
@ -56,8 +56,6 @@ en:
|
||||||
error: "An error occurred."
|
error: "An error occurred."
|
||||||
parameter_error: "%{parameter} is required."
|
parameter_error: "%{parameter} is required."
|
||||||
noauth: "requires authentication"
|
noauth: "requires authentication"
|
||||||
subscription:
|
|
||||||
torpedo: "418 I'm a torpedo"
|
|
||||||
views:
|
views:
|
||||||
locale:
|
locale:
|
||||||
languages: "Languages"
|
languages: "Languages"
|
||||||
|
|
Loading…
Reference in New Issue