aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorLuc Donnet2015-04-29 15:09:32 +0200
committerLuc Donnet2015-04-29 15:09:32 +0200
commit854fb22f32028b283bef0b3a76a6ca0e67f130de (patch)
treed5533ebfe76cfe2276ce34a5fbeccc85208c4816 /app/controllers
parent26894617911c89ba23fc4fa9b19820791be24b6d (diff)
downloadchouette-core-854fb22f32028b283bef0b3a76a6ca0e67f130de.tar.bz2
Add exported file to export
Diffstat (limited to 'app/controllers')
-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