RoR nested attributes produces duplicates when edit

I had to add :id to the permitted params in the survey_params method. It now looks like this: # Never trust parameters from the scary internet, only allow the white list through. def survey_params params.require(:survey).permit(:name, questions_attributes: [:id, :content]) end which works perfectly. I guess new id’s were generated instead of being passed to the update … Read more

Removing duplicate rows in Notepad++

Notepad++ with the TextFX plugin can do this, provided you wanted to sort by line, and remove the duplicate lines at the same time. To install the TextFX in the latest release of Notepad++ you need to download it from here: https://sourceforge.net/projects/npp-plugins/files/TextFX The TextFX plugin used to be included in older versions of Notepad++, or … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)