I understand how to run a simple piece of code in the rails console. they say
Swimming::Student.create(:name="Jerry")
How to run most of the code (many lines)
Swimming::Student.all.each{ |student| student.attended = flase student.save }
Just hit enter, as you would expect:
$rails c Loading development environment (Rails 3.2.13) 2.0.0p0 :001 > Student.all.each do |student| #enter 2.0.0p0 :002 > puts student #enter 2.0.0p0 :003?> end #enter # here comes the output
just enter it like this. The entire block is executed after completion.