lib/vedeu/repositories/repository.rb in vedeu-0.7.4 vs lib/vedeu/repositories/repository.rb in vedeu-0.8.0

- old
+ new

@@ -65,21 +65,11 @@ def by_name(name = nil) name = present?(name) ? name : Vedeu.focus return find(name) if registered?(name) - attrs = if null_attributes.any? - null_attributes.merge!(name: name) - - else - { - name: name - } - - end - - null_model.new(attrs) + null_model.new(null_attributes.merge(name: name)) if null_model? end # Return the model for the interface currently in focus. # # @return [String|NilClass] @@ -141,10 +131,10 @@ # Returns the storage with the named model removed, or false # when the model does not exist. # # @param name [String|Symbol] - # @return [Hash|FalseClass] + # @return [Hash|Boolean] def remove(name) return false if empty? return false unless registered?(name) storage.delete(name)