lib/faceted/presenter.rb in faceted-0.1.2 vs lib/faceted/presenter.rb in faceted-0.1.3

- old
+ new

@@ -80,10 +80,10 @@ # Instance methods ======================================================= def initialize(args={}) self.id = args[:id] self.initialize_with_object - ! args.empty && args.symbolize_keys.delete_if{|k,v| v.nil?}.each{|k,v| self.send("#{k}=", v) if self.respond_to?("#{k}=") && ! v.blank? } + ! args.empty? && args.symbolize_keys.delete_if{|k,v| v.nil?}.each{|k,v| self.send("#{k}=", v) if self.respond_to?("#{k}=") && ! v.blank? } self.errors = [] self.success = true end def initialize_with_object