Project

General

Profile

« Previous | Next » 

Revision 91b4e718

Added by Shimon Shtein about 8 years ago

Fixes #13849 - Now the facets will not require id attribute for update

(cherry picked from commit ec76b0092f9af5b8f7e2e02777f376b6b6e0d711)

View differences:

app/models/concerns/facets/managed_host_extensions.rb
def register_facet_relation(klass, facet_config)
klass.class_eval do
has_one facet_config.name, :class_name => facet_config.model.name, :foreign_key => :host_id, :inverse_of => :host
accepts_nested_attributes_for facet_config.name
accepts_nested_attributes_for facet_config.name, :update_only => true
alias_method "#{facet_config.name}_attributes", facet_config.name
attr_accessible "#{facet_config.name}_attributes"
include facet_config.extension if facet_config.extension

Also available in: Unified diff