Skip to content

Commit

Permalink
Changed model generator so that it is consistent with the changes to …
Browse files Browse the repository at this point in the history
…the other models
  • Loading branch information
Steven Heidel committed Jan 13, 2010
1 parent e4831c3 commit b55f2c6
Showing 1 changed file with 1 addition and 1 deletion.
@@ -1,7 +1,7 @@
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 => (HEROKU ? [RAILS_ROOT,"tmp","index"] : [RAILS_ROOT,"index"])
:index_file => [RAILS_ROOT,"tmp","index"]

validates_presence_of :<%= attributes.first.name %>
validates_uniqueness_of :<%= attributes.first.name %>
Expand Down

0 comments on commit b55f2c6

Please sign in to comment.