Skip to content

Commit f1a8ac1

Browse files
authored
wohohwo (#1232)
* ah MJ * sighh.... * fix migration and view
1 parent 4a23357 commit f1a8ac1

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

app/views/showcase/new.html.erb

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,23 @@
5454
<%= hidden_field_tag :project_id, @project.id %>
5555
<%= hidden_field_tag :time_spent_voting_ms, 0, id: "time_spent_voting_ms" %>
5656

57-
<div class="space-y-3">
57+
<div class="space-y-4">
58+
<div class="mb-4">
59+
<ul class="list-disc pl-5 space-y-2 text-som-dark/90 text-xl">
60+
<li>Grade each category independently using the 6‑point scale.</li>
61+
<li>"Good" is solid; go higher only when it clearly stands out.</li>
62+
</ul>
63+
</div>
64+
<% explain = {
65+
"technical" => "Engineering quality: Do you think the author has put in effort in ensuring the robustness, perfomance and correctness of this?",
66+
"creativity" => "Is this creative?",
67+
"storytelling" => "How well it tells how it was made: clear README/devlogs, documentation, etc",
68+
"originality" => "How distinct it is from common projects?"
69+
} %>
5870
<% @criteria.each do |criterion| %>
59-
<div class="bg-soft-bone/50 border border-saddle-taupe/30 rounded-lg p-3">
60-
<div class="mb-2 font-medium text-som-dark capitalize"><%= criterion %></div>
71+
<div class="bg-white/60 border-2 border-som-dark/25 rounded-lg p-4">
72+
<div class="mb-2 font-bold text-xl text-som-dark capitalize"><%= criterion %></div>
73+
<p class="mb-3 text-base text-som-dark/85"><%= explain[criterion.to_s] %></p>
6174
<%= select_tag "vote_mf[ballot][#{criterion}]",
6275
options_for_select(@grade_labels),
6376
include_blank: "Select grade",
@@ -74,4 +87,4 @@
7487
</div>
7588
<% end %>
7689
</div>
77-
</div>
90+
</div>

db/migrate/20251009080720_create_vote_mf.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ class CreateVoteMf < ActiveRecord::Migration[8.0]
22
def change
33
create_table :vote_mfs do |t|
44
t.references :project, null: false, foreign_key: true
5-
t.references :voter, null: false, foreign_key: true
5+
t.references :voter, null: false, foreign_key: { to_table: :users }
66
t.integer :time_spent_voting_ms
77

88
t.timestamps
99
end
1010
end
11-
end
11+
end

db/schema.rb

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)