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
{ | |
"data": { | |
"type": "profile", | |
"relationships": { | |
"educations": { | |
"data": [ | |
{ | |
"type": "profile/education", | |
"temp-id": 0, | |
"method": "create" |
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
```ruby | |
class User | |
embeds_many :attacker_performance | |
embeds_many :defender_performance | |
has_many :matches_as_attacker | |
has_many :matches_as_defender | |
end | |
class AttackerPerformance | |
embedded_in :user |
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
# Background : jsonapi-powered search controller | |
class MySearchController < JsonapiPoweredController | |
jsonapi resource: ::Public::Search::ProfessionalResource | |
def index | |
render_jsonapi(search_scope) | |
end | |
def search_scope | |
Searcher::SearchScopeProxy.new( | |
collection: Professional, |
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
// Google Analytics code to work with Turbolniks 5 | |
this.GoogleAnalytics = (function() { | |
function GoogleAnalytics() {} | |
GoogleAnalytics.load = function() { | |
var firstScript, ga; | |
window._gaq = []; | |
window._gaq.push(["_setAccount", GoogleAnalytics.analyticsId()]); | |
window._gaq.push(['_setAllowAnchor', true]); |
NewerOlder