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

Version Path
refinerycms-0.9.5.13 vendor/plugins/refinery/lib/generators/refinery/templates/model.rb
refinerycms-0.9.5.12 vendor/plugins/refinery/lib/generators/refinery/templates/model.rb
refinerycms-0.9.5.11 vendor/plugins/refinery/lib/generators/refinery/templates/model.rb
refinerycms-0.9.5.10 vendor/plugins/refinery/lib/generators/refinery/templates/model.rb
refinerycms-0.9.5.9 vendor/plugins/refinery/lib/generators/refinery/templates/model.rb
refinerycms-0.9.5.8 vendor/plugins/refinery/lib/generators/refinery/templates/model.rb
refinerycms-0.9.5.7 vendor/plugins/refinery/lib/generators/refinery/templates/model.rb
refinerycms-0.9.5.6 vendor/plugins/refinery/lib/generators/refinery/templates/model.rb
refinerycms-0.9.5.5 vendor/plugins/refinery/lib/generators/refinery/templates/model.rb
refinerycms-0.9.5.4 vendor/plugins/refinery/lib/generators/refinery/templates/model.rb
refinerycms-0.9.5.3 vendor/plugins/refinery/lib/generators/refinery/templates/model.rb
refinerycms-0.9.5.2 vendor/plugins/refinery/lib/generators/refinery/templates/model.rb
refinerycms-0.9.5.1 vendor/plugins/refinery/lib/generators/refinery/templates/model.rb
refinerycms-0.9.5 vendor/plugins/refinery/lib/generators/refinery/templates/model.rb
refinerycms-0.9.4.5 vendor/plugins/refinery/lib/generators/refinery/templates/model.rb
refinerycms-0.9.4.4 vendor/plugins/refinery/lib/generators/refinery/templates/model.rb
refinerycms-0.9.4.3 vendor/plugins/refinery/lib/generators/refinery/templates/model.rb
refinerycms-0.9.4.2 vendor/plugins/refinery/lib/generators/refinery/templates/model.rb
refinerycms-0.9.4.1 vendor/plugins/refinery/lib/generators/refinery/templates/model.rb
refinerycms-0.9.4 vendor/plugins/refinery/lib/generators/refinery/templates/model.rb