Skip to content

Instantly share code, notes, and snippets.

View webkhung's full-sized avatar

Kelvin Hung webkhung

View GitHub Profile
ids = ['807756','807931','807938','807960','807961','807973','807988','807998','808009','808021','808028','809035','809037','809062','809079','809087','809094','809102','809103','809113','809117','809126','809130','809132','809138','809145','809149','809152','809156','809164','809241','809245','809249','809251','809263','809269','809273','809305','809361','809365','809376','810132']
ApplicationController.current_community = Community.find(18)
date = Date.strptime('01/01/2015', '%m/%d/%Y')
Question.current_community.where(id: ids).each do |q|
q.update_column(:created_at, date)
q.update_column(:updated_at, date)
end