Flowdock
method

index_name_for

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: ActiveRecord::Generators::MigrationGenerator
index_name_for(attribute) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/rails/generators/active_record/migration/migration_generator.rb, line 51
        def index_name_for(attribute)
          if attribute.foreign_key?
            attribute.name
          else
            attribute.name.singularize.foreign_key
          end.to_sym
        end
Register or log in to add new notes.