<?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: Craig Ford</title>
    <description>The latest articles on DEV Community by Craig Ford (@craigjford).</description>
    <link>https://dev.to/craigjford</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%2F1012445%2F615dd899-80ee-4c6d-ab34-cab9ed5bf255.jpeg</url>
      <title>DEV Community: Craig Ford</title>
      <link>https://dev.to/craigjford</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/craigjford"/>
    <language>en</language>
    <item>
      <title>Leveraging Ruby's Select in a ActiveRecord Serializer To Get Desired Nested Array</title>
      <dc:creator>Craig Ford</dc:creator>
      <pubDate>Wed, 05 Apr 2023 23:45:01 +0000</pubDate>
      <link>https://dev.to/craigjford/leveraging-rubys-select-in-a-activerecord-serializer-to-get-desired-nested-array-1ga2</link>
      <guid>https://dev.to/craigjford/leveraging-rubys-select-in-a-activerecord-serializer-to-get-desired-nested-array-1ga2</guid>
      <description>&lt;p&gt;Suppose that you want a nested array of data that fits a certain criteria rather than all the rows returned in a has_many and has_many through association.  How would one go about implementing a solution?  One way would be to use the Select method.&lt;/p&gt;

&lt;p&gt;As an example, suppose you have a car application that has a user, car and dealer association in the following diagram.  You would like to get a nested array of a user, its dealers and ONLY cars for the specific user associated with a dealer instead of every user that has an association with the dealer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;users -&amp;lt; cars &amp;gt;&lt;/span&gt;- dealers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Following are the user, car and dealer models to further clarify the associations.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;class User &amp;lt; ApplicationRecord

    has_many :cars
    has_many :dealers, through: :cars

end
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;class Car &amp;lt; ApplicationRecord

  belongs_to :user
  belongs_to :dealer

end
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;class Dealer &amp;lt; ApplicationRecord

    has_many :cars
    has_many :users, through: :cars

end
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If we make a show call to the User and a User Serializer with just User columns, you will simply get a User hash with User data.  But, we want a return nested array of a user, its dealers and ONLY the user's cars.&lt;/p&gt;

&lt;p&gt;Let's make the following change to our User serializer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;class UserSerializer &amp;lt; ActiveModel::Serializer
  attributes :id, :username, :first_name, :last_name, 
                         :dealers_with_cars 

  def dealers_with_cars
      byebug  
  end

end
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We will now add a method "dealers_with_cars" to our show serializer as shown above.  When we now run our show query, we will be stopped at the byebug.  At the byebug, query "self.object.dealers".  This query will retrieve all the dealers associated with the user.  &lt;/p&gt;

&lt;p&gt;We have found a way to get our first nested array of the User's dealers.  Now we want to get another nested array of cars that will hold only cars that belong to specified user rather that all of the dealer's cars. &lt;/p&gt;

&lt;p&gt;If we now map through our dealers (or "self.object.dealers"), we can now get access to each dealer's cars.  If we now change our User serializer to the following we get every user's cars associated with this dealer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;class UserSerializer &amp;lt; ActiveModel::Serializer
  attributes :id, :username, :first_name, :last_name, 
                     :dealers_with_cars 

  def dealers_with_cars
     self.object.dealers.map do |dealer|
        dlr = {}
        dlr[:id] = dealer.id
        dlr[:name] = dealer.name
        dlr[:contact] = dealer.contact
        dlr[:phone] = dealer.phone
        dlr[:email] = dealer.email
        dlr[:cars] = dealer.cars
        dlr
     end  
  end

end
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If we now run our User show query, we get the following results.  As you can see, it includes cars that do NOT belong to the specific user which is not what we want as you can see below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;{
"id": 5,
"username": "craig",
"first_name": "Craig",
"last_name": "Ford",
"dealers_with_cars": [
    {
       "id": 13,
       "name": "Baja Motors",
       "contact": "Bryan Knotts",
       "phone": "6095288443",
       "email": "b_knotts@baja.com",
       "cars": [
          {
                 "user_id": 5,
                 "dealer_id": 13,
                 "year": 1989,
                 "make": "Datsun",
                 "model": "210",
          },
          {
                 "user_id": 6,
                 "dealer_id": 13,
                 "year": 2006,
                 "make": "Ford",
                 "model": "Escort",
          },
          {
                 "user_id": 21,
                 "dealer_id": 13,
                 "year": 2020,
                 "make": "Nissan",
                 "model": "Spirit",
          }
       ]
    },
    {
       "id": 19,
       "name": "Stagger Inn",
       "contact": "John Moos",
       "phone": "8127864433",
       "email": "jmoos@stagger.com",
       "cars": [
          {
                 "user_id": 5,
                 "dealer_id": 19,
                 "year": 2010,
                 "make": "Mercedes",
                 "model": "GL 450",
          },
          {
                 "user_id": 11,
                 "dealer_id": 19,
                 "year": 2016,
                 "make": "Ford",
                 "model": "Escort",
          }
       ]
    }
  ]
}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fortunately, we only need to add the Array Select method to our Cars array to get our desired result.  If we change the User to the following, we will get the desired results.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;class UserSerializer &amp;lt; ActiveModel::Serializer
  attributes :id, :username, :first_name, :last_name, :dealers_with_cars 

  def dealers_with_cars
     self.object.dealers.map do |dealer|
        dlr = {}
        dlr[:id] = dealer.id
        dlr[:name] = dealer.name
        dlr[:contact] = dealer.contact
        dlr[:phone] = dealer.phone
        dlr[:email] = dealer.email
        dlr[:cars] = dealer.cars.select {|car| car.user_id == 
                                               self.object.id}
        dlr
     end  
  end

end
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We now get our desired results.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;{
"id": 5,
"username": "craig",
"first_name": "Craig",
"last_name": "Ford",
"dealers_with_cars": [
    {
       "id": 13,
       "name": "Baja Motors",
       "contact": "Bryan Knotts",
       "phone": "6095288443",
       "email": "b_knotts@baja.com",
       "cars": [
          {
                 "user_id": 5,
                 "dealer_id": 13,
                 "year": 1989,
                 "make": "Datsun",
                 "model": "210",
          },
          {
                 "user_id": 6,
                 "dealer_id": 13,
                 "year": 2006,
                 "make": "Ford",
                 "model": "Escort",
          }
       ]
    },
    {
       "id": 19,
       "name": "Stagger Inn",
       "contact": "John Moos",
       "phone": "8127864433",
       "email": "jmoos@stagger.com",
       "cars": [
          {
                 "user_id": 5,
                 "dealer_id": 19,
                 "year": 2010,
                 "make": "Mercedes",
                 "model": "GL 450",
          }
       ]
    }
  ]
}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The Power of Rails Migration Generator</title>
      <dc:creator>Craig Ford</dc:creator>
      <pubDate>Sat, 21 Jan 2023 21:22:10 +0000</pubDate>
      <link>https://dev.to/craigjford/the-power-of-rails-migration-generator-18ol</link>
      <guid>https://dev.to/craigjford/the-power-of-rails-migration-generator-18ol</guid>
      <description>&lt;p&gt;As a beginner to Rails, I was impressed by the power of Rails migration generator.  Rails generators enable developers to utilize the Command Line Use interface to create an enormous amount of code in a streamlined manner.  &lt;/p&gt;

&lt;p&gt;If you run "rails g" at the command prompt, you get the following output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;
General options:
&lt;/span&gt;&lt;span class="gp"&gt;  -h, [--help]     #&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Print generator&lt;span class="s1"&gt;'s options and usage
&lt;/span&gt;&lt;span class="gp"&gt;  -p, [--pretend]  #&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;Run but do not make any changes
&lt;/span&gt;&lt;span class="gp"&gt;  -f, [--force]    #&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;Overwrite files that already exist
&lt;/span&gt;&lt;span class="gp"&gt;  -s, [--skip]     #&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;Skip files that already exist
&lt;/span&gt;&lt;span class="gp"&gt;  -q, [--quiet]    #&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;Suppress status output
&lt;/span&gt;&lt;span class="go"&gt;
Please choose a generator below.

Rails:
  application_record
  benchmark
  channel
  controller
  generator
  integration_test
  job
  mailbox
  mailer
  migration
  model
  resource
  scaffold
  scaffold_controller
  serializer
  system_test
  task

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We will be discussing the migration generator.  The migration generator allows the developer to define a new table or make a change to an existing table.  For example, let's create a teams table with columns name and city.  We can run the following generator at the CLI prompt.&lt;/p&gt;

&lt;p&gt;rails g migration CreateTeams name:string city:string&lt;/p&gt;

&lt;p&gt;The output from running this generator is the following.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;(base) craigjford@Craigs-iMac test-app % rails g migration CreateTeams name:string city:string
      invoke  active_record
      create    db/migrate/20230121200306_create_teams.rb
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Rails will generate the following migration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;class CreateTeams &amp;lt; ActiveRecord::Migration[7.0]
  def change
    create_table :teams do |t|
      t.string :name
      t.string :city

      t.timestamps
    end
  end
end
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We will now run "Rails db:migrate" from the CLI and recive the following input.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;== 20230121200306 CreateTeams: migrating ======================================
-- create_table(:teams)
&lt;/span&gt;&lt;span class="gp"&gt;   -&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;0.0014s
&lt;span class="go"&gt;== 20230121200306 CreateTeams: migrated (0.0014s) =============================

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since this is our first table, a new schema file will be created after we run the "Rails db:migrate" command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;ActiveRecord::Schema[7.0].define(version: 2023_01_21_200306) do
  create_table "teams", force: :cascade do |t|
    t.string "name"
    t.string "city"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

end
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Suppose we forgot to include a type field to the table.  We&lt;br&gt;
can simply create an additional migration as follows.&lt;/p&gt;

&lt;p&gt;rails g migration AddTypeToTeams&lt;/p&gt;

&lt;p&gt;This will create another migration file as seen below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;class AddTypeToTeams &amp;lt; ActiveRecord::Migration[7.0]
  def change
&lt;/span&gt;&lt;span class="gp"&gt;    add_column :teams, :type, :string  #&lt;/span&gt;we need to add this
&lt;span class="go"&gt;  end
end
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If we run db:migrate once more, the schema will look as follows.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;ActiveRecord::Schema[7.0].define(version: 2023_01_21_203133) do
  create_table "teams", force: :cascade do |t|
    t.string "name"
    t.string "city"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.string "type"
  end

end
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Suppose we now want to add a Players table and that we want the relationships that a teams has many players and a players belongs to a team.  We can utilize the migration generator in the following way.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;rails g migration CreatePlayers team:belongs_to player_team:string
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Rails will provide the following output.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;(base) craigjford@Craigs-iMac test-app % rails g migration CreatePlayers team:belongs_to player_team:string
      invoke  active_record
      create    db/migrate/20230121205723_create_players.rb
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Rails migration generator creates the following output.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;(base) craigjford@Craigs-iMac test-app % rails g migration CreatePlayers team:belongs_to player_team:string
      invoke  active_record
      create    db/migrate/20230121205723_create_players.rb

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The migration generator creates the following migration file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;class CreatePlayers &amp;lt; ActiveRecord::Migration[7.0]
  def change
    create_table :players do |t|
      t.belongs_to :team, null: false, foreign_key: true
      t.string :player_team

      t.timestamps
    end
  end
end
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Running "rails db:migrate" now updates the schema to look like the following.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;ActiveRecord::Schema[7.0].define(version: 2023_01_21_205723) do
  create_table "players", force: :cascade do |t|
    t.integer "team_id", null: false
    t.string "player_team"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.index ["team_id"], name: "index_players_on_team_id"
  end

  create_table "teams", force: :cascade do |t|
    t.string "name"
    t.string "city"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.string "type"
  end

  add_foreign_key "players", "teams"
end

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, in a short period of time we have created three migration files.  We have run the db:migrates and have created a working schema file that has a one-to-many relationship.&lt;/p&gt;

&lt;p&gt;This post really just skims the surface of what you can do with the rails migration generator.  If we run the following command "rails g migration --help", we can see all the other options available with rails g migration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;Usage:
  rails generate migration NAME [field[:type][:index] field[:type][:index]] [options]

Options:
&lt;/span&gt;&lt;span class="gp"&gt;      [--skip-namespace], [--no-skip-namespace]              #&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Skip namespace &lt;span class="o"&gt;(&lt;/span&gt;affects only isolated engines&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="gp"&gt;      [--skip-collision-check], [--no-skip-collision-check]  #&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Skip collision check
&lt;span class="gp"&gt;  -o, --orm=NAME                                             #&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;ORM to be invoked
&lt;span class="gp"&gt;                                                             #&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Default: active_record
&lt;span class="go"&gt;
ActiveRecord options:
&lt;/span&gt;&lt;span class="gp"&gt;      [--timestamps], [--no-timestamps]      #&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Indicates when to generate timestamps
&lt;span class="gp"&gt;                                             #&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Default: &lt;span class="nb"&gt;true&lt;/span&gt;
&lt;span class="gp"&gt;      [--primary-key-type=PRIMARY_KEY_TYPE]  #&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;The &lt;span class="nb"&gt;type &lt;/span&gt;&lt;span class="k"&gt;for &lt;/span&gt;primary key
&lt;span class="gp"&gt;  --db, [--database=DATABASE]                #&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;The database &lt;span class="k"&gt;for &lt;/span&gt;your migration. By default, the current environment&lt;span class="s1"&gt;'s primary database is used.
&lt;/span&gt;&lt;span class="go"&gt;
Runtime options:
&lt;/span&gt;&lt;span class="gp"&gt;  -f, [--force]                    #&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Overwrite files that already exist
&lt;span class="gp"&gt;  -p, [--pretend], [--no-pretend]  #&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Run but &lt;span class="k"&gt;do &lt;/span&gt;not make any changes
&lt;span class="gp"&gt;  -q, [--quiet], [--no-quiet]      #&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Suppress status output
&lt;span class="gp"&gt;  -s, [--skip], [--no-skip]        #&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Skip files that already exist
&lt;span class="go"&gt;
Description:
    Generates a new database migration. Pass the migration name, either
    CamelCased or under_scored, and an optional list of attribute pairs as arguments.

    A migration class is generated in db/migrate prefixed by a timestamp of the current date and time.

    You can name your migration in either of these formats to generate add/remove
    column lines from supplied attributes: AddColumnsToTable or RemoveColumnsFromTable

Example:
    `bin/rails generate migration AddSslFlag`

    If the current date is May 14, 2008 and the current time 09:09:12, this creates the AddSslFlag migration
    db/migrate/20080514090912_add_ssl_flag.rb

    `bin/rails generate migration AddTitleBodyToPost title:string body:text published:boolean`

    This will create the AddTitleBodyToPost in db/migrate/20080514090912_add_title_body_to_post.rb with this in the Change migration:

      add_column :posts, :title, :string
      add_column :posts, :body, :text
      add_column :posts, :published, :boolean

Migration names containing JoinTable will generate join tables for use with
has_and_belongs_to_many associations.

Example:
    `bin/rails g migration CreateMediaJoinTable artists musics:uniq`

    will create the migration

    create_join_table :artists, :musics do |t|
&lt;/span&gt;&lt;span class="gp"&gt;      #&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;t.index &lt;span class="o"&gt;[&lt;/span&gt;:artist_id, :music_id]
&lt;span class="go"&gt;      t.index [:music_id, :artist_id], unique: true
    end

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Happy hacking!&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
  </channel>
</rss>
