Inner join in rails with multiple condition

Inner join in rails with multiple condition



How to do inner join with multiple condition in rails?


Plan.joins <<-SQL
inner join config_plans on config_plans.plan_id = #table_name.id
and config_plans.plan_type = #plan_type"
SQL



plan_type = "VisionPlan"
table_name = "vision_plans"



Error i am getting => column "visionplan" does not exist





What is the issue you got in this current one?
– Arup Rakshit
Aug 26 at 9:43






please add the whole error message/
– Arup Rakshit
Aug 26 at 9:56









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

PHP code is not being executed, instead code shows on the page

Administrative divisions of China

Cardinality of the set of algorithms