You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and a ContentSkill belongs_to :skill and belongs_to :course
Then Course.ransack({user_assigned_content_skills_skill_name_not_eq: 'ruby'}).result.to_sql returns the following (i.e. false positives again if a course has multiple content_skills):
SELECT courses.*
FROM courses
LEFT OUTER JOIN content_skills ON content_skills.course_id = courses.id AND content_skills.source = 'user'
LEFT OUTER JOIN skills ON skills.id = content_skills.skill_id
WHERE (skills.name != 'ruby')
Any ideas how to achieve this? Is there a plan to have it implemented in Ransack?
Many thanks for any insights!
The text was updated successfully, but these errors were encountered:
This issue appears more to be a HOW-TO issue rather than a bug in Ransack. We are in the process of cleaning up the Ransack gem and repo. If this issue is still relevant could you please ask it on StackOverflow?
If you think it is an issue with Ransack, please provide a repo with the issue and / or a pull request with failing tests. If you don't know how to do this, indicate it in the issue and we will look into it eventually.
I was trying to use this functionality introduced in #645 with conditional 2nd degree
has_many ... through
relationships with little success.In my case:
has_many :user_assigned_content_skills, -> { where(source: 'user') }, class_name: "ContentSkill"
belongs_to :skill
andbelongs_to :course
Then
Course.ransack({user_assigned_content_skills_skill_name_not_eq: 'ruby'}).result.to_sql
returns the following (i.e. false positives again if a course has multiple content_skills):Any ideas how to achieve this? Is there a plan to have it implemented in Ransack?
Many thanks for any insights!
The text was updated successfully, but these errors were encountered: