Commit 2a2cf4d 1 parent 0dae88b commit 2a2cf4d Copy full SHA for 2a2cf4d
File tree 4 files changed +8
-14
lines changed
4 files changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,6 @@ class Hunt < ApplicationRecord
9
9
10
10
validates :title , presence : true
11
11
12
- default_scope { order ( :id ) }
13
-
14
12
auto_strip_attributes :title , squish : true
15
13
16
14
def token_match? ( test_token )
Original file line number Diff line number Diff line change 3
3
class HuntMembership < ApplicationRecord
4
4
belongs_to :hunt , optional : false
5
5
belongs_to :user , optional : false
6
-
7
- default_scope { order ( :id ) }
8
6
end
Original file line number Diff line number Diff line change @@ -11,8 +11,6 @@ class User < ApplicationRecord
11
11
has_many :hunts , through : :hunt_memberships
12
12
has_many :ratings , dependent : :destroy
13
13
14
- default_scope { order ( :id ) }
15
-
16
14
def display_name
17
15
email . scan ( /.+@/ ) . last [ 0 ...-1 ]
18
16
end
Original file line number Diff line number Diff line change 2
2
3
3
<%= render 'layouts/about_blurb' %>
4
4
5
- <% hunts_shown = 2 %>
5
+ <% hunts_shown = 5 %>
6
6
7
7
<% if user_signed_in? %>
8
- <% current_user . hunts . order ( updated_at : :desc ) . limit ( hunts_shown ) . each do | hunt | % >
9
- < p >
10
- <%= link_to "View ' #{ hunt . title } ' Homes" ,
8
+ < p >
9
+ <% current_user . hunts . order ( created_at : :desc ) . limit ( hunts_shown ) . each do | hunt | % >
10
+ <%= link_to hunt . title ,
11
11
hunt_homes_path ( hunt ) ,
12
- class : 'btn btn-warning' %>
13
- </ p >
14
- <% end % >
12
+ class : 'btn btn-warning m-1 ' %>
13
+ <% end % >
14
+ </ p >
15
15
<% if current_user . hunts . size > hunts_shown %>
16
16
< p >
17
- <%= link_to 'Switch to a different home hunt ' ,
17
+ <%= link_to 'View all hunts ' ,
18
18
hunts_path ,
19
19
class : 'btn btn-outline-info' %>
20
20
</ p >
You can’t perform that action at this time.
0 commit comments