Class: Storytime::Dashboard::ImportsController

Inherits:
Storytime::DashboardController show all
Defined in:
app/controllers/storytime/dashboard/imports_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#authenticate_user!, #current_user, #setup, #user_signed_in?

Methods included from Concerns::CurrentSite

#current_storytime_site

Methods included from Concerns::ControllerContentFor

#content_for, #content_for?, #view_context

Instance Method Details

#createObject



12
13
14
15
16
17
# File 'app/controllers/storytime/dashboard/imports_controller.rb', line 12

def create
  authorize Importers::Importer
  importer = Importers::Wordpress.new(params[:import][:file], current_user)
  importer.import!
  render :show
end

#newObject



8
9
10
# File 'app/controllers/storytime/dashboard/imports_controller.rb', line 8

def new
  authorize Importers::Importer
end