Class: Locomotive::ContentEntryImportsController
- Inherits:
-
BaseController
- Object
- ApplicationController
- BaseController
- Locomotive::ContentEntryImportsController
- Defined in:
- app/controllers/locomotive/content_entry_imports_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
17 18 19 20 21 22 |
# File 'app/controllers/locomotive/content_entry_imports_controller.rb', line 17 def create @content_type, :import? @import = Locomotive::ContentEntryImport.new(import_params) service.async_import(@import.file, @import.) if @import.valid? respond_with @import, location: content_entry_import_path(current_site, @content_type.slug) end |
#destroy ⇒ Object
24 25 26 27 28 29 30 |
# File 'app/controllers/locomotive/content_entry_imports_controller.rb', line 24 def destroy @content_type, :import? = t('flash.locomotive.content_entry_imports.destroy.notice') service.cancel() flash[:alert] = redirect_to new_content_entry_import_path(current_site, @content_type.slug) end |
#new ⇒ Object
12 13 14 15 |
# File 'app/controllers/locomotive/content_entry_imports_controller.rb', line 12 def new @content_type, :import? @import = Locomotive::ContentEntryImport.new end |
#show ⇒ Object
8 9 10 |
# File 'app/controllers/locomotive/content_entry_imports_controller.rb', line 8 def show @content_type, :import? end |