9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/generators/devise_authy/devise_authy_generator.rb', line 9
def inject_devise_authy_content
path = File.join("app","models","#{file_path}.rb")
if File.exists?(path) &&
!File.read(path).include?("authy_authenticatable")
inject_into_file(path,
"authy_authenticatable, :",
:after => "devise :")
end
if File.exists?(path) &&
!File.read(path).include?(":authy_id")
inject_into_file(path,
":authy_id, :last_sign_in_with_authy, ",
:after => "attr_accessible ")
end
end
|