From 571110e9eb04f70beb69a3c6a93e77fa49e6a55c Mon Sep 17 00:00:00 2001 From: albert Date: Thu, 15 Sep 2011 18:12:48 -0400 Subject: [PATCH] fixes #71: Comment spoiler function not working --- app/assets/stylesheets/application.css.scss | 15 +++++++++++++++ app/models/post.rb | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index c916e85a7..d68e13553 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -137,6 +137,21 @@ h3 { font-size: $h3_size; } +.spoiler { + color: black; + background: black; + cursor: text; + display: block; +} + +.spoiler a { + color: black; +} + +.spoiler:hover { + color: white; +} + div.prose { h1, h2, h3 { line-height: 1em; diff --git a/app/models/post.rb b/app/models/post.rb index eebe7e329..31e0a074e 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -24,7 +24,7 @@ class Post < ActiveRecord::Base has_many :versions, :class_name => "PostVersion", :dependent => :destroy, :order => "post_versions.id ASC" has_many :votes, :class_name => "PostVote", :dependent => :destroy has_many :notes, :dependent => :destroy - has_many :comments + has_many :comments, :order => "comments.id" has_many :children, :class_name => "Post", :foreign_key => "parent_id", :order => "posts.id" has_many :disapprovals, :class_name => "PostDisapproval" validates_uniqueness_of :md5