From 6bf7aee948278e1186a06f46b16604c1c92ac631 Mon Sep 17 00:00:00 2001 From: Maximilian Grundke Date: Wed, 13 Sep 2017 08:22:37 +0200 Subject: [PATCH] Fix create parameter naming --- app/controllers/subscriptions_controller.rb | 2 +- app/views/request_for_comments/show.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/subscriptions_controller.rb b/app/controllers/subscriptions_controller.rb index 6bfdb1b1..63630fd1 100644 --- a/app/controllers/subscriptions_controller.rb +++ b/app/controllers/subscriptions_controller.rb @@ -27,7 +27,7 @@ class SubscriptionsController < ApplicationController def subscription_params current_user_id = current_user.try(:id) current_user_class_name = current_user.try(:class).try(:name) - params[:subscription].permit(:request_for_comments, :subscription_type).merge(user_id: current_user_id, user_type: current_user_class_name) + params[:subscription].permit(:request_for_comment_id, :subscription_type).merge(user_id: current_user_id, user_type: current_user_class_name) end private :subscription_params end diff --git a/app/views/request_for_comments/show.html.erb b/app/views/request_for_comments/show.html.erb index 17b27f07..8f80e2d5 100644 --- a/app/views/request_for_comments/show.html.erb +++ b/app/views/request_for_comments/show.html.erb @@ -316,7 +316,7 @@ also, all settings from the rails model needed for the editor configuration in t var jqxhr = $.ajax({ data: { subscription: { - request_for_comments_id: $('h4#exercise_caption').data('rfc-id'), + request_for_comment_id: $('h4#exercise_caption').data('rfc-id'), subscription_type: subscriptionType } },