lib/doggy/cli/edit.rb in doggy-2.0.34 vs lib/doggy/cli/edit.rb in doggy-2.0.35

- old
+ new

@@ -38,11 +38,11 @@ Doggy.ui.say "run, rabbit run / dig that hole, forget the sun / and when at last the work is done / don't sit down / it's time to dig another one" end end def fork(resource) - salt = random_word + salt = Doggy.random_word forked_resource = resource.dup forked_resource.id = nil forked_resource.refute_read_only! if resource.class.to_s.downcase =~ /dashboard/ forked_resource.title = "[#{ salt }] " + forked_resource.title @@ -54,12 +54,8 @@ else raise StandardError.new('Unknown resource type, cannot edit.') end forked_resource.save forked_resource - end - - def random_word - (0...12).map { (65 + rand(26)).chr.downcase }.join end end end