Is it possible to save all documents once again?
I am wondering, is there any o开发者_JS百科peration in rails console that does something like below ??
a = Article.all
foreach a as article
article.save
end
Sure, I've got an Article model too and just tried it in rails console:
ruby-1.9.2-p180 :002 > Article.all.each(&:save)
=> [#<Article id: ...
So what did that accomplish?
精彩评论