Sha256: a2e279ec0efe9fb7d4b9751e14dea29ab375a30214b359e5913ebc9f052c50c0

Contents?: true

Size: 366 Bytes

Versions: 6

Compression:

Stored size: 366 Bytes

Contents

module Locomotive
  module Import
    module Site

      def self.process(context)
        site, database = context[:site], context[:database]

        attributes = database['site'].clone.delete_if { |name, value| %w{pages assets content_types asset_collections}.include?(name) }

        site.attributes = attributes

        site.save!
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
locomotive_cms-0.0.4.beta5 lib/locomotive/import/site.rb
locomotive_cms-0.0.4.beta4 lib/locomotive/import/site.rb
locomotive_cms-0.0.4.beta3 lib/locomotive/import/site.rb
locomotive_cms-0.0.4.beta2 lib/locomotive/import/site.rb
locomotive_cms-0.0.4.beta1 lib/locomotive/import/site.rb
locomotive_cms-0.0.4 lib/locomotive/import/site.rb