title: ActiveRecord Associations(has_one) - Access parent object
body: <pre><code>class Parent &lt; ApplicationRecord
    has_one: child
  end
  
  
  class Child &lt; ApplicationRecord
    belongs_to :parent
  end
  
  
  childrens = Child.includes(:parent)
  
  puts childrens.to_json
  [{"id":1,"parent_id":1,"name":"Jack"},{"id":2,"parent_id":2,"name":"Oleg"}]
  </code></pre>
  
  <p>In this case, we can access parent object like this: child.parent</p>
  
  <p>But it is not possible to access parent object in view.
  Is there any way to include parent objects in each child?</p>
  
  <p>Thank you!</p>