Module: CSVMagic::ControllerActions

Defined in:
lib/csv_magic/controller_actions.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
7
8
9
# File 'lib/csv_magic/controller_actions.rb', line 4

def self.included(base)
  base.send(:class_attribute, :map_fields_options)
  base.extend(ClassMethods)
  base.csv_magic_config
  base.send(:include, I18nHelpers)
end

Instance Method Details

#importObject



24
25
26
27
28
29
30
# File 'lib/csv_magic/controller_actions.rb', line 24

def import
  if request.post?
    handle_csv_post_request
  else
    render_csv_import_form
  end
end