Sha256: 58eec51615ab343ebb9e6ba34afead137bdddc44f8bbb6585725a0a23971aca8
Contents?: true
Size: 368 Bytes
Versions: 4
Compression:
Stored size: 368 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,"tmp","index"] validates_presence_of :<%= attributes.first.name %> validates_uniqueness_of :<%= attributes.first.name %> end
Version data entries
4 entries across 4 versions & 1 rubygems