Merge b9a2a80a75 into 24f0625be1
This commit is contained in:
commit
8384f7a00e
3 changed files with 82 additions and 1 deletions
|
|
@ -119,6 +119,73 @@ class Conference < ActiveRecord::Base
|
|||
result
|
||||
end
|
||||
|
||||
##
|
||||
# Builds out the model for returning a json response
|
||||
#
|
||||
#
|
||||
def as_json(_options={})
|
||||
super(
|
||||
only: [
|
||||
:description,
|
||||
:end_date,
|
||||
:logo,
|
||||
:short_title,
|
||||
:start_date,
|
||||
:title,
|
||||
],
|
||||
include: {
|
||||
difficulty_levels: {
|
||||
only: [
|
||||
:description,
|
||||
:id,
|
||||
:title,
|
||||
]
|
||||
},
|
||||
event_types: {
|
||||
only: [
|
||||
:description,
|
||||
:id,
|
||||
:length,
|
||||
:title,
|
||||
]
|
||||
},
|
||||
rooms: {
|
||||
only: [
|
||||
:name,
|
||||
:size,
|
||||
],
|
||||
include: {
|
||||
events: {
|
||||
only: [
|
||||
:abstract,
|
||||
:description,
|
||||
:difficulty_level_id,
|
||||
:event_type_id,
|
||||
:guid,
|
||||
:is_highlight,
|
||||
:require_registration,
|
||||
:start_time,
|
||||
:subtitle,
|
||||
:title,
|
||||
:track_id,
|
||||
],
|
||||
methods: [
|
||||
:speaker_names,
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
tracks: {
|
||||
only: [
|
||||
:description,
|
||||
:id,
|
||||
:name,
|
||||
]
|
||||
},
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
##
|
||||
# Checks if the user is registered to the conference
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue