Module: Ish::Utils
- Included in:
- Gallery, Gameui::Asset3d, Gameui::Map, Gameui::Marker, ImageAsset, UserProfile, Newsitem, Photo, Report, Video
- Defined in:
- lib/ish/utils.rb
Instance Method Summary collapse
Instance Method Details
#export ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/ish/utils.rb', line 4 def export out = {} %w| created_at updated_at |.map do |f| out[f] = send(f) end export_fields.map do |field| if field[-3..-1] == '_id' out[field] = send(field).to_s else out[field] = send(field) end end out[:_id] = id.to_s out.with_indifferent_access end |