8000 Can't get list of tags for a given class · Issue #85 · pat/gutentag · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Can't get list of tags for a given class #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
activestylus opened this issue Oct 22, 2022 · 1 comment
Open

Can't get list of tags for a given class #85

activestylus opened this issue Oct 22, 2022 · 1 comment

Comments

@activestylus
Copy link

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`

@pat
Copy link
Owner
pat commented Oct 30, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0