app/controllers/phcscriptcdnpro/script/licences_controller.rb in phcscriptcdnpro-5.3.5 vs app/controllers/phcscriptcdnpro/script/licences_controller.rb in phcscriptcdnpro-5.3.6

- old
+ new

@@ -26,18 +26,26 @@ end # POST - Script Licences def create @script_licence = Script::Licence.new(script_licence_params) + @script_licence.user_id = current_user.id + @script_licence.user_name = current_user.username + @script_licence.membership_id = membership_info.id + @script_licence.oganization_id = membership_info.org_id if @script_licence.save redirect_to script_licences_url, notice: 'Licence was successfully created.' else render :new end end # PATCH/PUT - Script Licences def update + @script_licence.user_id = current_user.id + @script_licence.user_name = current_user.username + @script_licence.membership_id = membership_info.id + @script_licence.oganization_id = membership_info.org_id if @script_licence.update(script_licence_params) redirect_to script_licences_url, notice: 'Licence was successfully updated.' else render :edit end