lib/ki/helpers.rb in ki-0.4.4 vs lib/ki/helpers.rb in ki-0.4.5
- old
+ new
@@ -32,9 +32,19 @@
e.delete(:_id)
end
e
end
end
+
+ def present?
+ !nil? && !empty?
+ end
+end
+
+class NilClass
+ def present?
+ false
+ end
end
module Ki
module Helpers
include Middleware::Helpers::View