Closed
Description
class Word < ApplicationRecord
def self.by_size(size)
where("LENGTH(text) = ?", size)
end
end
I should be able to say:
Word.where(swear_word: true).by_size(4)
Rails lets you do this. It is more useful now that where
is implemented
This will also allow some cleanup in the Collections class