Skip to content
代码片段 群组 项目
提交 5ab18562 编辑于 作者: Jakub Troszok's avatar Jakub Troszok
浏览文件

Fixing requests tests.

上级 4426bc18
No related branches found
No related tags found
无相关合并请求
......@@ -59,7 +59,7 @@ class User < ActiveRecord::Base
before_validation :generate_password, :on => :create
def generate_password
if self.force_random_password == true
if self.force_random_password
self.password = self.password_confirmation = Devise.friendly_token.first(8)
end
end
......
......@@ -23,7 +23,7 @@
-if f.object.new_record?
.clearfix
= f.label :admin, :class => "checkbox" do
= f.check_box :force_random_password
= f.check_box :force_random_password, {}, true, nil
%span Generate random password
%div.password-fields
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册