mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 22:56:22 +00:00
parametros por defecto
This commit is contained in:
parent
0754e29a5a
commit
7e575372cf
1 changed files with 3 additions and 2 deletions
|
@ -162,14 +162,15 @@ class StatsController < ApplicationController
|
||||||
def interval
|
def interval
|
||||||
@interval ||= begin
|
@interval ||= begin
|
||||||
i = params[:interval]&.to_sym
|
i = params[:interval]&.to_sym
|
||||||
Stat::INTERVALS.include?(i) ? i : :day
|
Stat::INTERVALS.include?(i) ? i : Stat::INTERVALS.first
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# @return [Symbol]
|
||||||
def resource
|
def resource
|
||||||
@resource ||= begin
|
@resource ||= begin
|
||||||
r = params[:resource].to_sym
|
r = params[:resource].to_sym
|
||||||
Stat::RESOURCES.include?(r) ? r : :builds
|
Stat::RESOURCES.include?(r) ? r : Stat::RESOURCES.first
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue