<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: MD: HAFIZUL ISLAM</title>
    <description>The latest articles on DEV Community by MD: HAFIZUL ISLAM (@hafizpustice).</description>
    <link>https://dev.to/hafizpustice</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F901493%2F1fdcadbb-b83c-4ac0-af2a-8f139c7aa826.jpeg</url>
      <title>DEV Community: MD: HAFIZUL ISLAM</title>
      <link>https://dev.to/hafizpustice</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hafizpustice"/>
    <language>en</language>
    <item>
      <title>Has-One Relation in Rails with Example</title>
      <dc:creator>MD: HAFIZUL ISLAM</dc:creator>
      <pubDate>Wed, 03 Aug 2022 06:57:09 +0000</pubDate>
      <link>https://dev.to/hafizpustice/has-one-relation-in-rails-with-example-19p5</link>
      <guid>https://dev.to/hafizpustice/has-one-relation-in-rails-with-example-19p5</guid>
      <description>&lt;p&gt;In Rails, Two Active Record models are connected by an association. Why do we need associations between models? Because associations make joint operations easier in our code. For example, we consider two models for Employe and a model for Account. Each Employe can have only one Account. so we discuss has-one-relations or has-one-associations in rails by Employe and Book model.&lt;/p&gt;

&lt;p&gt;A has-one-association indicates that one row has one instance of another model called one-to-one or has-one relation or association. That model can be fetched through this association.&lt;/p&gt;

&lt;p&gt;For example, if each employee in your application has only one account, First we create two models Employe and Account to describe a has-one-association or has-one-relation or one-to-one relations in Rails.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.cstutorial.org/ruby-on-rails/has-one-relation-in-rails-with-example"&gt;https://www.cstutorial.org/ruby-on-rails/has-one-relation-in-rails-with-example&lt;/a&gt;&lt;/p&gt;

</description>
      <category>rails</category>
      <category>ruby</category>
      <category>relation</category>
    </item>
    <item>
      <title>Has Many Relations with Eager Load in Rails and also where conditions</title>
      <dc:creator>MD: HAFIZUL ISLAM</dc:creator>
      <pubDate>Mon, 01 Aug 2022 13:35:50 +0000</pubDate>
      <link>https://dev.to/hafizpustice/has-many-relations-with-eager-load-in-railsand-also-where-conditions-2ogp</link>
      <guid>https://dev.to/hafizpustice/has-many-relations-with-eager-load-in-railsand-also-where-conditions-2ogp</guid>
      <description>&lt;p&gt;We discuss has many relations in rails, so consider two tables one is authors and the other books table. Firstly, we create two tables with model and with migrations. One writer has many books but we consider that one book written by one writer. &lt;/p&gt;

&lt;p&gt;where condition with relations table&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.cstutorial.org/ruby-on-rails/has-many-relations-with-eager-load-in-rails"&gt;https://www.cstutorial.org/ruby-on-rails/has-many-relations-with-eager-load-in-rails&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
    </item>
  </channel>
</rss>
