Module: Ix::HasIx::ClassMethods
- Defined in:
- lib/ix/has_ix.rb
Instance Method Summary collapse
Instance Method Details
#fill_blank_ixs ⇒ Object
23 24 25 26 27 |
# File 'lib/ix/has_ix.rb', line 23 def fill_blank_ixs self.where(ix: nil).each do |record| record.save end end |
#find_ix(ix) ⇒ Object
19 20 21 |
# File 'lib/ix/has_ix.rb', line 19 def find_ix(ix) self.find_by ix: ix end |
#has_ix(options = {}) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/ix/has_ix.rb', line 12 def has_ix( = {}) cattr_accessor :ix_length self.ix_length = ([:length] / 2) || 4 include Ix::HasIx::LocalInstanceMethods end |