RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: upandnet
Site: http://www.upandnet.com
Regarding the difference between
class Mine @Mine = Mine
and
class @Mine
seems to be local only, that is, that the implicit declaration will not expose Mine in the local scope, which might be a pitfall at first.
Great value as usual, just one question Ryan.
Do you dislike find_or_create (which I could understand BTW) or maybe think that exists? ... || create! has other merits (like the bangs exception raising behavior).
find_or_create
exists? ... || create!
Cheers Robert
Regarding the difference between
and
seems to be local only, that is, that the implicit declaration will not expose Mine in the local scope, which might be a pitfall
at first.
Great value as usual, just one question Ryan.
Do you dislike
find_or_create
(which I could understand BTW) ormaybe think that
exists? ... || create!
has other merits (like the bangs exception raising behavior).Cheers
Robert