lib/vedeu/repositories/repository.rb in vedeu-0.6.32 vs lib/vedeu/repositories/repository.rb in vedeu-0.6.33
- old
+ new
@@ -60,11 +60,11 @@
# # Fetch the names of the interfaces belonging to this group.
# Vedeu.groups.by_name(name)
#
# @param name [String|Symbol] The name of the stored model.
# @return [void]
- def by_name(name)
- name ||= Vedeu.focus
+ def by_name(name = Vedeu.focus)
+ name = present?(name) ? name : Vedeu.focus
return find(name) if registered?(name)
null_model.new(name: name)
end