diff --git a/.erb-lint.yml b/.erb-lint.yml new file mode 100644 index 00000000..5b4eaa6b --- /dev/null +++ b/.erb-lint.yml @@ -0,0 +1,9 @@ +EnableDefaultLinters: true +linters: + Rubocop: + enabled: true + only: [Style/StringLiterals] + rubocop_config: + Style/StringLiterals: + Enabled: true + EnforcedStyle: double_quotes \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26daf58e..ebb49a02 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,6 +54,9 @@ jobs: - name: Lint code for consistent style run: bin/rubocop -f github + - name: Lint templates for consistent style + run: ./bin/erblint ./app/**/*.erb + test: runs-on: ubuntu-latest timeout-minutes: 10 diff --git a/Gemfile b/Gemfile index 39428350..083f8a91 100644 --- a/Gemfile +++ b/Gemfile @@ -48,6 +48,7 @@ group :development, :test do gem "dotenv-rails" gem "letter_opener" gem "i18n-tasks" + gem "erb_lint" end group :development do diff --git a/Gemfile.lock b/Gemfile.lock index e149054d..1b60a41c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -148,6 +148,13 @@ GEM dotenv (= 3.1.0) railties (>= 6.1) drb (2.2.1) + erb_lint (0.5.0) + activesupport + better_html (>= 2.0.1) + parser (>= 2.7.1.4) + rainbow + rubocop + smart_properties erubi (1.12.0) et-orbi (1.2.11) tzinfo @@ -418,6 +425,7 @@ DEPENDENCIES capybara debug dotenv-rails + erb_lint faraday good_job hotwire-livereload diff --git a/app/views/accounts/_account.html.erb b/app/views/accounts/_account.html.erb index ac7c27bc..c8eb02ae 100644 --- a/app/views/accounts/_account.html.erb +++ b/app/views/accounts/_account.html.erb @@ -20,4 +20,4 @@ <% end %> -<% end%> \ No newline at end of file +<% end %> diff --git a/app/views/accounts/_account_list.html.erb b/app/views/accounts/_account_list.html.erb index 7f8319b9..23f71a8c 100644 --- a/app/views/accounts/_account_list.html.erb +++ b/app/views/accounts/_account_list.html.erb @@ -21,7 +21,7 @@

<%= format_money account_value_node.original.balance_money %>

<% end %> <% end %> - <%= link_to new_account_path(step: 'method', type: type.name.demodulize), class: "flex items-center gap-4 px-2 py-3 mb-1 text-gray-500 text-sm font-medium rounded-[10px] hover:bg-gray-100", data: { turbo_frame: "modal" } do %> + <%= link_to new_account_path(step: "method", type: type.name.demodulize), class: "flex items-center gap-4 px-2 py-3 mb-1 text-gray-500 text-sm font-medium rounded-[10px] hover:bg-gray-100", data: { turbo_frame: "modal" } do %> <%= lucide_icon("plus", class: "w-5 h-5") %>

New <%= type.model_name.human.downcase %>

<% end %> diff --git a/app/views/accounts/_account_type.html.erb b/app/views/accounts/_account_type.html.erb index d0b1ebe2..b37ebe29 100644 --- a/app/views/accounts/_account_type.html.erb +++ b/app/views/accounts/_account_type.html.erb @@ -1,4 +1,4 @@ -<%= link_to new_account_path(step: 'method', type: type.class.name.demodulize), class: "flex items-center gap-4 w-full text-center focus:outline-none focus:bg-gray-25 border border-transparent focus:border focus:border-gray-200 block px-2 hover:bg-gray-25 rounded-lg p-2" do %> +<%= link_to new_account_path(step: "method", type: type.class.name.demodulize), class: "flex items-center gap-4 w-full text-center focus:outline-none focus:bg-gray-25 border border-transparent focus:border focus:border-gray-200 block px-2 hover:bg-gray-25 rounded-lg p-2" do %> <%= lucide_icon(icon, class: "#{text_color} w-5 h-5") %> diff --git a/app/views/accounts/_account_valuation_list.html.erb b/app/views/accounts/_account_valuation_list.html.erb index f1e83caf..3e0833a3 100644 --- a/app/views/accounts/_account_valuation_list.html.erb +++ b/app/views/accounts/_account_valuation_list.html.erb @@ -25,26 +25,24 @@ <% end %>
- -
- <%= link_to edit_valuation_path(valuation.original), +
+ <%= link_to edit_valuation_path(valuation.original), class: "flex gap-1 items-center hover:bg-gray-50 rounded-md p-2" do %> <%= lucide_icon("pencil-line", class: "w-5 h-5 text-gray-500 shrink-0") %> Edit entry <% end %> - <%= link_to valuation_path(valuation.original), - data: { turbo_method: :delete, - turbo_confirm: { title: t('custom_turbo_confirm.history.title'), - body: t('custom_turbo_confirm.history.body_html'), - accept: t('custom_turbo_confirm.history.accept') } }, + <%= link_to valuation_path(valuation.original), + data: { turbo_method: :delete, + turbo_confirm: { title: t("custom_turbo_confirm.history.title"), + body: t("custom_turbo_confirm.history.body_html"), + accept: t("custom_turbo_confirm.history.accept") } }, class: "text-red-600 flex gap-1 items-center hover:bg-gray-50 rounded-md p-2" do %> <%= lucide_icon("trash-2", class: "w-5 h-5 shrink-0") %> Delete entry diff --git a/app/views/accounts/_entry_method.html.erb b/app/views/accounts/_entry_method.html.erb index afac3345..ad13d55c 100644 --- a/app/views/accounts/_entry_method.html.erb +++ b/app/views/accounts/_entry_method.html.erb @@ -12,4 +12,4 @@ <%= text %> <% end %> -<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/accounts/index.html.erb b/app/views/accounts/index.html.erb index 21f5ec1c..b0ecf2b9 100644 --- a/app/views/accounts/index.html.erb +++ b/app/views/accounts/index.html.erb @@ -3,7 +3,7 @@

Accounts

<%= link_to new_account_path, class: "flex text-white text-sm font-medium items-center gap-1 bg-gray-900 rounded-lg p-2", data: { turbo_frame: "modal" } do %> <%= lucide_icon("plus", class: "w-5 h-5") %> - <%= t('.new_account') %> + <%= t(".new_account") %> <% end %>
<% if Current.family.accounts.empty? %> @@ -13,7 +13,7 @@

Add an account either via connection, importing or entering manually.

<%= link_to new_account_path, class: "w-fit flex text-white text-sm font-medium items-center gap-1 bg-gray-900 rounded-lg p-2", data: { turbo_frame: "modal" } do %> <%= lucide_icon("plus", class: "w-5 h-5") %> - <%= t('.new_account') %> + <%= t(".new_account") %> <% end %>
@@ -40,7 +40,7 @@

<%= to_accountable_title(Accountable.from_type(group)) %>

·

<%= accounts.count %>

-

<%= format_money accounts.sum(&:balance_money) %>

+

<%= format_money accounts.sum(&:balance_money) %>

<% accounts.each do |account| %> diff --git a/app/views/accounts/new.html.erb b/app/views/accounts/new.html.erb index f17a842d..c6cd4f9c 100644 --- a/app/views/accounts/new.html.erb +++ b/app/views/accounts/new.html.erb @@ -1,9 +1,9 @@ -

<%= t('.title')%>

+

<%= t(".title") %>

<%= modal do %>
<% if @account.accountable.blank? %>
- <%= t '.select_accountable_type' %> + <%= t ".select_accountable_type" %>
@@ -20,10 +20,10 @@
- Select <%= lucide_icon('corner-down-left', class: 'inline w-3 h-3')%> + Select <%= lucide_icon("corner-down-left", class: "inline w-3 h-3") %>
- Navigate <%= lucide_icon('arrow-up', class: 'inline w-3 h-3')%> <%= lucide_icon('arrow-down', class: 'inline w-3 h-3')%> + Navigate <%= lucide_icon("arrow-up", class: "inline w-3 h-3") %> <%= lucide_icon("arrow-down", class: "inline w-3 h-3") %>
@@ -33,24 +33,24 @@ <% elsif params[:step] == 'method' && @account.accountable.present? %>
<%= link_to new_account_path, class: "flex w-8 h-8 shrink-0 grow-0 items-center justify-center rounded-lg bg-alpha-black-50 back focus:outline-gray-300 focus:outline" do %> - <%= lucide_icon('arrow-left', class: 'text-gray-500 w-5 h-5') %> + <%= lucide_icon("arrow-left", class: "text-gray-500 w-5 h-5") %> <% end %> How would you like to add it?
- <%= render "entry_method", type: @account.accountable, text: 'Enter account balance manually', icon: "keyboard" %> - <%= render "entry_method", type: @account.accountable, text: 'Securely link bank account with data provider (coming soon)', icon: "link-2", disabled: true %> - <%= render "entry_method", type: @account.accountable, text: 'Upload spreadsheet (coming soon)', icon: "sheet", disabled: true %> + <%= render "entry_method", type: @account.accountable, text: "Enter account balance manually", icon: "keyboard" %> + <%= render "entry_method", type: @account.accountable, text: "Securely link bank account with data provider (coming soon)", icon: "link-2", disabled: true %> + <%= render "entry_method", type: @account.accountable, text: "Upload spreadsheet (coming soon)", icon: "sheet", disabled: true %>
- Select <%= lucide_icon('corner-down-left', class: 'inline w-3 h-3')%> + Select <%= lucide_icon("corner-down-left", class: "inline w-3 h-3") %>
- Navigate <%= lucide_icon('arrow-up', class: 'inline w-3 h-3')%> <%= lucide_icon('arrow-down', class: 'inline w-3 h-3')%> + Navigate <%= lucide_icon("arrow-up", class: "inline w-3 h-3") %> <%= lucide_icon("arrow-down", class: "inline w-3 h-3") %>
@@ -59,20 +59,20 @@
<% else %>
- <%= link_to new_account_path(step: 'method', type: params[:type]), class: "flex w-8 h-8 shrink-0 grow-0 items-center justify-center rounded-lg bg-alpha-black-50 focus:outline-gray-300 focus:outline" do %> - <%= lucide_icon('arrow-left', class: 'text-gray-500 w-5 h-5') %> + <%= link_to new_account_path(step: "method", type: params[:type]), class: "flex w-8 h-8 shrink-0 grow-0 items-center justify-center rounded-lg bg-alpha-black-50 focus:outline-gray-300 focus:outline" do %> + <%= lucide_icon("arrow-left", class: "text-gray-500 w-5 h-5") %> <% end %> Add <%= @account.accountable.model_name.human.downcase %>
<%= form_with model: @account, url: accounts_path, scope: :account, html: { class: "m-5 mt-1 flex flex-col justify-between grow", data: { turbo: false } } do |f| %>
<%= f.hidden_field :accountable_type %> - <%= f.text_field :name, placeholder: t('accounts.new.name.placeholder'), required: 'required', label: t('accounts.new.name.label'), autofocus: true %> + <%= f.text_field :name, placeholder: t("accounts.new.name.placeholder"), required: "required", label: t("accounts.new.name.label"), autofocus: true %> <%= render "accounts/#{permitted_accountable_partial(@account.accountable_type)}", f: f %> - <%= f.money_field :balance_money, label: "Balance", required: 'required' %> + <%= f.money_field :balance_money, label: "Balance", required: "required" %>
<%= f.submit "Add #{@account.accountable.model_name.human.downcase}" %> <% end %> <% end %>
-<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/accounts/show.html.erb b/app/views/accounts/show.html.erb index 07ddb73f..48be2c56 100644 --- a/app/views/accounts/show.html.erb +++ b/app/views/accounts/show.html.erb @@ -23,15 +23,15 @@ <% end %> -
\ No newline at end of file +
diff --git a/app/views/shared/_custom_confirm_modal.html.erb b/app/views/shared/_custom_confirm_modal.html.erb index b18f5bb6..9c40e047 100644 --- a/app/views/shared/_custom_confirm_modal.html.erb +++ b/app/views/shared/_custom_confirm_modal.html.erb @@ -2,15 +2,15 @@
-

<%= t('custom_turbo_confirm.default.title') %>

+

<%= t("custom_turbo_confirm.default.title") %>

- <%= t('custom_turbo_confirm.default.body_html') %> + <%= t("custom_turbo_confirm.default.body_html") %>
- +
- \ No newline at end of file + diff --git a/app/views/shared/_line_chart.html.erb b/app/views/shared/_line_chart.html.erb index fb489c93..72c43d61 100644 --- a/app/views/shared/_line_chart.html.erb +++ b/app/views/shared/_line_chart.html.erb @@ -5,4 +5,4 @@

No data available for the selected period.

-<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/shared/_logo.html.erb b/app/views/shared/_logo.html.erb index 434e6558..efdd27bd 100644 --- a/app/views/shared/_logo.html.erb +++ b/app/views/shared/_logo.html.erb @@ -1 +1 @@ -<%= link_to image_tag("logomark.svg", class: 'w-auto h-12 mx-auto'), root_path, data: { turbo: false} %> \ No newline at end of file +<%= link_to image_tag("logomark.svg", class: "w-auto h-12 mx-auto"), root_path, data: { turbo: false} %> diff --git a/app/views/shared/_period_select.html.erb b/app/views/shared/_period_select.html.erb index f4260c51..b5b38f88 100644 --- a/app/views/shared/_period_select.html.erb +++ b/app/views/shared/_period_select.html.erb @@ -1,5 +1,5 @@ <%# locals: (value: 'last_30_days') -%> -<% options = [['7D', 'last_7_days'], ['1M', 'last_30_days'], ["1Y", "last_365_days"], ['All', 'all']] %> +<% options = [["7D", "last_7_days"], ["1M", "last_30_days"], ["1Y", "last_365_days"], ["All", "all"]] %>
-<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/shared/_trend_change.html.erb b/app/views/shared/_trend_change.html.erb index 7e8af716..c73e66bf 100644 --- a/app/views/shared/_trend_change.html.erb +++ b/app/views/shared/_trend_change.html.erb @@ -7,4 +7,4 @@ <%= styles[:symbol] %><%= format_money trend.value.abs %> (<%= lucide_icon(styles[:icon], class: "w-4 h-4 align-text-bottom inline") %><%= trend.percent %>%) <% end %> -

\ No newline at end of file +

diff --git a/app/views/transactions/_filter.html.erb b/app/views/transactions/_filter.html.erb index 6b613bde..3e22bbba 100644 --- a/app/views/transactions/_filter.html.erb +++ b/app/views/transactions/_filter.html.erb @@ -8,7 +8,7 @@
<% when "category" %>
-
+

<%= filter[:value].name %>

<% when "search" %> diff --git a/app/views/transactions/_list.html.erb b/app/views/transactions/_list.html.erb index b3ae0d58..f2057b70 100644 --- a/app/views/transactions/_list.html.erb +++ b/app/views/transactions/_list.html.erb @@ -31,4 +31,4 @@ <% end %> <% end %> -
\ No newline at end of file + diff --git a/app/views/transactions/_pagination.html.erb b/app/views/transactions/_pagination.html.erb index 2e76362a..a64b3bf5 100644 --- a/app/views/transactions/_pagination.html.erb +++ b/app/views/transactions/_pagination.html.erb @@ -1,15 +1,15 @@
<% if pagy.prev %> - <%= link_to 'Previous', pagy_url_for(pagy, pagy.prev), class: "relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50" %> + <%= link_to "Previous", pagy_url_for(pagy, pagy.prev), class: "relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50" %> <% else %> -
Previous
+
Previous
<% end %> <% if pagy.next %> - <%= link_to 'Next', pagy_url_for(pagy, pagy.next), class: "relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50" %> + <%= link_to "Next", pagy_url_for(pagy, pagy.next), class: "relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50" %> <% else %> -
Next
+
Next
<% end %>
@@ -22,7 +22,7 @@ <%= lucide_icon("chevron-left", class: "w-5 h-5 text-gray-500") %> <% end %> <% else %> -
+
<%= lucide_icon("chevron-left", class: "w-5 h-5 text-gray-200") %>
<% end %> @@ -48,7 +48,7 @@ <%= lucide_icon("chevron-right", class: "w-5 h-5 text-gray-500") %> <% end %> <% else %> -
+
<%= lucide_icon("chevron-right", class: "w-5 h-5 text-gray-200") %>
<% end %> diff --git a/app/views/transactions/_search_form.html.erb b/app/views/transactions/_search_form.html.erb index 771c7874..86bfb07d 100644 --- a/app/views/transactions/_search_form.html.erb +++ b/app/views/transactions/_search_form.html.erb @@ -43,4 +43,4 @@
<% end %> <% end %> -
\ No newline at end of file + diff --git a/app/views/transactions/_transaction_group.html.erb b/app/views/transactions/_transaction_group.html.erb index a1517ce0..f71b3486 100644 --- a/app/views/transactions/_transaction_group.html.erb +++ b/app/views/transactions/_transaction_group.html.erb @@ -1,7 +1,7 @@ <%# locals: (date:, transactions:) %>
-

<%= date.strftime('%b %d, %Y') %> · <%= transactions.size %>

+

<%= date.strftime("%b %d, %Y") %> · <%= transactions.size %>

<%= format_money -transactions.sum(&:amount_money) %>
diff --git a/app/views/transactions/categories/_menu.html.erb b/app/views/transactions/categories/_menu.html.erb index 9b2e49a7..73a1e588 100644 --- a/app/views/transactions/categories/_menu.html.erb +++ b/app/views/transactions/categories/_menu.html.erb @@ -8,7 +8,7 @@
- + <%= lucide_icon("search", class: "w-5 h-5 text-gray-500 ml-2 absolute inset-0 transform top-1/2 -translate-y-1/2") %>
@@ -21,7 +21,7 @@ <%= render partial: "transactions/categories/dropdown/row", locals: { category:, transaction: } %> <% end %>
-
+
diff --git a/app/views/transactions/categories/dropdown/_form.html.erb b/app/views/transactions/categories/dropdown/_form.html.erb index c595afac..87111231 100644 --- a/app/views/transactions/categories/dropdown/_form.html.erb +++ b/app/views/transactions/categories/dropdown/_form.html.erb @@ -18,11 +18,11 @@
-
+
<%= form.button "Create category", class: "flex text-sm font-medium items-center gap-2 text-gray-900 w-full rounded-lg p-2 hover:bg-gray-100" do %> <%= lucide_icon("plus", class: "w-5 h-5") %> <%= category.nil? ? "Create" : "Update" %> category <% end %>
-<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/transactions/search_form/_account_filter.html.erb b/app/views/transactions/search_form/_account_filter.html.erb index cdbdd5f0..c0d0625e 100644 --- a/app/views/transactions/search_form/_account_filter.html.erb +++ b/app/views/transactions/search_form/_account_filter.html.erb @@ -1,7 +1,7 @@ <%# locals: (form:) %>
- + <%= lucide_icon("search", class: "w-5 h-5 text-gray-500 absolute inset-y-0 left-2 top-1/2 transform -translate-y-1/2") %>
@@ -12,4 +12,4 @@
<% end %>
- \ No newline at end of file + diff --git a/app/views/transactions/search_form/_category_filter.html.erb b/app/views/transactions/search_form/_category_filter.html.erb index 02cd5127..4da1bc23 100644 --- a/app/views/transactions/search_form/_category_filter.html.erb +++ b/app/views/transactions/search_form/_category_filter.html.erb @@ -1,7 +1,7 @@ <%# locals: (form:) %>
- + <%= lucide_icon("search", class: "w-5 h-5 text-gray-500 absolute inset-y-0 left-2 top-1/2 transform -translate-y-1/2") %>
@@ -10,7 +10,7 @@ <%= form.check_box :category_id_in, { "data-auto-submit-form-target": "auto", multiple: true, class: "rounded-sm border-gray-300 text-indigo-600 shadow-xs focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50" }, transaction_category.id, nil %> <%= form.label :category_id_in, transaction_category.name, value: transaction_category.id, class: "text-sm text-gray-900" do %> <%= render partial: "transactions/categories/badge", locals: { name: transaction_category.name, color: transaction_category.color } %> - <%end%> + <% end %>
<% end %>
diff --git a/app/views/transactions/search_form/_search_filter.html.erb b/app/views/transactions/search_form/_search_filter.html.erb index 7a6d2ff1..0a2bed41 100644 --- a/app/views/transactions/search_form/_search_filter.html.erb +++ b/app/views/transactions/search_form/_search_filter.html.erb @@ -1,8 +1,8 @@ <%# locals: (form:) %>
- <%= form.search_field :category_name_or_account_name_or_name_cont, - placeholder: "Search transaction by name, category or amount", + <%= form.search_field :category_name_or_account_name_or_name_cont, + placeholder: "Search transaction by name, category or amount", class: "placeholder:text-sm placeholder:text-gray-500 relative pl-10 w-full border-none rounded-lg", "data-auto-submit-form-target": "auto" %> <%= lucide_icon("search", class: "w-5 h-5 text-gray-500 ml-2 absolute inset-0 transform top-1/2 -translate-y-1/2") %> -
\ No newline at end of file + diff --git a/app/views/transactions/show.html.erb b/app/views/transactions/show.html.erb index 06b6892e..2311657b 100644 --- a/app/views/transactions/show.html.erb +++ b/app/views/transactions/show.html.erb @@ -1,6 +1,6 @@ <%= sidebar_modal do %>

- <%=format_money @transaction.amount_money %> + <%= format_money @transaction.amount_money %> <%= @transaction.currency %>

<%= @transaction.date.strftime("%A %d %B") %> diff --git a/app/views/valuations/_form_row.html.erb b/app/views/valuations/_form_row.html.erb index 67614073..662979ea 100644 --- a/app/views/valuations/_form_row.html.erb +++ b/app/views/valuations/_form_row.html.erb @@ -6,8 +6,8 @@
- <%= f.date_field :date, required: 'required', class: "border border-alpha-black-200 bg-white rounded-lg shadow-xs min-w-[200px] px-3 py-1.5 text-gray-900 text-sm" %> - <%= f.number_field :value, required: 'required', placeholder: "0.00", class: "bg-white border border-alpha-black-200 rounded-lg shadow-xs text-gray-900 text-sm px-3 py-1.5 text-right" %> + <%= f.date_field :date, required: "required", class: "border border-alpha-black-200 bg-white rounded-lg shadow-xs min-w-[200px] px-3 py-1.5 text-gray-900 text-sm" %> + <%= f.number_field :value, required: "required", placeholder: "0.00", class: "bg-white border border-alpha-black-200 rounded-lg shadow-xs text-gray-900 text-sm px-3 py-1.5 text-right" %>
<%= link_to "Cancel", account_path(@valuation.account), class: "text-sm text-gray-900 hover:text-gray-800 font-medium px-3 py-1.5" %> diff --git a/app/views/valuations/edit.html.erb b/app/views/valuations/edit.html.erb index 3bd87775..d33a5454 100644 --- a/app/views/valuations/edit.html.erb +++ b/app/views/valuations/edit.html.erb @@ -2,7 +2,7 @@

Edit Valuation

<%= turbo_frame_tag dom_id(@valuation) do %> <%= form_with model: @valuation, url: valuation_path(@valuation), html: { class: "" } do |f| %> - <%= render 'form_row', f: f, form_icon: "pencil-line", submit_button_text: "Update" %> + <%= render "form_row", f: f, form_icon: "pencil-line", submit_button_text: "Update" %> <% end %> <% end %>
diff --git a/app/views/valuations/new.html.erb b/app/views/valuations/new.html.erb index 62c2239a..0aa59b24 100644 --- a/app/views/valuations/new.html.erb +++ b/app/views/valuations/new.html.erb @@ -2,7 +2,7 @@

Add Valuation: <%= @account.name %>

<%= turbo_frame_tag dom_id(Valuation.new) do %> <%= form_with model: [@account, @valuation], url: account_valuations_path(@account), html: { class: "" } do |f| %> - <%= render 'form_row', f: f, form_icon: "plus", submit_button_text: "Add" %> + <%= render "form_row", f: f, form_icon: "plus", submit_button_text: "Add" %> <% end %>
<% end %> diff --git a/bin/erblint b/bin/erblint new file mode 100755 index 00000000..63d662cf --- /dev/null +++ b/bin/erblint @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'erblint' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("erb_lint", "erblint")