aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/rails/generators/active_record/model/model_generator.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/rails/generators/active_record/model/model_generator.rb')
-rw-r--r--activerecord/lib/rails/generators/active_record/model/model_generator.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/rails/generators/active_record/model/model_generator.rb b/activerecord/lib/rails/generators/active_record/model/model_generator.rb
index 8cd994ff21..e07f6645f5 100644
--- a/activerecord/lib/rails/generators/active_record/model/model_generator.rb
+++ b/activerecord/lib/rails/generators/active_record/model/model_generator.rb
@@ -29,14 +29,14 @@ module ActiveRecord
template 'module.rb', File.join('app/models', "#{class_path.join('/')}.rb") if behavior == :invoke
end
- def attributes_with_index
- attributes.select { |a| !a.reference? && a.has_index? }
- end
-
hook_for :test_framework
protected
+ def attributes_with_index
+ attributes.select { |a| !a.reference? && a.has_index? }
+ end
+
# Used by the migration template to determine the parent name of the model
def parent_class_name
options[:parent] || determine_default_parent_class