Sha256: 28701ffe20144c2b6e5517ce5f610b4c445219a2e20b9f9f3c5b540a6b37a6e0
Contents?: true
Size: 414 Bytes
Versions: 14
Compression:
Stored size: 414 Bytes
Contents
module JavascriptLab module ViewHelpers def mark_selected(value, input) return 'selected' if value == input '' end def create_option(key,value) selected = mark_selected(key,params[:j]) output = [] output << "<option value='/?j=#{key}' #{selected}>" output << value output << '</option>' output.join end end end
Version data entries
14 entries across 14 versions & 1 rubygems