Sha256: 7731531b7cd6dc9ade840f6b6ef4cab25f7f779862ad408f297a577a843dbf3e
Contents?: true
Size: 317 Bytes
Versions: 28
Compression:
Stored size: 317 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(", :") %>] validates_presence_of :<%= attributes.first.name %> validates_uniqueness_of :<%= attributes.first.name %> end
Version data entries
28 entries across 28 versions & 1 rubygems