Created
March 18, 2020 14:53
-
-
Save agungsetiawan/d8d248d8bec7d904f6faab39f04d7b0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AssetType < ApplicationRecord | |
has_many :asset_inventories | |
#some codes omitted | |
def accuracy_status | |
if accuracy > 100 | |
'warning' | |
elsif accuracy >= 80 && accuracy <= 100 | |
'success' | |
else accuracy < 80 | |
'danger' | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment