removed comments and Fixed Issue #184

This commit is contained in:
cktricky
2016-04-19 08:43:18 -04:00
parent fafe94b571
commit 7f5af27478
10 changed files with 2 additions and 72 deletions
-6
View File
@@ -15,12 +15,6 @@ class Benefits < ActiveRecord::Base
end
end
=begin
def self.make_backup(file, data_path, full_file_name)
FileUtils.cp "#{full_file_name}", "#{data_path}/bak#{Time.zone.now.to_i}_#{file.original_filename}"
end
=end
def self.silence_streams(*streams)
on_hold = streams.collect { |stream| stream.dup }
streams.each do |stream|
+1 -18
View File
@@ -6,12 +6,7 @@ class User < ActiveRecord::Base
:length => {:within => 6..40},
:on => :create,
:if => :password
=begin
validates :password, :presence => true,
:confirmation => true,
:if => :password,
:format => {:with => /\A.*(?=.{10,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[\@\#\$\%\^\&\+\=]).*\z/}
=end
validates_presence_of :email
validates_uniqueness_of :email
validates_format_of :email, :with => /.+@.+\..+/i
@@ -61,18 +56,6 @@ class User < ActiveRecord::Base
return auth
end
=begin
# More secure version, still lacking a decent hashing routine, this is for timing attack prevention
def self.authenticate(email, password)
user = find_by_email(email) || User.new(:password => "")
if Rack::Utils.secure_compare(user.password, Digest::MD5.hexdigest(password))
return user
else
raise "Incorrect username or password"
end
end
=end
def assign_user_id
unless @skip_user_id_assign.present? || self.user_id.present?
user = User.order("user_id").last