Sha256: f9677bff0f517c76ea55f1bcfaacec9e9c99a0e2d379b7fe10d61cdb20968c17

Contents?: true

Size: 546 Bytes

Versions: 19

Compression:

Stored size: 546 Bytes

Contents

# frozen_string_literal: true

# Customize Model
class Customize < ApplicationRecord
  include ActivityHistory
  include CloneRecord
  mount_uploader :file, TemplateUploader
  delegate :install, :uninstall, :set_defaut,
           to: :template

  # validates :file, uniqueness: true
  # Fields for the search form in the navbar
  def self.search_field
    :file_cont
  end

  def name
    if file?
      template.name(file)
    else
      'Keppler Default'
    end
  end

  private

  def template
    Admin::TemplateService.new(file)
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
keppler-2.1.11 installer/core/app/models/customize.rb
keppler-2.1.10 installer/core/app/models/customize.rb
keppler-2.1.9 installer/core/app/models/customize.rb
keppler-2.1.8 installer/core/app/models/customize.rb
keppler-2.1.7 installer/core/app/models/customize.rb
keppler-2.1.6 installer/core/app/models/customize.rb
keppler-2.1.5 installer/core/app/models/customize.rb
keppler-2.1.4 installer/core/app/models/customize.rb
keppler-2.1.3 installer/core/app/models/customize.rb
keppler-2.1.2 installer/core/app/models/customize.rb
keppler-2.1.1 installer/core/app/models/customize.rb
keppler-2.1.pre.p1 installer/core/app/models/customize.rb
keppler-2.1 installer/core/app/models/customize.rb
keppler-2.0.7 installer/core/app/models/customize.rb
keppler-2.0.6 installer/core/app/models/customize.rb
keppler-2.0.5 installer/core/app/models/customize.rb
keppler-2.0.4.p1 installer/core/app/models/customize.rb
keppler-2.0.4.pre.p1 installer/core/app/models/customize.rb
keppler-2.0.4 installer/core/app/models/customize.rb