Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
body {
font-family: "Open Sans", sans-serif;
color: #fff;
background-image: linear-gradient(rgba(61, 19, 52, 0.65), rgba(43, 15, 47, 0.65)), url('bg.jpg');
background-image: linear-gradient(rgba(19, 20, 61, 0.65), rgba(43, 15, 47, 0.65)), url('bg.jpg');
background-size: cover;
position: relative;
}
Expand Down Expand Up @@ -50,6 +50,6 @@ a {
text-decoration: none;
}
a:hover {
color: rgb(191, 50, 196);
color: rgb(150, 64, 153);
text-decoration: none;
}
2 changes: 1 addition & 1 deletion app/views/display/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Bienvenue
</h1>
<div class="btn-landing">
<%= link_to 'Data Countries', country_index_path,class: 'btn bg-purple ' %>
<%= link_to 'Listes des Pays', country_index_path,class: 'btn bg-purple ' %>
</div>
</div>
</div>
Expand Down
7 changes: 5 additions & 2 deletions lib/tasks/import.rake
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ namespace :import do
counter += 1
data = row[0].split(';')
begin
country = Country.all.detect{ |country| country.name_fr.parameterize == data[1].parameterize }
Embassy.create!(in_country: data[1], latitude: data[2], longitude: data[3], gps: data[4], country_id: country.id)
country = Country.all.detect do |country|
p /#{Regexp.escape(country.name_fr.parameterize)}/.match("#{Regexp.escape(data[1].parameterize)}")
end
#p { |country| country.name_fr.parameterize == data[1].parameterize }
#Embassy.create!(in_country: data[1], latitude: data[2], longitude: data[3], gps: data[4], country_id: country.id)
counter2 += 1
rescue => e
p e
Expand Down