Sha256: 2fedcbaa97a4081e3d1c9d54e731eee146c45830102909d62b66e0af9c2ebed8

Contents?: true

Size: 203 Bytes

Versions: 5

Compression:

Stored size: 203 Bytes

Contents

module FilterMixin
  def typecast(value, record)
    Hpricot(value.to_s).search('text()').collect(&:to_s).collect(&:strip).join(' ').strip
  end

  def untypecast(value, record)
    value.to_s
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
yodel-0.0.7 lib/yodel/models/core/fields/filter_mixin.rb
yodel-0.0.4 lib/yodel/models/core/fields/filter_mixin.rb
yodel-0.0.3 lib/yodel/models/core/fields/filter_mixin.rb
yodel-0.0.2 lib/yodel/models/core/fields/filter_mixin.rb
yodel-0.0.1 lib/yodel/models/core/fields/filter_mixin.rb