module JsonFields::ApplicationHelper

Public Instance Methods

json_field(object_name, method, options = {}) click to toggle source
# File lib/json_fields/application_helper.rb, line 4
def json_field(object_name, method, options = {})
  klass = options[:object].class
  if options[:class].blank?
    options[:class] = 'json-field'
  else
    options[:class] += ' json-field'
  end
  klass.json_fields[method].template(object_name, method, options)
end