Sha256: 60349406c6a087e2c94d0c9a4184c1c1c6cf190d3d29e514f8caa3a43c0f1d46
Contents?: true
Size: 612 Bytes
Versions: 7
Compression:
Stored size: 612 Bytes
Contents
class <%= "#{migration_name.classify.pluralize}" %> < <%= migration_class_name %> def change <% attributes_names.each do |attribute| %> add_column :<%= name.tableize %>, <%= ":#{attribute}_token" %>, :string, default: nil add_column :<%= name.tableize %>, <%= ":#{attribute}_created_at" %>, :timestamp, default: nil add_column :<%= name.tableize %>, <%= ":#{attribute}_sent_at" %>, :timestamp, default: nil add_column :<%= name.tableize %>, <%= ":#{attribute}_completed_at" %>, :timestamp, default: nil add_index :<%= name.tableize %>, <%= ":#{attribute}_token" %> <% end %> end end
Version data entries
7 entries across 7 versions & 1 rubygems