gutentag
gutentag copied to clipboard
Can't get list of tags for a given class
I'm unable to get an array of tags scoped by model as specified by the README:
In my model:
Gutentag::ActiveRecord.call self
def tags_as_string
tag_names.join(", ")
end
def tags_as_string=(string)
self.tag_names = string.split(/,\s*/)
end
In my view:
Gutentag::Tag.names_for_scope(MyClassName)
Resulting Error:
undefined method names_for_scope' for #Class:0x00007fbf91d1df28`
I'm at a bit of a loss as to why this isn't working - but, I guess a starting point: are you using v2.5.0 or newer? As that's when the names_for_scope method was added.