method

print_attribute_options

rails latest stable - Class: Rails::Generators::GeneratedAttribute

Method not available on this version

This method is only available on newer versions. The first available version (v7.2.3) is shown here.

print_attribute_options()
private

No documentation available.

# File railties/lib/rails/generators/generated_attribute.rb, line 254
        def print_attribute_options
          if attr_options.empty?
            ""
          elsif attr_options[:size]
            "{#{attr_options[:size]}}"
          elsif attr_options[:limit]
            "{#{attr_options[:limit]}}"
          elsif attr_options[:precision] && attr_options[:scale]
            "{#{attr_options[:precision]},#{attr_options[:scale]}}"
          else
            "{#{attr_options.keys.join(",")}}"
          end
        end