Sha256: fb847f53c0efb304408af502ce94376b515e912014288232296e2a3113d5f710
Contents?: true
Size: 626 Bytes
Versions: 31
Compression:
Stored size: 626 Bytes
Contents
module Rails module Generator class GeneratedAttribute def default_value @default_value ||= case type when :int, :integer then "\"1\"" when :float then "\"1.5\"" when :decimal then "\"9.99\"" when :datetime, :timestamp, :time then "Time.now" when :date then "Date.today" when :string, :text then "\"value for #{@name}\"" when :boolean then "false" else "" end end end end end
Version data entries
31 entries across 31 versions & 8 rubygems