komagata/lokka — Issue #120: Recent entries side bar
Author: yagitoshiro
Created: 2011-11-10 11:54:34+00:00
State: open

I'm so sorry to bother you but I'm now at my customer's office and unable to do those git things so please allow me to create this issue. The entry model's recent should exclude drafts. Thank you.

diff --git a/lib/lokka/entry.rb b/lib/lokka/entry.rb
index 32358a8..cb7cfb6 100644
--- a/lib/lokka/entry.rb
+++ b/lib/lokka/entry.rb
@@ -99,7 +99,7 @@ class Entry
end

def recent(count = 5)
- all(:limit => count)
+ all(:draft => false, :limit => count)
end

def published