app/strategies/pending_reservation_finder.rb
# Find the manageable seasons of the given user
#
Find the manageable seasons of the given user
Find the manageable seasons of the given user
def find_manageable_seasons( check_date = Date.today() )
    @seasons_found = true
    @seasons_ids = @user.
      team_managers.
      joins( team_affiliation: :season ).
      where( ['seasons.end_date >= ? and seasons.begin_date <= ?', check_date, check_date]).
      select( "team_affiliations.season_id" ).
      map{ |tm| tm.season_id }
  end
def find_manageable_seasons ( check_date = Date . today ( ) ) @seasons_found = true @seasons_ids = @user . team_managers . joins ( team_affiliation : :season ) . where ( [ 'seasons.end_date >= ? and seasons.begin_date <= ?' , check_date , check_date ] ) . select ( "team_affiliations.season_id" ) . map { | tm | tm . season_id } end
Find the manageable seasons of the given user
Find the manageable seasons of the given user
check_date
<not_specific>
today
<not_specific>