Improved params handling regarding RoR 5.0.
This commit is contained in:
parent
7d76805f98
commit
181dd55140
1 changed files with 9 additions and 8 deletions
|
@ -92,7 +92,7 @@ class ChannelsEmailController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def verify
|
def verify
|
||||||
|
params.permit!
|
||||||
email = params[:email] || params[:meta][:email]
|
email = params[:email] || params[:meta][:email]
|
||||||
email = email.downcase
|
email = email.downcase
|
||||||
channel_id = params[:channel_id]
|
channel_id = params[:channel_id]
|
||||||
|
@ -105,8 +105,8 @@ class ChannelsEmailController < ApplicationController
|
||||||
|
|
||||||
# check delivery for 30 sek.
|
# check delivery for 30 sek.
|
||||||
result = EmailHelper::Verify.email(
|
result = EmailHelper::Verify.email(
|
||||||
outbound: params[:outbound],
|
outbound: params[:outbound].to_h,
|
||||||
inbound: params[:inbound],
|
inbound: params[:inbound].to_h,
|
||||||
sender: email,
|
sender: email,
|
||||||
subject: params[:subject],
|
subject: params[:subject],
|
||||||
)
|
)
|
||||||
|
@ -126,8 +126,8 @@ class ChannelsEmailController < ApplicationController
|
||||||
channel = Channel.find(channel_id)
|
channel = Channel.find(channel_id)
|
||||||
channel.update_attributes(
|
channel.update_attributes(
|
||||||
options: {
|
options: {
|
||||||
inbound: params[:inbound],
|
inbound: params[:inbound].to_h,
|
||||||
outbound: params[:outbound],
|
outbound: params[:outbound].to_h,
|
||||||
},
|
},
|
||||||
group_id: params[:group_id],
|
group_id: params[:group_id],
|
||||||
last_log_in: nil,
|
last_log_in: nil,
|
||||||
|
@ -143,8 +143,8 @@ class ChannelsEmailController < ApplicationController
|
||||||
channel = Channel.create(
|
channel = Channel.create(
|
||||||
area: 'Email::Account',
|
area: 'Email::Account',
|
||||||
options: {
|
options: {
|
||||||
inbound: params[:inbound],
|
inbound: params[:inbound].to_h,
|
||||||
outbound: params[:outbound],
|
outbound: params[:outbound].to_h,
|
||||||
},
|
},
|
||||||
group_id: params[:group_id],
|
group_id: params[:group_id],
|
||||||
last_log_in: nil,
|
last_log_in: nil,
|
||||||
|
@ -210,6 +210,7 @@ class ChannelsEmailController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def notification
|
def notification
|
||||||
|
params.permit!
|
||||||
|
|
||||||
check_online_service
|
check_online_service
|
||||||
|
|
||||||
|
@ -230,7 +231,7 @@ class ChannelsEmailController < ApplicationController
|
||||||
channel.options = {
|
channel.options = {
|
||||||
outbound: {
|
outbound: {
|
||||||
adapter: adapter,
|
adapter: adapter,
|
||||||
options: params[:options],
|
options: params[:options].to_h,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
channel.status_out = 'ok'
|
channel.status_out = 'ok'
|
||||||
|
|
Loading…
Reference in a new issue