diff --git a/Gemfile b/Gemfile index dff40bbcd1..5123b2011f 100644 --- a/Gemfile +++ b/Gemfile @@ -117,6 +117,8 @@ gem 'flipper' gem 'flipper-active_record' gem 'flipper-ui' +gem "view_component", require: "view_component/engine" + group :production, :staging do gem 'ddtrace' gem 'unicorn-worker-killer' diff --git a/Gemfile.lock b/Gemfile.lock index dbba6e93eb..9344eabdcf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -582,6 +582,8 @@ GEM get_process_mem (~> 0) unicorn (>= 4, < 7) uniform_notifier (1.14.1) + view_component (2.28.0) + activesupport (>= 5.0.0, < 7.0) warden (1.2.9) rack (>= 2.0.9) webdrivers (4.6.0) @@ -722,6 +724,7 @@ DEPENDENCIES uglifier (>= 1.0.3) unicorn-rails unicorn-worker-killer + view_component web! webdrivers webmock diff --git a/config/application.rb b/config/application.rb index 0996f74747..20fe4aa4b8 100644 --- a/config/application.rb +++ b/config/application.rb @@ -197,5 +197,7 @@ module Openfoodnetwork config.active_support.escape_html_entities_in_json = true config.active_job.queue_adapter = :delayed_job + + config.generators.template_engine = :haml end end