Location database schema table in rails -


i trying design schema location attribute in rails application.

should right design

class createlocations < activerecord::migration    def self.up     create_table :locations |t|       t.string  :zip               t.string  :city,       :null => false       t.string  :state,      :null => false       t.string  :country,    :null => false       t.string  :latitude          t.string  :longitude       t.timestamps     end   end    end 

unless there particular reason don't think solving solution, syntactically looks right me. beauty of rails if isnt right can migrate data model add more attributes find need them.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -