lib/rails_erd/domain/attribute.rb in rails-erd-1.7.0 vs lib/rails_erd/domain/attribute.rb in rails-erd-1.7.1

- old
+ new

@@ -117,10 +117,10 @@ # <tt>:string, :limit => 255</tt>:: string # <tt>:string, :limit => 128</tt>:: string (128) # <tt>:decimal, :precision => 5, :scale => 2/tt>:: decimal (5,2) # <tt>:boolean, :null => false</tt>:: boolean * def type_description - type.to_s.tap do |desc| + type.to_s.dup.tap do |desc| desc << " #{limit_description}" if limit_description desc << " ∗" if mandatory? && !primary_key? # Add a hair space + low asterisk (Unicode characters) desc << " U" if unique? && !primary_key? && !foreign_key? # Add U if unique but non-key desc << " PK" if primary_key? desc << " FK" if foreign_key?