Class: Content

Inherits:
ApplicationRecord show all
Includes:
Syncable, WithDescription, WithLocale, WithName, WithSlug, WithUsages
Defined in:
app/models/content.rb

Direct Known Subclasses

Book, Guide, Topic

Instance Method Summary collapse

Methods included from WithUsages

#usage_in_organization, #usage_in_organization_of_type

Methods included from WithSlug

#rebase!, #rebased_dup, #slug_parts

Methods included from WithDescription

#description_teaser

Methods included from Syncable

#platform_class_name, #sync_key

Methods inherited from ApplicationRecord

aggregate_of, all_except, defaults, numbered, #save, #save_and_notify!, #save_and_notify_changes!, serialize_symbolized_hash_array, #update_and_notify!, update_or_create!, whitelist_attributes

Instance Method Details

#to_resource_hObject



11
12
13
# File 'app/models/content.rb', line 11

def to_resource_h
  as_json(only: [:name, :slug, :description, :locale]).symbolize_keys
end