no more references to zip templates
This commit is contained in:
parent
5fd244e66c
commit
112d61ac3b
@ -36,8 +36,6 @@ module Locomotive
|
||||
@site = Site.create_first_one(params[:site])
|
||||
|
||||
if @site.valid?
|
||||
Site.install_template(@site, params)
|
||||
|
||||
redirect_to last_url
|
||||
else
|
||||
logger.error "Unable to create the first website: #{@site.errors.inspect}"
|
||||
|
@ -14,24 +14,6 @@ module Locomotive
|
||||
site
|
||||
end
|
||||
|
||||
def install_template(site, options = {})
|
||||
default_template = Boolean.set(options.delete(:default_site_template)) || false
|
||||
|
||||
zipfile = options.delete(:zipfile)
|
||||
|
||||
# do not try to process anything if said so
|
||||
return unless default_template || zipfile.present?
|
||||
|
||||
# default template options has a higher priority than the zipfile
|
||||
source = default_template ? Locomotive.default_site_template_path : zipfile
|
||||
|
||||
begin
|
||||
Locomotive::Import::Job.run!(source, site, { :samples => true })
|
||||
rescue Exception => e
|
||||
Rails.logger.error "The import of the site template failed because of #{e.message}"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user