-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Blair Anderson
committed
Mar 8, 2015
1 parent
ba9203b
commit 35a67b0
Showing
6 changed files
with
48 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
class ItemSerializer < ActiveModel::Serializer | ||
# self.per_page = 1 | ||
|
||
has_scope :newest, type: :boolean | ||
has_scope :disabled, type: :boolean | ||
# has_scope :by_degree | ||
# has_scope :by_period, :using => [:started_at, :ended_at], :type => :hash | ||
|
||
|
||
# filter #(optional) - Filters are used to narrow down the events used in an analysis request based on event property values. | ||
# timeframe #(optional) - A Timeframe specifies the events to use for analysis based on a window of time. | ||
# property_names #(optional) - A URL-encoded array of strings containing properties you wish to extract. If this parameter is omitted, all properties will be returned. | ||
|
||
# cache key: 'posts', expires_in: 3.hours | ||
attributes :id, :title, :content, :url, :created_at, :updated_at | ||
|
||
# has_many :comments | ||
# | ||
# url :post | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ActiveApi::Engine.config.route_config = { | ||
resources: [:items, :users] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters