I get a syntax error but I’m not sure what would be the desirable alternative in Ruby to accomplish the same thing:
ruby-1.9.2-p290 :019 > Dvd.find_each { |x| x.save, puts x.length }
SyntaxError: (irb):19: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
Dvd.find_each { |x| x.save, puts x.length }
Any idea?
Dvd.find_each { |x| x.save; puts x.length }Try semicolon ; instead of ,