Dave Kruse

Joined

20 Experience
0 Lessons Completed
0 Questions Solved

Activity

Posted in How to use ActionText in Rails 6 Discussion

Digging in console (docs are a little bare at the moment) shows that you can reference the association like so:

my_model.rich_text_description

So, with pg_search, you can do this:

pg_search_scope :search_description,
  associated_against: {
    rich_text_description: :body
  }

But I'm still keen to know if there's a better way.

Posted in How to use ActionText in Rails 6 Discussion

Great video. With the abstration in ActionText, what's the best pattern for something like pg_search? Does ActionText provide clear cut way to access the association and search against the content from the model to which it belongs?