Sha256: 6feadb05e6ae08d71ef8d93820fbfede51d1e3dcdcaeb0259b4802390df12e1b

Contents?: true

Size: 207 Bytes

Versions: 7

Compression:

Stored size: 207 Bytes

Contents

class Word < ApplicationRecord

  def <=>(b)
    text.downcase <=> b.text.downcase
  end

  scope :sorted, -> { order('LOWER(text) ASC')},
        sync: -> (r, collection) { !collection.push(r).sort! }

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
hyper-mesh-0.6.0 examples/words/app/models/public/word.rb
hyper-mesh-0.5.4 examples/words/app/models/public/word.rb
hyper-mesh-0.5.3 examples/words/app/models/public/word.rb
hyper-mesh-0.5.2 examples/words/app/models/public/word.rb
hyper-mesh-0.5.1 examples/words/app/models/public/word.rb
hyper-mesh-0.5.0 examples/words/app/models/public/word.rb
hyper-mesh-0.4.0 examples/words/app/models/public/word.rb