Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create activity
Theme.all.order(id: :asc).each do |theme|
theme.create_activity(created_at: theme.created_at, updated_at: theme.updated_at, user: theme.user)
theme.entries.order(id: :asc).each do |entry|
entry.create_activity(created_at: entry.created_at, updated_at: entry.updated_at, user: entry.user)
entry.votes.order(id: :asc).each do |vote|
unless entry.user == vote.user
vote.create_activity(created_at: vote.created_at, updated_at: vote.updated_at, user: vote.user)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment