Fixed Postgresql Notes search issue (integer vs string)
Created by: jozefvaclavik
Hi,
I override notes methods for classes that use has_many :notes, as: :noteable Method is manually converting id to string to avoid type crash for postgresql database. I also had to update mr_and_commit_notes method. I tested issues and snippets it in production. I somehow cant find where to write wiki note, but it should work as well. And because I don't have any merge requests, i couldn't test changed method either. If anything, let me know. Fixes #1957 (closed)
Jozef
Merge request reports
Activity
21 21 belongs_to :project 22 22 belongs_to :author, class_name: "User" 23 23 has_many :notes, as: :noteable, dependent: :destroy 24 Created by: riyad
- Please rebase your changes onto master to get rid of all the merges.
- Please squash your second commit.
- I think copy&pasting the same code 3 times is to much. I think moving the method to a newly created
Noteable
module inapp/roles
and including it into the right Models makes more sense.
By Administrator on 2012-12-09T23:08:32 (imported from GitLab project)
By Administrator on 2012-12-09T23:08:32 (imported from GitLab)
Created by: jozefvaclavik
@Riyad I'm closing this pull request. I was working on it from my production server where i had gitlabhq/gitlabhq repository and I added jozefvaclavik/gitlabhq as remote repo. My bad. I'm submitting new one.
By Administrator on 2012-12-10T00:46:26 (imported from GitLab project)
By Administrator on 2012-12-10T00:46:26 (imported from GitLab)