Class: E9Crm::ContactMergesController
- Inherits:
-
BaseController
- Object
- AdminController
- BaseController
- E9Crm::ContactMergesController
- Defined in:
- app/controllers/e9_crm/contact_merges_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
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 |