Добавление кнопки выхода, Изменение главной страницы на home, Выделение отдельного контроллера под организацию
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user