Sha256: 509e64266367a380fe26c27c0cd8cc2cfd8648692c43067de133b92a5a52c58b
Contents?: true
Size: 382 Bytes
Versions: 3
Compression:
Stored size: 382 Bytes
Contents
class <%= class_name %> < ActiveRecord::Base acts_as_indexed :fields => [:<%= attributes.collect{ |attribute| attribute.name if attribute.type.to_s =~ /string|text/ }.compact.uniq.join(", :") %>], :index_file => [Rails.root.to_s, "tmp", "index"] validates_presence_of :<%= attributes.first.name %> validates_uniqueness_of :<%= attributes.first.name %> end
Version data entries
3 entries across 3 versions & 1 rubygems