Ruby on Rails Saturday, February 1, 2014



Consider, though, that if for whatever reason an invalid id is passed
in, @account will be nil and so @account.transactions will give you
a NoMethod error.

What do you want to happen at that point?


Good point. Thanks, I'll put some checking to see if account is valid or not and handle it accordingly.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/56eaa7d1-f542-4f7e-9521-228ed40f6652%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment