Flowdock
method

options_for_migration

Importance_0
v4.2.1 - Show latest stable - 0 notes - Class: Rails::Generators::GeneratedAttribute
options_for_migration() public

No documentation

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

Hide source
# File railties/lib/rails/generators/generated_attribute.rb, line 156
      def options_for_migration
        @attr_options.dup.tap do |options|
          if required?
            options.delete(:required)
            options[:null] = false
          end

          if reference? && !polymorphic?
            options[:foreign_key] = true
          end
        end
      end
Register or log in to add new notes.