Sha256: cfe4aba936f60dd4f1983dfbd709292ec263fd9eb7a0daf384e6c8816fe785eb

Contents?: true

Size: 611 Bytes

Versions: 15

Compression:

Stored size: 611 Bytes

Contents

class Snippet < KitIndexed
  belongs_to :user

  use_kit_caching

    Snippet.do_indexing :Block, [
      {:name=>:id, :index=>:not_analyzed},
      {:name=>:system_id, :index=>:not_analyzed},
      {:name=>:name, :boost=>100},
      {:name=>:body, :user=>true},
      {:name=>:description},
      {:name=>:created_by, :as=>"user.email"},
      {:name=>:updated_at, :type=>'date', :include_in_all=>false},
    ]

  def self.parse_lines(id, sid)
    s = Snippet.cache_get(sid, id)
    return nil unless s

    return s.body.split(/\r\n/)
  end
    

  def mail_name
    self.name[6..self.name.length]
  end 
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
kit_cms-2.3.22 app/models/snippet.rb
kit_cms-2.3.20 app/models/snippet.rb
kit_cms-2.3.19 app/models/snippet.rb
kit_cms-2.3.18 app/models/snippet.rb
kit_cms-2.3.17 app/models/snippet.rb
kit_cms-2.3.16 app/models/snippet.rb
kit_cms-2.3.15 app/models/snippet.rb
kit_cms-2.3.14 app/models/snippet.rb
kit_cms-2.3.13 app/models/snippet.rb
kit_cms-2.3.11 app/models/snippet.rb
kit_cms-2.3.10 app/models/snippet.rb
kit_cms-2.3.9 app/models/snippet.rb
kit_cms-2.3.8 app/models/snippet.rb
kit_cms-2.3.7 app/models/snippet.rb
kit_cms-2.3.6 app/models/snippet.rb