i wonder if we can replace these two methods, i was thinking something in the lines of 

inside lib/foreman/sti.rb

```ruby

alias_method_chain :save, :type

def save_with_type
   self.class.instance_variable_set("@finder_needs_type_condition", :false)  if self.type_changed?
  value = super
  self.class.instance_variable_set("@finder_needs_type_condition", :true)
  return value
end