在rails console 中執行
User.all do|user|
puts user
end
最后會將User.all結果集顯示出來,如果結果集太大則影響閱讀,此時可以如此解決
User.all do|user|
puts user
end ; nil
nil 將取代User.all結果集顯示
在rails console 中執行
User.all do|user|
puts user
end
最后會將User.all結果集顯示出來,如果結果集太大則影響閱讀,此時可以如此解決
User.all do|user|
puts user
end ; nil
nil 將取代User.all結果集顯示