By looking at the implementation of class_inheritable_accessor by
ActiveSupport, looks like it is defining not only class methods as well
as instance methods. Whats the reason behind defining both class level
as well as instance level methods. Is there any alternative function
that defines just the class level methods.
Please see below for my requirement:
I have a model Page for which I would like to define class level
variable “title” that can be overridden in its subclasses. But I also
have a column in the pages table by the name “title”. But by using
class_inheritable_accessor, I am getting nil for @page.title.
Thanks in advance.