Add view_components to manage our components

- Documentation : https://viewcomponent.org/
 - Our template engine generator is haml
This commit is contained in:
Jean-Baptiste Bellet
2021-03-30 14:51:40 +02:00
parent 6dc23804a1
commit e25cb1b65e
3 changed files with 7 additions and 0 deletions

View File

@@ -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'

View File

@@ -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

View File

@@ -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