2022-12-07 17:52:27 -05:00
|
|
|
class Item < Sequel::Model
|
|
|
|
|
2022-12-08 01:32:41 -05:00
|
|
|
one_to_many :item_comments
|
2022-12-07 17:52:27 -05:00
|
|
|
|
2022-12-17 23:43:26 -05:00
|
|
|
def getLink()
|
|
|
|
return "/item/#{self.id}"
|
|
|
|
end
|
|
|
|
|
2022-12-09 13:44:43 -05:00
|
|
|
def type_selected?(option)
|
|
|
|
if self.type == option
|
|
|
|
return 'selected'
|
|
|
|
else
|
|
|
|
return ''
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2022-12-07 17:52:27 -05:00
|
|
|
end
|