Displaying 1 result from an estimated 1 matches for "find_by_short".
2008 May 17
5
Help needed
...r).each do |data|
retrieve_and_save_user(data)
end
end
def retrieve_and_save_user(data)
# email address must be unique for members
@user = User.find_or_initialize_by_email(email)
# save user if not existing
if @user.new_record?
@user.country =
Country.find_by_short((data/:countryShort).inner_html)
end
end
end
---- spec -------
module XmlImportSpecHelper
def mock_xml_import
xml_file = RAILS_ROOT + "/spec/fixtures/import-member.xml"
xml = File.read(xml_file)
@xml_import = XmlImport.new
@xml_import.should_receive(:op...