aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/imports_controller.rb
diff options
context:
space:
mode:
authorAlban Peignier2012-05-16 16:55:57 +0200
committerAlban Peignier2012-05-16 16:55:57 +0200
commit39a4249b8c5197cfee6b8eb4673485628408e07a (patch)
tree61619db5ea5e722b2c7752bbfc914f5a7a859fdd /app/controllers/imports_controller.rb
parenta2260f9d3737188d22504f705825ed5a846bb861 (diff)
downloadchouette-core-39a4249b8c5197cfee6b8eb4673485628408e07a.tar.bz2
Create first Imports. Refs #23
Diffstat (limited to 'app/controllers/imports_controller.rb')
-rw-r--r--app/controllers/imports_controller.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/controllers/imports_controller.rb b/app/controllers/imports_controller.rb
new file mode 100644
index 000000000..7e33b8c26
--- /dev/null
+++ b/app/controllers/imports_controller.rb
@@ -0,0 +1,17 @@
+class ImportsController < ChouetteController
+ respond_to :html, :xml, :json
+ belongs_to :referential
+
+ def create
+ create! do |success, failure|
+ success.html { redirect_to referential_imports_path(@referential) }
+ end
+ end
+
+ protected
+
+ def collection
+ @imports ||= end_of_association_chain.paginate(:page => params[:page])
+ end
+
+end