diff --git a/Gemfile b/Gemfile index 2584ed62..f9f14189 100644 --- a/Gemfile +++ b/Gemfile @@ -47,7 +47,7 @@ gem 'chartjs-ror', :git => 'git://github.com/ZeiP/chartjs-ror.git' # gem 'jbuilder', '~> 1.2' gem "bootstrap-sass", "3.4.1" -gem "font-awesome-sass", "~> 4.5.0" +gem "font-awesome-sass", "~> 5.13.0" group :development do gem "spring" diff --git a/Gemfile.lock b/Gemfile.lock index 62c94f4c..da5585ed 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -101,8 +101,8 @@ GEM factory_bot (~> 6.1.0) railties (>= 5.0.0) ffi (1.9.25) - font-awesome-sass (4.5.0) - sass (>= 3.2) + font-awesome-sass (5.13.0) + sassc (>= 1.11) globalid (0.4.2) activesupport (>= 4.2.0) htmlentities (4.3.4) @@ -307,7 +307,7 @@ DEPENDENCIES coffee-rails (~> 5.0.0) database_cleaner factory_bot_rails - font-awesome-sass (~> 4.5.0) + font-awesome-sass (~> 5.13.0) htmlentities jquery-rails (~> 4.4) jquery-ui-rails (~> 6.0.1) diff --git a/app/helpers/icon_helper.rb b/app/helpers/icon_helper.rb index 3fb817fa..108a9e9b 100644 --- a/app/helpers/icon_helper.rb +++ b/app/helpers/icon_helper.rb @@ -1,7 +1,7 @@ module IconHelper include FontAwesome::Sass::Rails::ViewHelpers - def icon_fw(icon, text = nil, html_options = {}) + def icon_fw(style, name, text = nil, html_options = {}) text, html_options = nil, text if text.is_a?(Hash) if html_options.key?(:class) @@ -10,6 +10,6 @@ module IconHelper html_options[:class] = "fa-fw" end - icon(icon, text, html_options) + icon(style, name, text, html_options) end end diff --git a/app/views/search/_index.html.erb b/app/views/search/_index.html.erb index b77fae66..ced351fc 100644 --- a/app/views/search/_index.html.erb +++ b/app/views/search/_index.html.erb @@ -4,7 +4,7 @@ <%= text_field_tag(:search, params[:search], class: 'form-control') %>
<%= button_tag(type: 'submit', class: 'btn pull-right') do%> - <%= icon('search', class: 'hidden-xs') %> + <%= icon('fas', 'search', class: 'hidden-xs') %> <% end %>
diff --git a/app/views/shared/_navbar.html.erb b/app/views/shared/_navbar.html.erb index 709670c5..f0f5fdf9 100644 --- a/app/views/shared/_navbar.html.erb +++ b/app/views/shared/_navbar.html.erb @@ -63,20 +63,20 @@ diff --git a/test/helpers/icon_helper_test.rb b/test/helpers/icon_helper_test.rb index 5ab2e43f..90eaf3f4 100644 --- a/test/helpers/icon_helper_test.rb +++ b/test/helpers/icon_helper_test.rb @@ -4,10 +4,10 @@ class IconHelperTest < ActionView::TestCase include IconHelper test 'icon_fw generates fixed-width class' do - assert_equal '', icon_fw('gear') + assert_equal '', icon_fw('fas', 'gear') end test 'icon_fw accepts an additional class' do - assert_equal '', icon_fw('gear', class: 'myclass') + assert_equal '', icon_fw('fas', 'gear', class: 'myclass') end end