title: How to use seed.rb to selectively populate development and/or production databases?
body: <p>I am using seed.rb to populate both my development and production database. I usually populate the first with dummy data and the latter with the real minimal data that my app needs to run (e.g. the first user and so on).</p>
  
  <p>How can I specify in seed.rb for what environment each data is?</p>
  
  <p>Given that I know "group" to be a Gemfile method, I'd like to achieve the same behavior for seed.rb.</p>
  
  <p>E.g. I'd like to write something like this in my seed.rb:</p>
  
  <pre><code>group :development do 
    # development specific seeding code
  end
  
  group :production do 
    # production specific seeding code
  end
  
  # non-specific seeding code (it always runs) 
  </code></pre>
  
  <p>This to be able to call both the development-specific and the non-specific code with</p>
  
  <pre><code>$ rake db:seed
  </code></pre>
  
  <p>And to call both the production-specific and the non-specific code with:</p>
  
  <pre><code>$ rake db:seed RAILS_ENV=production 
  </code></pre>
  
  <p>Thank you</p>