lib/ayadn/view.rb in ayadn-1.2.0 vs lib/ayadn/view.rb in ayadn-1.2.1
- old
+ new
@@ -280,11 +280,15 @@
if options[:filter] == true # only if this option is true in Action (only global for now)
unless Settings.options[:nicerank].nil? #in case config file not initialized
if Settings.options[:nicerank][:filter] == true
filtered = {}
posts.each do |id,content|
- (next if content[:nicerank] == false) if Settings.options[:nicerank][:filter_unranked] == true
- next if content[:nicerank] < Settings.options[:nicerank][:threshold]
+ if Settings.options[:nicerank][:filter_unranked] == true
+ next if content[:nicerank] == false
+ end
+ unless content[:nicerank] == false
+ next if content[:nicerank] < Settings.options[:nicerank][:threshold]
+ end
filtered[id] = content
end
return filtered
end
return posts