global

def release!

def release!
  model = viewmodel.model
  case association_data.direct_reflection.options[:dependent]
  when :delete
    model.delete
  when :destroy
    model.destroy
  end
end