Skip to content

Commit 08a0ae1

Browse files
fix: pagy + delete_at prop (#255)
1 parent 596d8d0 commit 08a0ae1

File tree

9 files changed

+6
-37
lines changed

9 files changed

+6
-37
lines changed

app/controllers/sessions_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def create
3333
SyncSlackDisplayNameJob.perform_later(user)
3434

3535
session[:user_id] = user.id
36-
current_user.complete_tutorial_step! :first_login
36+
user.complete_tutorial_step! :first_login
3737
redirect_to(user.setup_complete? ? projects_path : kitchen_path, notice: "Signed in with Hack Club")
3838
end
3939

app/models/concerns/soft_deletable.rb

Lines changed: 0 additions & 21 deletions
This file was deleted.

app/models/post.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
# fk_rails_... (user_id => users.id)
2424
#
2525
class Post < ApplicationRecord
26-
include SoftDeletable
27-
2826
belongs_to :project
2927
# optional because it can be a system post – achievements, milestones, well-done/magic happening, etc –
3028
# integeration – git remotes – or a user post

app/models/project.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
# updated_at :datetime not null
1414
#
1515
class Project < ApplicationRecord
16-
include SoftDeletable
17-
1816
# TODO: reflect the allowed content types in the html accept
1917
ACCEPTED_CONTENT_TYPES = %w[image/jpeg image/png image/webp image/heic image/heif].freeze
2018
MAX_BANNER_SIZE = 10.megabytes

app/views/admin/fulfillment_dashboard/index.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@
118118

119119
<% if @pagy.pages > 1 %>
120120
<div class="pagination">
121-
<%== @pagy.nav %>
121+
<%== pagy_nav(@pagy) %>
122122
</div>
123-
<%== @pagy.info %>
123+
<%== pagy_info(@pagy) %>
124124
<% end %>
125125

126126
<%= link_to "← Back", admin_root_path, class: "btn-secondary" %>

app/views/admin/projects/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
<% if @pagy.pages > 1 %>
4040
<div class="pagination">
41-
<%== @pagy.nav %>
41+
<%== pagy_nav(@pagy) %>
4242
</div>
4343
<% end %>
4444

app/views/admin/users/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
<% if @pagy.pages > 1 %>
4343
<div class="pagination">
44-
<%== @pagy.nav %>
44+
<%== pagy_nav(@pagy) %>
4545
</div>
4646
<% end %>
4747

app/views/votes/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</div>
1717

1818
<% if @pagy.pages > 1 %>
19-
<%== @pagy.series_nav %>
19+
<%== pagy_nav(@pagy) %>
2020
<% end %>
2121
<% end %>
2222
</div>

db/migrate/20251205135728_add_deleted_at_to_posts.rb

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)