Using new ransack version with acts_as_taggable_on for tag search #1416
Replies: 2 comments 1 reply
-
@Dragonicity did you ever resolve this? If so, what did you do? I've run into exactly the same problem. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Thanks very much, I got it worked out, and delayed_job at the same time. I put mine in the initialiser, see manyfold3d/manyfold#1432. For anyone looking at this in future, the main gotcha is that you need to leave out the inheritance from the example code that ransack suggests in the error message, it just confuses things (or maybe it just confused me). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Previously this sort of form selection worked:
This now gives you the error and suggested resolution:
Ransack needs ActsAsTaggableOn::Tag attributes explicitly allowlisted as
searchable. Define a
ransackable_attributes
class method in yourActsAsTaggableOn::Tag
model, watching out for items you DON'T want searchable (for
example,
encrypted_password
,password_reset_token
,owner
orother sensitive information). You can use the following as a base:
However, including the above in a Tag model to monkey-patch the Tag class does not work. Neither does the following:
Any idea how to proceed to resolve this?
Beta Was this translation helpful? Give feedback.
All reactions