Fix coding standards in application files
This commit is contained in:
@@ -10,7 +10,7 @@ class Sound < ActiveRecord::Base
|
||||
"#{Rails.configuration.sounds_path}/#{sha256}"
|
||||
end
|
||||
|
||||
def file=(file)
|
||||
def file= file
|
||||
self.sha256 = Digest::SHA256.file(file.path).hexdigest
|
||||
FileUtils.cp file.path, path
|
||||
self.mime_type = file.content_type
|
||||
|
@@ -3,8 +3,8 @@ class Track < ActiveRecord::Base
|
||||
|
||||
validates_presence_of :name
|
||||
|
||||
def file=(file)
|
||||
sounds.build(file: file)
|
||||
def file= file
|
||||
sounds.build file: file
|
||||
end
|
||||
|
||||
def sound
|
||||
|
@@ -15,12 +15,12 @@ class User < ActiveRecord::Base
|
||||
confirmation: true
|
||||
validates_presence_of :password_hash
|
||||
|
||||
def password=(plain_password)
|
||||
def password= plain_password
|
||||
@password = plain_password
|
||||
self.password_hash = Password.create(plain_password)
|
||||
end
|
||||
|
||||
def authenticate?(password)
|
||||
def authenticate? password
|
||||
Password.new(password_hash) == password
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user