Module: HoboJqueryHelper

Defined in:
app/helpers/hobo_jquery_helper.rb

Instance Method Summary collapse

Instance Method Details

#data_rapid(tag, options = {}, attributes = {}) ⇒ Object



2
3
4
5
6
7
8
9
10
# File 'app/helpers/hobo_jquery_helper.rb', line 2

def data_rapid(tag, options = {}, attributes = {})
  if attributes['data_rapid']
    hash = ActiveSupport::JSON.decode(attributes['data_rapid'])
  else
    hash = {}
  end
  hash[tag] = options
  hash.to_json
end