diff --git a/app/assets/stylesheets/comments.css b/app/assets/stylesheets/comments.css index bab3257ed..0e0966388 100644 --- a/app/assets/stylesheets/comments.css +++ b/app/assets/stylesheets/comments.css @@ -40,3 +40,9 @@ inline-size: 100%; flex-wrap: wrap; } + +.comment__body { + p:first-child { + margin-block-start: 0; + } +} diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb new file mode 100644 index 000000000..766995515 --- /dev/null +++ b/app/controllers/comments_controller.rb @@ -0,0 +1,2 @@ +class CommentsController < ApplicationController +end diff --git a/app/helpers/comments_helper.rb b/app/helpers/comments_helper.rb new file mode 100644 index 000000000..0ec9ca5f2 --- /dev/null +++ b/app/helpers/comments_helper.rb @@ -0,0 +1,2 @@ +module CommentsHelper +end diff --git a/app/models/comment.rb b/app/models/comment.rb new file mode 100644 index 000000000..cd4b57456 --- /dev/null +++ b/app/models/comment.rb @@ -0,0 +1,4 @@ +class Comment < ApplicationRecord + belongs_to :splat + belongs_to :creator, class_name: "User", default: -> { Current.user } +end diff --git a/app/models/splat.rb b/app/models/splat.rb index 3273ca19a..9a068bae0 100644 --- a/app/models/splat.rb +++ b/app/models/splat.rb @@ -1,6 +1,7 @@ class Splat < ApplicationRecord has_many :categorizations has_many :categories, through: :categorizations, dependent: :destroy + has_many :comments, dependent: :destroy belongs_to :creator, class_name: "User", default: -> { Current.user } diff --git a/app/models/user.rb b/app/models/user.rb index 0cc02e19b..98787ed1a 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -11,6 +11,10 @@ class User < ApplicationRecord self == Current.user end + def initials + name.scan(/\b\w/).join + end + def deactivate transaction do sessions.delete_all diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb new file mode 100644 index 000000000..f04cd89a4 --- /dev/null +++ b/app/views/comments/_comment.html.erb @@ -0,0 +1,13 @@ +
- -
- -
I'll be speaking in Chicago early next month at the ABA convention and they'll be sharing this resource with all State Bar Presidents. I mentioned Writebook in the intro towards the bottom. The platform is awesome!
-- -
Never mind, I nipped home and tried it on Browser Stack. It's working correctly on Windows with Edge, Chrome & Firefox.
-- -
If this is only happening to one site, and potentially has already resolved itself, then I'll just dig into this on Monday and see if I can find an explanation or a way to reproduce it. Hopefully this isn't a sign of something more common, but so far doesn't sound like it.
-But if you hear about something similar happening to anyone else, please flag it here and I'll look more urgently.
-+ <%= render @splat.comments %>