I’m really stuck here
I just don’t get it … what do I have to add to plugin.rb in order my plugin to have access to custom fields? As I understood, topics should already have custom field functionality by default.
As far as I know, TopicViewSerializer does not include a custom_fields field by default. With your call to add_to_serializer you could access directly to a field called bumped_at_with_button. However, If you want to access to that field through a custom_fields field, then I think you should change your code to something like:
Thanks. It worked. But still … the value in setter function is always null. Could you point me in a right direction with
Topic.update(topic, props);
How should custom_fields.bumped_at_with_button be passed to props in order to be saved?
I’ve tried something, but it doesn’t work In following code only bumped_at get’s saved to database… and sadly no new record in topic_custom_fields table.
Yep. But as it was a long time ago don’t remember exactly what I did. I managed to build two plugins eventually. Maybe you can find your answers there?
Second one isn’t here but you can find it on github.
Please note that sensitive info may be stored in topic custom fields - so don’t just dump them all out. Plugins should be selecting out just the fields they’re using.