loosen activerecord version, use attr_name instead access_code