Skip to content

Instantly share code, notes, and snippets.

View zentetsukenz's full-sized avatar
📷

Wiwatta Mongkhonchit zentetsukenz

📷
  • Opn
  • Bangkok, Thailand
View GitHub Profile
ActiveRecord::Base.transaction do
100.times do |i|
Item.create({
name: "item #{i + 1}"
})
end
end
@zentetsukenz
zentetsukenz / javascript_array_pluck.js
Created October 3, 2015 11:25
Javascript simple array pluck
function pluck (arrayOfObject, property) {
return arrayOfObject.map(function (item) {
return item[property];
});
};