Replace attr_accessor with rails 4 equivalent