class Olelo::Attributes::Attribute::Suggestions
Public Instance Methods
field_tag(attr)
click to toggle source
# File lib/olelo/attributes.rb, line 119 def field_tag(attr) %{<input class="observe" type="text" id="#{key}" name="#{key}" value="#{escape_html(values[attr] || attr)}"/> <script type="text/javascript"> $('##{key}').combobox({ source: #{escape_javascript MultiJson.dump(values.values.sort)} }); </script>} end
inverted_values()
click to toggle source
# File lib/olelo/attributes.rb, line 131 def inverted_values @inverted_values ||= values.invert end
parse(params)
click to toggle source
# File lib/olelo/attributes.rb, line 126 def parse(params) value = params[key] inverted_values[value] || value if !value.blank? end