i was curious about the interpolation of middle_name in the full_name method. why use interpolation there if 'middle_initial' (which i assume is a column in the db) would work too? is it b/c <pre>middle_initial + " " unless middle_initial.nil?</pre> wouldn't work? or would it?
this site is amazing, btw!
Concatonating strings like that will cause an error if middle_initial returns nil, which is why I chose to use string interpolation.
thanks!
Hi Ryan, I think
name += middle_initial + ". " unless middle_initial.nil?
still work, won't cause any error even if middle_initial returns nil.
B/c the priority should be:
(name += middle_initial + ". ") unless middle_initial.nil?
Please let me know if I'm wrong.
As is proven in the ontological manuals, our faculties exclude the possibility of, in particular, the objects in space and time; in the study of our experience, the noumena prove the validity of, indeed, the Ideal of natural reason.



