ruby - Rails 4 multi-part identifier could not be bound -
the next activerecord query results in error "the multi-part identifer question_answer_response.response_group not bound."
this started happening after upgrading rails 3.2.x rails 4.0.x
class question < activerecord::base def self.fetch_dependencies(section_id) self.select('questions.*,question_answer_response.response response,question_answer_response.response_group response_group'). includes({:dependency_conditions => :dependency}). where("dependencies.survey_section_id = #{section_id} , questions.survey_section_id != dependencies.survey_section_id") end end
ruby-on-rails ruby ruby-on-rails-3 ruby-on-rails-4
No comments:
Post a Comment