Method: Item#to_json

Defined in:
app/models/item.rb

#to_json(options = {}) ⇒ Object



121
122
123
124
125
126
127
128
129
# File 'app/models/item.rb', line 121

def to_json options = {}
  options = options.symbolize_keys
  options[:only] = ((options[:only] || []) + ALLOWED_KEYS).uniq

  # TODO3 files
  # options[:methods] = ((options[:methods] || []) + [:icon_url]).uniq

  super options
end