Class: E9Crm::ContactMergesController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/e9_crm/contact_merges_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



4
5
6
7
8
9
10
11
12
13
# File 'app/controllers/e9_crm/contact_merges_controller.rb', line 4

def create
  @contact_a.attributes = params[:contact]
  @contact_a.avatar = @contact_b.avatar if params[:contact_avatar] == 'b'

  if @contact_a.merge_and_destroy!(@contact_b)
    redirect_to @contact_a
  else
    render :new
  end
end