Skip to content

Instantly share code, notes, and snippets.

@rojotek
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rojotek/9802738 to your computer and use it in GitHub Desktop.
Save rojotek/9802738 to your computer and use it in GitHub Desktop.
seed data
seed_data = [
{model_name: "somename", image:"my_image.jpg"},
...
]
seed_data.each do |seed|
model = Model.find_by_name(seed[:model_name])
model.remote_image_url="http://localhost:4567/#{model[:image]}"
model.save
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment