aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/exports_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/exports_controller.rb')
-rw-r--r--app/controllers/exports_controller.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/controllers/exports_controller.rb b/app/controllers/exports_controller.rb
index ae8aa1b75..6d1a20f24 100644
--- a/app/controllers/exports_controller.rb
+++ b/app/controllers/exports_controller.rb
@@ -52,6 +52,15 @@ class ExportsController < ChouetteController
end
end
+ def references
+ @references = referential.send(params[:type]).where("name ilike ?", "%#{params[:q]}%")
+ respond_to do |format|
+ format.json do
+ render :json => @references.collect { |child| { :id => child.id, :name => child.name } }
+ end
+ end
+ end
+
protected
def export_service