Skip to content

Instantly share code, notes, and snippets.

@johnnaegle
Created March 15, 2014 03:32
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 johnnaegle/9561485 to your computer and use it in GitHub Desktop.
Save johnnaegle/9561485 to your computer and use it in GitHub Desktop.
post = Post.create!
post.attributes = {
:comments_attributes => {
"0" => {:body =>
Lorem::Base.new('words', 50).output.split(" ").shuffle.join(' ')
}
}
}
puts "Updated at: #{post.updated_at.to_f}"
sleep(5)
# post will not be touched
post.save!
puts "Updated at: #{post.updated_at.to_f}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment