Module: Webs::CommentsOrder

Defined in:
lib/config/webs_constants.rb

Constant Summary collapse

DESC =
0
ASC =
1
VIEWS =
[[DESC, "Newest first (default)"], [ASC, "Oldest first"]]
SELECT_OPTIONS =
VIEWS.map { |val, disp| [disp, val] }
VAL_LIST =
VIEWS.map {|val, disp| val}

Class Method Summary collapse

Class Method Details

.val_to_str(val) ⇒ Object



63
64
65
# File 'lib/config/webs_constants.rb', line 63

def self.val_to_str(val)
  val.to_i == ASC ? "ASC": "DESC"
end