Class: UserLog
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- UserLog
- Defined in:
- lib/ting_model/user_log.rb
Instance Method Summary collapse
-
#level_disp ⇒ Object
等级显示css效果.
-
#state_disp ⇒ Object
是否断更css效果.
Instance Method Details
#level_disp ⇒ Object
等级显示css效果
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/ting_model/user_log.rb', line 6 def level_disp case self.level when 2 "label-success" when 3 "label-warning" when 4 "label-important" when 5 "label-info" when 6 "label-inverse" else "" end end |
#state_disp ⇒ Object
是否断更css效果
24 25 26 27 28 29 30 31 |
# File 'lib/ting_model/user_log.rb', line 24 def state_disp case self.state when true "info" when false "success" end end |