rostra 0.1.20 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,5 @@
|
|
1
1
|
module Rostra
|
2
2
|
class Question < ActiveRecord::Base
|
3
|
-
include Rostra::TimestampObserver
|
4
3
|
extend FriendlyId
|
5
4
|
|
6
5
|
belongs_to :user
|
@@ -35,12 +34,6 @@ module Rostra
|
|
35
34
|
@answer_count = answers.count
|
36
35
|
end
|
37
36
|
|
38
|
-
# The last time the question has had any activity (i.e. commment, answer, etc).
|
39
|
-
#
|
40
|
-
def active_at
|
41
|
-
updated_at || created_at
|
42
|
-
end
|
43
|
-
|
44
37
|
private
|
45
38
|
|
46
39
|
def create_question_following
|
@@ -39,7 +39,7 @@
|
|
39
39
|
<%= strip_tags(question.details) %>
|
40
40
|
<% end %>
|
41
41
|
</div>
|
42
|
-
<div class="timestamp">active <%= time_ago_in_words(question.active_at) %> ago</div>
|
42
|
+
<div class="timestamp">active <%= time_ago_in_words(question.active_at || question.updated_at) %> ago</div>
|
43
43
|
<%= tag_list(question) %>
|
44
44
|
</div>
|
45
45
|
<div class="clear"></div>
|
data/lib/rostra/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: rostra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.21
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Cory Schires
|
@@ -570,6 +570,7 @@ files:
|
|
570
570
|
- db/migrate/20111106162542_add_votes_count_to_rostra_answers.rb
|
571
571
|
- db/migrate/20111106164824_add_votes_count_to_rostra_questions.rb
|
572
572
|
- db/migrate/20111113220522_add_slug_to_questions.rb
|
573
|
+
- db/migrate/20111115213534_add_active_at_to_questions.rb
|
573
574
|
- lib/generators/rostra/install_generator.rb
|
574
575
|
- lib/generators/rostra/templates/app/helpers/rostra/application_helper.rb
|
575
576
|
- lib/generators/rostra/templates/config/initializers/rostra.rb
|