Using HasCustomFields in a plugin

Ha! You did it! Thanks so much. I switched it to server_id and then did this in my server.rb model:

    def custom_fields_fk
      @custom_fields_fk ||= "server_id"
    end

As long as that’s going to override that only for this model and not break user_custom_field and friends I think I should be ready to start beating myself over the head again on Best way to enforce permissions--controller or constraint?. And then I can add routes to do stuff like fill my new custom fields with . . . something.

I can’t thank you enough. You likely saved me a whole day. I owe you a :beer:!

1 Like