diff options
| author | Alban Peignier | 2012-05-16 16:55:57 +0200 | 
|---|---|---|
| committer | Alban Peignier | 2012-05-16 16:55:57 +0200 | 
| commit | 39a4249b8c5197cfee6b8eb4673485628408e07a (patch) | |
| tree | 61619db5ea5e722b2c7752bbfc914f5a7a859fdd /app/controllers/imports_controller.rb | |
| parent | a2260f9d3737188d22504f705825ed5a846bb861 (diff) | |
| download | chouette-core-39a4249b8c5197cfee6b8eb4673485628408e07a.tar.bz2 | |
Create first Imports. Refs #23
Diffstat (limited to 'app/controllers/imports_controller.rb')
| -rw-r--r-- | app/controllers/imports_controller.rb | 17 | 
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  | 
