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

- old
+ new

@@ -33,18 +33,26 @@ # POST - Script Athors def create @script_listing = Script::Listing.find(params[:listing_id]) @script_url = @script_listing.urls.create(script_url_params) + @script_url.user_id = current_user.id + @script_url.user_name = current_user.username + @script_url.membership_id = membership_info.id + @script_url.oganization_id = membership_info.org_id if @script_url.save redirect_to script_listing_urls_path, notice: 'Author was successfully created.' else render :new end end # PATCH/PUT - Script Athors def update + @script_url.user_id = current_user.id + @script_url.user_name = current_user.username + @script_url.membership_id = membership_info.id + @script_url.oganization_id = membership_info.org_id if @script_url.update(script_url_params) redirect_to script_listing_urls_path, notice: 'Author was successfully updated.' else render :edit end