Skip to content

Instantly share code, notes, and snippets.

@jarkko
Created January 9, 2014 10:23
Show Gist options
  • Save jarkko/8332155 to your computer and use it in GitHub Desktop.
Save jarkko/8332155 to your computer and use it in GitHub Desktop.
irb(main):004:0> a = Event.limit(5)
Event Load (0.4ms) SELECT `events`.* FROM `events` LIMIT 5
=> […]
irb(main):006:0> a.map(&:id)
=> [1, 2, 3, 4, 5]
irb(main):008:0> a.reject!{|i| i.id == 1}
=> […]
irb(main):010:0> a.map(&:id)
=> [2, 3, 4, 5]
irb(main):011:0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment