mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-05-12 00:20:58 +00:00
Cache team scores
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
class School < ActiveRecord::Base
|
class School < ActiveRecord::Base
|
||||||
belongs_to :tournament
|
belongs_to :tournament, touch: true
|
||||||
has_many :wrestlers, dependent: :destroy
|
has_many :wrestlers, dependent: :destroy
|
||||||
has_many :deductedPoints, through: :wrestlers
|
has_many :deductedPoints, through: :wrestlers
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
<% cache ["team_scores", @tournament] do %>
|
||||||
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" , :class=>"btn btn-default"%>
|
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" , :class=>"btn btn-default"%>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
@@ -20,3 +21,4 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<% end %>
|
||||||
Reference in New Issue
Block a user