lib/modules/user.rb in codebreaker_karolina-0.1.4 vs lib/modules/user.rb in codebreaker_karolina-0.1.5
- old
+ new
@@ -11,10 +11,8 @@
end
private
def valid?(name)
- return true if name.match(/[A-Za-z0-9_]{3,20}/)
-
- false
+ !!name[/\A[A-Za-z0-9]{3,20}\z/]
end
end