diff --git a/personal/Gemfile.lock b/personal/Gemfile.lock index d3ea33a..1787791 100644 --- a/personal/Gemfile.lock +++ b/personal/Gemfile.lock @@ -26,7 +26,7 @@ GIT GEM remote: https://rubygems.org/ specs: - action_policy (0.6.5) + action_policy (0.6.7) ruby-next-core (>= 0.14.0) actioncable (7.1.2) actionpack (= 7.1.2) @@ -112,27 +112,27 @@ GEM auto_strip_attributes (2.6.0) activerecord (>= 4.0) awesome_print (1.9.2) - aws-eventstream (1.2.0) - aws-partitions (1.771.0) - aws-sdk-cognitoidentityprovider (1.73.0) - aws-sdk-core (~> 3, >= 3.165.0) + aws-eventstream (1.3.0) + aws-partitions (1.876.0) + aws-sdk-cognitoidentityprovider (1.85.0) + aws-sdk-core (~> 3, >= 3.188.0) aws-sigv4 (~> 1.1) - aws-sdk-core (3.173.1) - aws-eventstream (~> 1, >= 1.0.2) + aws-sdk-core (3.190.1) + aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) - aws-sigv4 (~> 1.5) + aws-sigv4 (~> 1.8) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.64.0) - aws-sdk-core (~> 3, >= 3.165.0) + aws-sdk-kms (1.75.0) + aws-sdk-core (~> 3, >= 3.188.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.122.0) - aws-sdk-core (~> 3, >= 3.165.0) + aws-sdk-s3 (1.142.0) + aws-sdk-core (~> 3, >= 3.189.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.4) - aws-sdk-textract (1.45.0) - aws-sdk-core (~> 3, >= 3.165.0) + aws-sigv4 (~> 1.8) + aws-sdk-textract (1.55.0) + aws-sdk-core (~> 3, >= 3.188.0) aws-sigv4 (~> 1.1) - aws-sigv4 (1.5.2) + aws-sigv4 (1.8.0) aws-eventstream (~> 1, >= 1.0.2) backport (1.2.0) base64 (0.2.0) @@ -158,15 +158,14 @@ GEM concurrent-ruby (1.2.2) connection_pool (2.4.1) crass (1.0.6) - cssbundling-rails (1.1.2) + cssbundling-rails (1.3.3) railties (>= 6.0.0) date (3.3.4) debug (1.9.1) irb (~> 1.10) reline (>= 0.3.8) diff-lcs (1.5.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) + domain_name (0.6.20231109) down (5.4.1) addressable (~> 2.8) drb (2.2.0) @@ -175,13 +174,14 @@ GEM erubi (1.12.0) et-orbi (1.2.7) tzinfo - faraday (2.7.5) + faraday (2.8.1) + base64 faraday-net_http (>= 2.0, < 3.1) ruby2_keywords (>= 0.0.4) faraday-follow_redirects (0.3.0) faraday (>= 1, < 3) faraday-net_http (3.0.2) - ffi (1.15.5) + ffi (1.16.3) friendly_id (5.5.1) activerecord (>= 4.0.0) fugit (1.9.0) @@ -220,7 +220,7 @@ GEM activesupport (>= 5.0.0) jmespath (1.6.2) json (2.7.1) - json-jwt (1.16.3) + json-jwt (1.16.4) activesupport (>= 4.2) aes_key_wrap bindata @@ -251,14 +251,14 @@ GEM activerecord (>= 5.2) matrix (0.4.2) method_source (1.0.0) - mime-types (3.4.1) + mime-types (3.5.1) mime-types-data (~> 3.2015) - mime-types-data (3.2023.0218.1) + mime-types-data (3.2023.1205) mini_magick (4.12.0) mini_mime (1.1.5) mini_portile2 (2.8.5) minitest (5.20.0) - mocha (2.0.2) + mocha (2.1.0) ruby2_keywords (>= 0.0.5) msgpack (1.7.2) multi_xml (0.6.0) @@ -355,8 +355,8 @@ GEM rbs (2.8.4) rdoc (6.6.2) psych (>= 4.0.0) - redis (5.0.6) - redis-client (>= 0.9.0) + redis (5.0.8) + redis-client (>= 0.17.0) redis-client (0.19.1) connection_pool regexp_parser (2.8.3) @@ -372,7 +372,7 @@ GEM reverse_markdown (2.1.1) nokogiri rexml (3.2.6) - rgeo (3.0.0) + rgeo (3.0.1) rgeo-activerecord (7.0.1) activerecord (>= 5.0) rgeo (>= 1.0.0) @@ -394,9 +394,9 @@ GEM rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) rubocop-ast (>= 1.30.0, < 2.0) - ruby-next-core (0.15.3) + ruby-next-core (1.0.0) ruby-progressbar (1.13.0) - ruby-vips (2.1.4) + ruby-vips (2.2.0) ffi (~> 1.12) ruby2_keywords (0.0.5) rubyzip (2.3.2) @@ -459,17 +459,14 @@ GEM railties (>= 6.0.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.8.2) unicode-display_width (2.5.0) uniform_notifier (1.16.0) - version_gem (1.1.2) - view_component (3.0.0) + version_gem (1.1.3) + view_component (3.8.0) activesupport (>= 5.2.0, < 8.0) concurrent-ruby (~> 1.0) method_source (~> 1.0) - web-console (4.2.0) + web-console (4.2.1) actionview (>= 6.0.0) activemodel (>= 6.0.0) bindex (>= 0.4.0) diff --git a/personal/app/controllers/tds/pireps_controller.rb b/personal/app/controllers/tds/pireps_controller.rb index a86eb31..7cd2e91 100644 --- a/personal/app/controllers/tds/pireps_controller.rb +++ b/personal/app/controllers/tds/pireps_controller.rb @@ -7,7 +7,7 @@ class PirepsController < ApplicationController let(:dr_pagy) let(:pirep) { Pirep.find(params[:id]) } let(:pireps) do - relation = apply_filter.recent(:observation_time) + relation = apply_filter @dr_pagy, records = pagy_countless(relation, items: 50) records end @@ -51,7 +51,8 @@ def destroy private - def apply_filter(relation = Pirep.all) + def apply_filter + relation = Pirep.recent(:observation_time) #relation = relation.near(params[:location], 100) if params[:location].present? #relation = relation.search(params[:q]) if params[:q].present? @@ -63,14 +64,15 @@ def apply_filter(relation = Pirep.all) case params[:filter] when 'uua' add_breadcrumb('Urgent') - relation.uua + relation = relation.uua when 'ua' add_breadcrumb('Routine') - relation.ua + relation = relation.ua else add_breadcrumb('All') - relation - end.includes(:batch) + end + + relation.includes(:batch) end # Only allow a list of trusted parameters through. diff --git a/personal/app/views/layouts/application.html.erb b/personal/app/views/layouts/application.html.erb index ef0e527..61fad59 100644 --- a/personal/app/views/layouts/application.html.erb +++ b/personal/app/views/layouts/application.html.erb @@ -4,7 +4,6 @@ - diff --git a/personal/app/views/tds/pireps/index.html.erb b/personal/app/views/tds/pireps/index.html.erb index 1f72c9d..9b7fb8e 100644 --- a/personal/app/views/tds/pireps/index.html.erb +++ b/personal/app/views/tds/pireps/index.html.erb @@ -16,7 +16,7 @@ <%= turbo_frame_tag :pireps do %>