Closed otheus closed 8 years ago
It's created by https://github.com/theforeman/foreman_default_hostgroup/blob/develop/lib/default_hostgroup_managed_host_patch.rb#L6.
It's a Rails way of extending a method - the "without" version is the original, defined in Foreman at https://github.com/theforeman/foreman/blob/c7d9169d12e16bcd5f4e3466e5cf99ca963eeea7/app/models/host/managed.rb#L467.
On Thu, Mar 24, 2016 at 10:56 AM, Dominic Cleal notifications@github.com wrote:
It's created by https://github.com/theforeman/foreman_default_hostgroup/blob/develop/lib/default_hostgroup_managed_host_patch.rb#L6. It's a Rails way of extending a method - the "without" version is the original, defined in Foreman at https://github.com/theforeman/foreman/blob/c7d9169d12e16bcd5f4e3466e5cf99ca963eeea7/app/models/host/managed.rb#L467 .
Thanks for the quick and helpful reply. I know and work with Ruby, but not at all with Rails. The similarities can be deceptive.
No problem, feel free to call into #theforeman-dev on Freenode too if you've got questions.
This is a question not an issue. I'm attempting to modify the code for my own purposes, but I cannot get very far. This method
import_host_and_facts_without_match_hostgroup
had no definition anywhere inside the plugin, nor inside theforeman app nor the API. Is there a hidden dependency here?