Remove unused files

This commit is contained in:
Eugene Burmakin 2024-06-30 12:40:11 +02:00
parent 2c9a88aba4
commit 21cc53b78a
9 changed files with 1 additions and 97 deletions

View file

@ -1,16 +1,4 @@
<%= form_with model: import, class: "contents" do |form| %>
<% if import.errors.any? %>
<div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-lg mt-3">
<h2><%= pluralize(import.errors.count, "error") %> prohibited this import from being saved:</h2>
<ul>
<% import.errors.each do |error| %>
<li><%= error.full_message %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="form-control w-full max-w-xs">
<label class="label">
<span class="label-text">Select source</span>

View file

@ -1,17 +0,0 @@
<%= form_with(model: settings_user, class: "contents") do |form| %>
<% if settings_user.errors.any? %>
<div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-lg mt-3">
<h2><%= pluralize(settings_user.errors.count, "error") %> prohibited this settings_user from being saved:</h2>
<ul>
<% settings_user.errors.each do |error| %>
<li><%= error.full_message %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="inline">
<%= form.submit class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
</div>
<% end %>

View file

@ -1,2 +0,0 @@
<div id="<%= dom_id user %>">
</div>

View file

@ -1,8 +0,0 @@
<div class="mx-auto md:w-2/3 w-full">
<h1 class="font-bold text-4xl">Editing user</h1>
<%= render "form", settings_user: @settings_user %>
<%= link_to "Show this user", @settings_user, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
<%= link_to "Back to users", settings_users_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
</div>

View file

@ -1,21 +0,0 @@
<div class="w-full">
<% if notice.present? %>
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p>
<% end %>
<% content_for :title, "Users" %>
<div class="flex justify-between items-center">
<h1 class="font-bold text-4xl">Users</h1>
<%= link_to "New user", new_settings_user_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %>
</div>
<div id="settings_users" class="min-w-full">
<% @settings_users.each do |settings_user| %>
<%= render settings_user %>
<p>
<%= link_to "Show this user", settings_user, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
</p>
<% end %>
</div>
</div>

View file

@ -1,7 +0,0 @@
<div class="mx-auto md:w-2/3 w-full">
<h1 class="font-bold text-4xl">New user</h1>
<%= render "form", settings_user: @settings_user %>
<%= link_to "Back to users", settings_users_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
</div>

View file

@ -1,15 +0,0 @@
<div class="mx-auto md:w-2/3 w-full flex">
<div class="mx-auto">
<% if notice.present? %>
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p>
<% end %>
<%= render @settings_user %>
<%= link_to "Edit this user", edit_settings_user_path(@settings_user), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
<%= link_to "Back to users", settings_users_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
<div class="inline-block ml-2">
<%= button_to "Destroy this user", @settings_user, method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
</div>
</div>
</div>

View file

@ -9,7 +9,7 @@ Rails.application.routes.draw do
resources :settings, only: :index
namespace :settings do
resources :users
resources :users, only: :create
end
patch 'settings', to: 'settings#update'

14
db/schema.rb generated
View file

@ -14,20 +14,6 @@ ActiveRecord::Schema[7.1].define(version: 2024_06_30_093005) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "active_admin_comments", force: :cascade do |t|
t.string "namespace"
t.text "body"
t.string "resource_type"
t.bigint "resource_id"
t.string "author_type"
t.bigint "author_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["author_type", "author_id"], name: "index_active_admin_comments_on_author"
t.index ["namespace"], name: "index_active_admin_comments_on_namespace"
t.index ["resource_type", "resource_id"], name: "index_active_admin_comments_on_resource"
end
create_table "active_storage_attachments", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false