Sha256: d746dcc45aabd732ea211872b2e1ddf20cecbf1bb4d0e85fac02f5da6c845e50

Contents?: true

Size: 478 Bytes

Versions: 9

Compression:

Stored size: 478 Bytes

Contents

module SportDB
  module Models

  
class Country < ActiveRecord::Base
  self.table_name = 'countries'

  def self.create_from_ary!( countries )
    countries.each do |values|
      
      ## key & title required
      attr = {
        :key   => values[0],
        :title => values[1],
        :tag   => values[2]
      }
      
      Country.create!( attr )
    end # each country
  end

end # class Country


 end # module Models
end # module SportDB

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sportdb-0.4.5 lib/sportdb/models/country.rb
sportdb-0.4.4 lib/sportdb/models/country.rb
sportdb-0.4.3 lib/sportdb/models/country.rb
sportdb-0.4.2 lib/sportdb/models/country.rb
sportdb-0.4.1 lib/sportdb/models/country.rb
sportdb-0.4.0 lib/sportdb/models/country.rb
sportdb-0.3.3 lib/sportdb/models/country.rb
sportdb-0.3.2 lib/sportdb/models/country.rb
sportdb-0.3.1 lib/sportdb/models/country.rb