module Countrizable::ActiveRecord::HasManyExtensions

Public Instance Methods

find_or_initialize_by_country_code(country_code) click to toggle source
# File lib/countrizable/active_record/act_macro.rb, line 111
def find_or_initialize_by_country_code(country_code)
  with_country_code(country_code.to_s).first || build(:country_code => country_code.to_s)
end