Commit 48a0c6a2 authored by tykayn's avatar tykayn

hoping groups properties

parent cd58e7c0
$no-columns-breakpoint: 600px;
table{
thead{
th{
font-weight: strong;
font-weight: 800;
background: $ui-highlight-color;
}
}
td{
td, th{
padding: 1rem;
}
a{
@extend .text-btn
}
}
.table-responsive{
width: 100%;
......
......@@ -11,6 +11,7 @@
%th Createat
%th Visibility
%th Creator ID
%th Statuses count
%th
%th
%th
......@@ -22,6 +23,7 @@
%td= user_group.created_at
%td= user_group.visibility
%td= user_group.account_id
%td= "0"
%td= link_to 'Show', user_group
%td= link_to 'Edit', edit_user_group_path(user_group)
%td= link_to 'Destroy', user_group, :method => :delete, :data => { :confirm => 'Are you sure?' }
......
......@@ -6,7 +6,19 @@ class CreateUserGroups < ActiveRecord::Migration[5.2]
t.string :visibility
t.integer :account_id
t.integer :creator_id
t.integer :statuses_count
has_many :accounts, foreign_key: :domain, primary_key: :domain
has_many :note, foreign_key: :domain, primary_key: :domain
has_many :statuses, inverse_of: :account, dependent: :destroy
has_many :favourites, inverse_of: :account, dependent: :destroy
has_many :mentions, inverse_of: :account, dependent: :destroy
has_many :notifications, inverse_of: :account, dependent: :destroy
has_many :conversations, class_name: 'AccountConversation', dependent: :destroy, inverse_of: :account
has_many :scheduled_statuses, inverse_of: :account, dependent: :destroy
# Pinned statuses
has_many :status_pins, inverse_of: :account, dependent: :destroy
has_many :pinned_statuses, -> { reorder('status_pins.created_at DESC') }, through: :status_pins, class_name: 'Status', source: :status
t.timestamps
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment