diff --git a/app/controllers/administrate/application_controller.rb b/app/controllers/administrate/application_controller.rb index f64d0a294e..38534a365d 100644 --- a/app/controllers/administrate/application_controller.rb +++ b/app/controllers/administrate/application_controller.rb @@ -40,7 +40,7 @@ def edit end def create - resource = resource_class.new(resource_params) + resource = new_resource(resource_params) authorize_resource(resource) if resource.save @@ -267,8 +267,8 @@ def show_action?(action, resource) end helper_method :show_action? - def new_resource - resource_class.new + def new_resource(params = {}) + resource_class.new(params) end helper_method :new_resource