Rails Fundamentals: Models and the to_s Method
This short post demonstrates the utility of overriding your Rails models’ to_s
method if you find yourself repeatedly outputting a specific model attribute (or outputting a compound attribute).
This short post demonstrates the utility of overriding your Rails models’ to_s
method if you find yourself repeatedly outputting a specific model attribute (or outputting a compound attribute).
Post a comment