1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-31 11:35:45 +00:00

Moved api call to a service

This commit is contained in:
2016-03-02 13:34:41 +00:00
parent 459585fce2
commit 817e1fb0c1
6 changed files with 35 additions and 20 deletions

View File

@@ -12,4 +12,9 @@ class ApiController < ApplicationController
def tournament
@tournament = Tournament.where(:id => params[:tournament]).includes(:schools,:weights,:mats,:matches,:user,:wrestlers).first
end
def newTournament
@tournament = Tournament.new(JSON.parse(params[:tournament]))
@tournament.save
end
end