Style fix

This commit is contained in:
Chris Blanchard 2015-08-20 16:35:25 +01:00
parent 67999187dc
commit 8074f0c3aa
5 changed files with 6 additions and 8 deletions

View file

@ -48,7 +48,7 @@ class Topic < ActiveRecord::Base
acts_as_readable
def self.recent_topics
Post.order('id desc').select('DISTINCT topic_id').limit(5).map(&:topic)
Post.order("id desc").select("DISTINCT topic_id").limit(5).map(&:topic)
end
def to_s

View file

@ -32,9 +32,7 @@ describe Topic do
before(:all) do
5.times do
topic = create :topic
3.times do
post = create :post, topic: topic
end
3.times { create :post, topic: topic }
end
end
it "returns 5 unique, most recently posted topics" do