For some reason I’m using MySQL locally, and have Postgres on my heroku app.
Locally I can do something like:
<%= @mybook.type %>
to produce “Book” (assuming @mybook is a record from the Book model).
In my heroku app, it seems as though .type isn’t recognized though.. Any ideas for a substitution?
You can use
@mybook.classto get the class,typeis the deprecated way of getting it.