mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 20:36:21 +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
|
||||
@interval ||= begin
|
||||
i = params[:interval]&.to_sym
|
||||
Stat::INTERVALS.include?(i) ? i : :day
|
||||
Stat::INTERVALS.include?(i) ? i : Stat::INTERVALS.first
|
||||
end
|
||||
end
|
||||
|
||||
# @return [Symbol]
|
||||
def resource
|
||||
@resource ||= begin
|
||||
r = params[:resource].to_sym
|
||||
Stat::RESOURCES.include?(r) ? r : :builds
|
||||
Stat::RESOURCES.include?(r) ? r : Stat::RESOURCES.first
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue