Method: Mdm::Module::Detail#add_ref

Defined in:
app/models/mdm/module/detail.rb

#add_ref(name) ⇒ true, false

Adds an Ref with the given Ref#name to #refs and immediately saves it to the database.

Parameters:

Returns:

  • (true)

    if save was successful.

  • (false)

    if save was unsuccessful.



355
356
357
# File 'app/models/mdm/module/detail.rb', line 355

def add_ref(name)
  self.refs.build(:name => name).save
end