Добавление кнопки выхода, Изменение главной страницы на home, Выделение отдельного контроллера под организацию

This commit is contained in:
ARLakhin
2026-03-26 00:45:44 +03:00
parent df4c307e24
commit 853b82660f
14 changed files with 169 additions and 27 deletions
+7 -15
View File
@@ -1,19 +1,11 @@
class WelcomeController < ApplicationController
def index
organizations = Organization.all
@info_about_organisations = organizations.each_with_object({}) do |org, hash|
hash[org.id] = {
"ИНН" => org.inn,
"Полное наименование юридического лица" => org.full_name,
"КПП" => org.kpp,
"Код по ОКПО" => org.okpo,
"Форма собственности (по ОКФС)" => org.okfs,
"Организационно-правовая форма (по ОКОПФ)" => org.okopf,
"Вид экономической деятельности по ОКВЭД 2" => org.okved2,
"Местонахождение (адрес)" => org.address
}
def home
if logged_in?
if @current_user.present?
redirect_to '/organisations/index'
else
render_error
end
end
end
end