RubyFlow The Ruby and Rails community linklog

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).

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in