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