Resurrecting a plugin

With the intention of having a plugin that allows users to rate each other, I am trying to resurrect this plugin that hasn’t been maintained for over a year. It seems like there are some parts of the code that were designed for an older version of ruby and, of course, discourse.

I am getting this error:

uninitialized constant UserAction::UserActionRow
plugins/discourse-user-feedback/app/models/user_action.rb, line 59

https://github.com/JafethDC/discourse-user-feedback/blob/master/app/models/user_action.rb

Line 59 is

builder.map_exec(UserAction::UserActionRow)

It seems to me that User Action Row is a deprecated class used with an older version of ruby.

I have tried removing the UserActionRow piece, like so :arrow_double_down:

builder.map_exec(UserAction)

This results in another error

undefined method `title=’ for #UserAction:0x000055deae7bde68

Can you help me by shedding light on how I might resolve this error?

As per this commit you should use .query instead of .map_exec(UserActionRow).

8 Likes

@vinothkannans – Thanks for the prompt and insightful reply! Its just what I needed.

2 Likes