@Morgane Hum, You might like to use rubocop gem which analyzes your code and provide advices about coding guidelines.
And unless is pretty handy on that form:
do_something unless @that.valid?
rather than:
do_something if !@that.valid?
about the loops i also think loop … end, with a break inside it is crap. Better using while … end.
(BTW, where do you learn ruby?)