muck-users 0.1.13 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/controllers/muck/users_controller.rb +3 -1
- data/locales/en.yml +1 -0
- data/muck-users.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
@@ -112,8 +112,10 @@ class Muck::UsersController < ApplicationController
|
|
112
112
|
|
113
113
|
def is_login_available
|
114
114
|
result = t('muck.users.username_not_available')
|
115
|
-
if params[:user_login]
|
115
|
+
if params[:user_login].nil?
|
116
116
|
result = ''
|
117
|
+
elsif params[:user_login].empty?
|
118
|
+
result = t('muck.users.login_empty')
|
117
119
|
elsif !User.login_exists?(params[:user_login])
|
118
120
|
@user = User.new(:login => params[:user_login])
|
119
121
|
if !@user.validate_attributes(:only => [:login])
|
data/locales/en.yml
CHANGED
@@ -24,6 +24,7 @@ en:
|
|
24
24
|
email_available: "Email available"
|
25
25
|
email_invalid: "Invalid email"
|
26
26
|
email_empty: "Please enter an email address"
|
27
|
+
login_empty: "Please enter a login"
|
27
28
|
username: Username
|
28
29
|
username_help: "You can use between 6 and 20 characters. If the name you want isn't available try adding numbers or punctuation."
|
29
30
|
password: Password
|
data/muck-users.gemspec
CHANGED