From d65af78740e5f6475a7d16a6db9342f848217753 Mon Sep 17 00:00:00 2001 From: Robin Steiner Date: Fri, 26 Jan 2024 13:22:22 +0100 Subject: [PATCH] Migrate to haml instead of erb --- Gemfile | 1 + Gemfile.lock | 12 ++++++++++++ app/views/people/index.html.erb | 3 --- app/views/people/index.html.haml | 3 +++ app/views/people/show.html.erb | 7 ------- app/views/people/show.html.haml | 8 ++++++++ 6 files changed, 24 insertions(+), 10 deletions(-) delete mode 100644 app/views/people/index.html.erb create mode 100644 app/views/people/index.html.haml delete mode 100644 app/views/people/show.html.erb create mode 100644 app/views/people/show.html.haml diff --git a/Gemfile b/Gemfile index 74c33daba..ce416c77b 100644 --- a/Gemfile +++ b/Gemfile @@ -14,6 +14,7 @@ gem 'config' gem 'countries' gem 'database_cleaner' gem 'faker' +gem 'haml-rails' gem 'i18n_data' gem 'keycloak-api-rails' gem 'language_list' diff --git a/Gemfile.lock b/Gemfile.lock index 558e4dec7..9d0ed07d9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -168,6 +168,15 @@ GEM ffi (1.16.3) globalid (1.1.0) activesupport (>= 5.0) + haml (6.3.0) + temple (>= 0.8.2) + thor + tilt + haml-rails (2.1.0) + actionpack (>= 5.1) + activesupport (>= 5.1) + haml (>= 4.0.6) + railties (>= 5.1) http-accept (1.7.0) http-cookie (1.0.3) domain_name (~> 0.5) @@ -356,7 +365,9 @@ GEM listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) ssrf_filter (1.1.2) + temple (0.10.3) thor (1.1.0) + tilt (2.3.0) timeout (0.3.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) @@ -388,6 +399,7 @@ DEPENDENCIES countries database_cleaner faker + haml-rails i18n_data keycloak-api-rails language_list diff --git a/app/views/people/index.html.erb b/app/views/people/index.html.erb deleted file mode 100644 index 43d6932f6..000000000 --- a/app/views/people/index.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<% @people.each do |person| %> -

<%= person.name %>

-<% end %> \ No newline at end of file diff --git a/app/views/people/index.html.haml b/app/views/people/index.html.haml new file mode 100644 index 000000000..c36a0b06f --- /dev/null +++ b/app/views/people/index.html.haml @@ -0,0 +1,3 @@ +- @people.each do |person| + %h1 + = person.name \ No newline at end of file diff --git a/app/views/people/show.html.erb b/app/views/people/show.html.erb deleted file mode 100644 index 32b16728a..000000000 --- a/app/views/people/show.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -
-

<%= @person.name %>'s Profile

-
-
That person is from <%= @person.location %>
-
-
-<%= link_to "Person bearbeiten", edit_person_path %> \ No newline at end of file diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml new file mode 100644 index 000000000..d1038b844 --- /dev/null +++ b/app/views/people/show.html.haml @@ -0,0 +1,8 @@ +%div + %h1 + = @person.name + 's Profile + %div + %h5 + That person is from #{@person.location} += link_to "Person bearbeiten", edit_person_path \ No newline at end of file