Writing a simple conditional statement in IRB
- by Trip
I am looking up all Organizations with the url "http://", and updating their attributes to "".
My attempt:
Organization(:all).select { |o| o.url = "http://" ? o.update_attribute("url","")}
Which returns a compile error:
SyntaxError: compile error
(irb):2: syntax error, unexpected '}'
from (irb):2
Any ideas?