Skip to content

Commit

Permalink
Define permitted parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
jdudley1123 committed Dec 12, 2024
1 parent ced8837 commit 7cf95dd
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion app/controllers/subscriptions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,27 @@ def load_step
end

def subscription_params
params[:subscription_form].permit! # .permit(:email, :sms_number, :voice_number, :zone, :time)
params[:subscription_form].permit(
:current_step,
:receive_email,
:receive_sms,
:receive_voice,
:email,
:sms_number,
:voice_number,
:verification_code_email,
:verification_code_sms_number,
:verification_code_voice_number,
:zone_search,
:time,
:reason,
:source,
:research,
:terms,
:privacy,
zones: []
)
end

def redirect_to_finish_wizard(options = {}, params = {})
redirect_to forecast_path, notice: "You have successfully subscribed to air pollution alerts"
Expand Down

0 comments on commit 7cf95dd

Please sign in to comment.