title: Rails Relationship Between Two Models
body: <p>Is there a way to determine the relationship method Rails creates between two models dynamically?</p>
  
  <p>For example:</p>
  
  <pre><code>unknown_method_i_wish_existed(class_name_1, class_name_2)
    # awesome logic
    # returns the relationship method name going from class_name_1 to class_name_2
  end
  </code></pre>
  
  <p>Looked over Rails API but nothing screamed at me that it could do this.</p>
  
  <p>Essentially the inverse of these methods: <a href="http://api.rubyonrails.org/classes/ActiveRecord/Reflection/ClassMethods.html#method-i-reflect_on_association" rel="nofollow">http://api.rubyonrails.org/classes/ActiveRecord/Reflection/ClassMethods.html#method-i-reflect_on_association</a></p>