diff --git a/app/views/clients/_form.html.slim b/app/views/clients/_form.html.slim
index d908118..2289857 100644
--- a/app/views/clients/_form.html.slim
+++ b/app/views/clients/_form.html.slim
@@ -1,14 +1,14 @@
-= form_for(@client, html: { class: "form-horizontal", role: "form" }) do |f|
- - if @client.errors.any?
+= form_for(client, html: { class: "form-horizontal", role: "form" }) do |f|
+ - if client.errors.any?
.alert.alert-danger.alert-dismissable role="alert"
button.close type="button" data-dismiss="alert"
span aria-hidden="true"
| ×
span.sr-only
= t('close')
- h4= "#{t('errors.template.header', model: t('activerecord.models.client').mb_chars.capitalize, count: @client.errors.count)}"
+ h4= "#{t('errors.template.header', model: t('activerecord.models.client').mb_chars.capitalize, count: client.errors.count)}"
ul
- - @client.errors.full_messages.each do |msg|
+ - client.errors.full_messages.each do |msg|
li= msg
.form-group
= f.label :name, class: "col-sm-2 control-label"
diff --git a/app/views/clients/edit.html.slim b/app/views/clients/edit.html.slim
index 38c1f9e..7557412 100644
--- a/app/views/clients/edit.html.slim
+++ b/app/views/clients/edit.html.slim
@@ -1,4 +1,4 @@
-- provide(:title, 'Editing client')
+- provide(:title, t('editing_client'))
.page-header
= link_to clients_path, class: 'btn btn-default' do
@@ -10,4 +10,4 @@
h1
= t('editing_client')
-= render 'form'
+= render 'form', client: @client
diff --git a/app/views/clients/new.html.slim b/app/views/clients/new.html.slim
index 7df6fc9..42edf1c 100644
--- a/app/views/clients/new.html.slim
+++ b/app/views/clients/new.html.slim
@@ -1,4 +1,4 @@
-- provide(:title, 'New client')
+- provide(:title, t('new_client'))
.page-header
= link_to clients_path, class: 'btn btn-default' do
@@ -7,4 +7,4 @@
h1
= t('new_client')
-= render 'form'
+= render 'form', client: @client
diff --git a/app/views/loans/_form.html.slim b/app/views/loans/_form.html.slim
index ba45d35..72c5bbe 100644
--- a/app/views/loans/_form.html.slim
+++ b/app/views/loans/_form.html.slim
@@ -1,14 +1,14 @@
-= form_for(@loan, html: { class: "form-horizontal", role: "form" }) do |f|
- - if @loan.errors.any?
+= form_for(loan, html: { class: "form-horizontal", role: "form" }) do |f|
+ - if loan.errors.any?
.alert.alert-danger.alert-dismissable role="alert"
button.close type="button" data-dismiss="alert"
span aria-hidden="true"
| ×
span.sr-only
= t('close')
- h4= "#{t('errors.template.header', model: t('activerecord.models.loan').mb_chars.capitalize, count: @loan.errors.count)}"
+ h4= "#{t('errors.template.header', model: t('activerecord.models.loan').mb_chars.capitalize, count: loan.errors.count)}"
ul
- - @loan.errors.full_messages.each do |msg|
+ - loan.errors.full_messages.each do |msg|
li= msg
.form-group
= f.label :name, class: "col-sm-2 control-label"
diff --git a/app/views/loans/edit.html.slim b/app/views/loans/edit.html.slim
index 5588aad..a12b23a 100644
--- a/app/views/loans/edit.html.slim
+++ b/app/views/loans/edit.html.slim
@@ -1,4 +1,4 @@
-- provide(:title, 'Editing loan')
+- provide(:title, t('editing_loan'))
.page-header
= link_to loans_path, class: 'btn btn-default' do
@@ -10,4 +10,4 @@
h1
= t('editing_loan')
-= render 'form'
+= render 'form', loan: @loan
diff --git a/app/views/loans/new.html.slim b/app/views/loans/new.html.slim
index 0f000a6..5c97448 100644
--- a/app/views/loans/new.html.slim
+++ b/app/views/loans/new.html.slim
@@ -1,4 +1,4 @@
-- provide(:title, 'New loan')
+- provide(:title, t('new_loan'))
.page-header
= link_to loans_path, class: 'btn btn-default' do
@@ -7,4 +7,4 @@
h1
= t('new_loan')
-= render 'form'
+= render 'form', loan: @loan
diff --git a/app/views/payments/_form.html.slim b/app/views/payments/_form.html.slim
index d89e8ba..711f151 100644
--- a/app/views/payments/_form.html.slim
+++ b/app/views/payments/_form.html.slim
@@ -1,14 +1,14 @@
-= form_for(@payment, html: { class: "form-horizontal", role: "form" }) do |f|
- - if @payment.errors.any?
+= form_for(payment, html: { class: "form-horizontal", role: "form" }) do |f|
+ - if payment.errors.any?
.alert.alert-danger.alert-dismissable role="alert"
button.close type="button" data-dismiss="alert"
span aria-hidden="true"
| ×
span.sr-only
= t('close')
- h4= "#{t('errors.template.header', model: t('activerecord.models.payment').mb_chars.capitalize, count: @payment.errors.count)}"
+ h4= "#{t('errors.template.header', model: t('activerecord.models.payment').mb_chars.capitalize, count: payment.errors.count)}"
ul
- - @payment.errors.full_messages.each do |msg|
+ - payment.errors.full_messages.each do |msg|
li= msg
.form-group
= f.label :loan, class: "col-sm-2 control-label"
diff --git a/app/views/payments/edit.html.slim b/app/views/payments/edit.html.slim
index 33bfe99..7a19d7f 100644
--- a/app/views/payments/edit.html.slim
+++ b/app/views/payments/edit.html.slim
@@ -1,4 +1,4 @@
-- provide(:title, 'Editing payment')
+- provide(:title, t('editing_payment'))
.page-header
= link_to payments_path, class: 'btn btn-default' do
@@ -10,4 +10,4 @@
h1
= t('editing_payment')
-= render 'form'
+= render 'form', payment: @payment
diff --git a/app/views/payments/new.html.slim b/app/views/payments/new.html.slim
index 57e371a..a113f66 100644
--- a/app/views/payments/new.html.slim
+++ b/app/views/payments/new.html.slim
@@ -1,4 +1,4 @@
-- provide(:title, 'New payment')
+- provide(:title, t('new_payment'))
.page-header
= link_to payments_path, class: 'btn btn-default' do
@@ -7,4 +7,4 @@
h1
= t('new_payment')
-= render 'form'
+= render 'form', payment: @payment
diff --git a/app/views/tariffs/_form.html.slim b/app/views/tariffs/_form.html.slim
index 2f42f64..a0af053 100644
--- a/app/views/tariffs/_form.html.slim
+++ b/app/views/tariffs/_form.html.slim
@@ -1,14 +1,14 @@
-= form_for(@tariff, html: { class: "form-horizontal", role: "form" }) do |f|
- - if @tariff.errors.any?
+= form_for(tariff, html: { class: "form-horizontal", role: "form" }) do |f|
+ - if tariff.errors.any?
.alert.alert-danger.alert-dismissable role="alert"
button.close type="button" data-dismiss="alert"
span aria-hidden="true"
| ×
span.sr-only
= t('close')
- h4= "#{t('errors.template.header', model: t('activerecord.models.tariff').mb_chars.capitalize, count: @tariff.errors.count)}"
+ h4= "#{t('errors.template.header', model: t('activerecord.models.tariff').mb_chars.capitalize, count: tariff.errors.count)}"
ul
- - @tariff.errors.full_messages.each do |msg|
+ - tariff.errors.full_messages.each do |msg|
li= msg
.form-group
= f.label :name, class: "col-sm-2 control-label"
diff --git a/app/views/tariffs/edit.html.slim b/app/views/tariffs/edit.html.slim
index 2ada672..d7d57cc 100644
--- a/app/views/tariffs/edit.html.slim
+++ b/app/views/tariffs/edit.html.slim
@@ -1,4 +1,4 @@
-- provide(:title, 'Editing tariff')
+- provide(:title, t('editing_tariff'))
.page-header
= link_to tariffs_path, class: 'btn btn-default' do
@@ -10,4 +10,4 @@
h1
= t('editing_tariff')
-= render 'form'
+= render 'form', tariff: @tariff
diff --git a/app/views/tariffs/new.html.slim b/app/views/tariffs/new.html.slim
index 0f1b2a2..d52673c 100644
--- a/app/views/tariffs/new.html.slim
+++ b/app/views/tariffs/new.html.slim
@@ -1,4 +1,4 @@
-- provide(:title, 'New tariff')
+- provide(:title, t('new_tariff'))
.page-header
= link_to tariffs_path, class: 'btn btn-default' do
@@ -7,4 +7,4 @@
h1
= t('new_tariff')
-= render 'form'
+= render 'form', tariff: @tariff