title: How to random generated data into my table - Ruby on Rails
body: <p>Say I have table with the following columns:</p>
  
  <pre><code>class CreatePosts &lt; ActiveRecord::Migration
    def change
      drop_table :posts
  
      create_table :posts do |t|
        t.string :First_Name
        t.string :Last_Name
        t.string :Company
  
        t.timestamps
      end
    end
  end
  </code></pre>
  
  <p>I've been lookin up gems such as faker, Randexp, foregery. But how exactly will the data be imported into the database, So far I've only played around things that go into the database via a form.</p>
  
  <p>I'm assuming it is done through the controller:</p>
  
  <pre><code>def create
    @post = Post.new(post_params)
  
    @post.save
    redirect_to @post
    end
  </code></pre>
  
  <p>But not sure how exactly, any examples or hints to guide me through this?
    Thanks</p>