From 82ebb9780ca83f22b9ce0ff5b65423fe036d8e41 Mon Sep 17 00:00:00 2001 From: Dmitry Zudochkin Date: Mon, 17 Aug 2015 16:38:40 +0300 Subject: [PATCH] quick fix --- lib/rails_admin_clone/action.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/rails_admin_clone/action.rb b/lib/rails_admin_clone/action.rb index 4d08660..e20fcd6 100644 --- a/lib/rails_admin_clone/action.rb +++ b/lib/rails_admin_clone/action.rb @@ -18,7 +18,8 @@ class Clone < Base register_instance_option :controller do Proc.new do model_cloner = RailsAdminClone::ModelCloner.new(@object) - custom_method = model_config.clone_config.custom_method + # TODO: quick fix + custom_method = model_config.try(:clone_config).try(:custom_method) if custom_method.present? @object = model_cloner.method_clone(custom_method)