Sha256: f26f08e3cfce45d8224d91fa886260c3e903e3be5e8e643c462c3ee4f5b4dd89
Contents?: true
Size: 540 Bytes
Versions: 17
Compression:
Stored size: 540 Bytes
Contents
class <%= migration_name.camelize %> < ActiveRecord::Migration def change add_column :<%= table_name %>, :<%= options.latitude %>, :decimal, precision: 9, scale: 6 add_column :<%= table_name %>, :<%= options.longitude %>, :decimal, precision: 9, scale: 6 <%- if options.address? -%> add_column :<%= table_name %>, :address, :string add_column :<%= table_name %>, :country, :string <%- end -%> add_index :<%= table_name %>, :<%= options.latitude %> add_index :<%= table_name %>, :<%= options.longitude %> end end
Version data entries
17 entries across 17 versions & 1 rubygems