mirror of
https://github.com/edcommonwealth/Dashboard.git
synced 2026-03-07 21:38:14 -08:00
chore: show browse page without errors
This commit is contained in:
parent
f71f88a4ac
commit
e4e6a5c7fb
5 changed files with 16 additions and 4 deletions
3
Gemfile
3
Gemfile
|
|
@ -11,7 +11,8 @@ gem "pg"
|
||||||
gem "sprockets-rails"
|
gem "sprockets-rails"
|
||||||
|
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
gem "byebug"
|
gem "debug"
|
||||||
|
gem "web-console"
|
||||||
end
|
end
|
||||||
# Start debugger with binding.b [https://github.com/ruby/debug]
|
# Start debugger with binding.b [https://github.com/ruby/debug]
|
||||||
# gem "debug", ">= 1.0.0"
|
# gem "debug", ">= 1.0.0"
|
||||||
|
|
|
||||||
13
Gemfile.lock
13
Gemfile.lock
|
|
@ -95,14 +95,17 @@ GEM
|
||||||
base64 (0.2.0)
|
base64 (0.2.0)
|
||||||
bcrypt_pbkdf (1.1.0)
|
bcrypt_pbkdf (1.1.0)
|
||||||
bigdecimal (3.1.5)
|
bigdecimal (3.1.5)
|
||||||
|
bindex (0.8.1)
|
||||||
builder (3.2.4)
|
builder (3.2.4)
|
||||||
byebug (11.1.3)
|
|
||||||
concurrent-ruby (1.2.2)
|
concurrent-ruby (1.2.2)
|
||||||
connection_pool (2.4.1)
|
connection_pool (2.4.1)
|
||||||
crass (1.0.6)
|
crass (1.0.6)
|
||||||
cssbundling-rails (1.3.3)
|
cssbundling-rails (1.3.3)
|
||||||
railties (>= 6.0.0)
|
railties (>= 6.0.0)
|
||||||
date (3.3.4)
|
date (3.3.4)
|
||||||
|
debug (1.9.1)
|
||||||
|
irb (~> 1.10)
|
||||||
|
reline (>= 0.3.8)
|
||||||
diff-lcs (1.5.0)
|
diff-lcs (1.5.0)
|
||||||
drb (2.2.0)
|
drb (2.2.0)
|
||||||
ruby2_keywords
|
ruby2_keywords
|
||||||
|
|
@ -247,6 +250,11 @@ GEM
|
||||||
watir (7.3.0)
|
watir (7.3.0)
|
||||||
regexp_parser (>= 1.2, < 3)
|
regexp_parser (>= 1.2, < 3)
|
||||||
selenium-webdriver (~> 4.2)
|
selenium-webdriver (~> 4.2)
|
||||||
|
web-console (4.2.1)
|
||||||
|
actionview (>= 6.0.0)
|
||||||
|
activemodel (>= 6.0.0)
|
||||||
|
bindex (>= 0.4.0)
|
||||||
|
railties (>= 6.0.0)
|
||||||
webrick (1.8.1)
|
webrick (1.8.1)
|
||||||
websocket (1.2.10)
|
websocket (1.2.10)
|
||||||
websocket-driver (0.7.6)
|
websocket-driver (0.7.6)
|
||||||
|
|
@ -258,12 +266,13 @@ PLATFORMS
|
||||||
x86_64-linux
|
x86_64-linux
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
byebug
|
|
||||||
dashboard!
|
dashboard!
|
||||||
|
debug
|
||||||
factory_bot_rails
|
factory_bot_rails
|
||||||
pg
|
pg
|
||||||
puma
|
puma
|
||||||
sprockets-rails
|
sprockets-rails
|
||||||
|
web-console
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.4.21
|
2.4.21
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ module Dashboard
|
||||||
def show
|
def show
|
||||||
@categories = Category.sorted.map { |category| CategoryPresenter.new(category:) }
|
@categories = Category.sorted.map { |category| CategoryPresenter.new(category:) }
|
||||||
|
|
||||||
|
puts params
|
||||||
@category = CategoryPresenter.new(category: Category.find_by_slug(params[:id]))
|
@category = CategoryPresenter.new(category: Category.find_by_slug(params[:id]))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ module Dashboard
|
||||||
end
|
end
|
||||||
|
|
||||||
def link_to_browse(district:, school:, academic_year:)
|
def link_to_browse(district:, school:, academic_year:)
|
||||||
"/districts/#{district.slug}/schools/#{school.slug}/browse/teachers-and-leadership?year=#{academic_year.range}"
|
"/districts/#{district.slug}/schools/#{school.slug}/browse/teachers-leadership?year=#{academic_year.range}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def link_to_analyze(district:, school:, academic_year:)
|
def link_to_analyze(district:, school:, academic_year:)
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</nav>
|
</nav>
|
||||||
|
<% console %>
|
||||||
<select id="select-academic-year" class="form-select" name="academic-year">
|
<select id="select-academic-year" class="form-select" name="academic-year">
|
||||||
<% @academic_years.each do |year| %>
|
<% @academic_years.each do |year| %>
|
||||||
<option value="<%= url_for [@district, @school, @category , {year: year.range} ]%>" <%= @academic_year == year ? "selected" : nil %>><%= year.formatted_range %></option>
|
<option value="<%= url_for [@district, @school, @category , {year: year.range} ]%>" <%= @academic_year == year ? "selected" : nil %>><%= year.formatted_range %></option>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue