diff --git a/lib/ardes/resources_controller.rb b/lib/ardes/resources_controller.rb index 0d5461b..37312ba 100644 --- a/lib/ardes/resources_controller.rb +++ b/lib/ardes/resources_controller.rb @@ -571,8 +571,8 @@ def find_resource(id = params[:id]) unless instance_methods.include?('new_resource') # makes a new resource, optionally using the passed hash - def new_resource(attributes = (params[resource_name] || {})) - resource_service.new attributes + def new_resource(attributes = (params[resource_name] || {}), &block) + resource_service.new attributes, &block end end end