no more references to zip templates

This commit is contained in:
did 2012-02-06 08:58:50 -08:00
parent 5fd244e66c
commit 112d61ac3b
2 changed files with 0 additions and 20 deletions

View File

@ -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}"

View File

@ -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