File tree Expand file tree Collapse file tree 4 files changed +1
-76
lines changed Expand file tree Collapse file tree 4 files changed +1
-76
lines changed Original file line number Diff line number Diff line change 1
- # Managems of offer-type posts
2
- #
3
1
class OffersController < PostsController
4
2
def model
5
3
Offer
6
4
end
7
-
8
- def dashboard
9
- initial_scope =
10
- if current_organization
11
- current_organization . offers . active . of_active_members
12
- else
13
- Offer . all . active . of_active_members
14
- end
15
- @offers = Category . all . sort_by { |a | a . name . downcase } .
16
- each_with_object ( { } ) do |category , offers |
17
- list = initial_scope . merge ( category . posts ) . limit ( 5 )
18
- offers [ category ] = list if list . present?
19
- end
20
- end
21
5
end
Original file line number Diff line number Diff line change 45
45
< div class ="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
46
46
< ul class ="nav nav-pills actions-menu ">
47
47
<%= render 'application/menus/user_list_link' %>
48
- <%= render 'application/menus/offers_dashboard_link ' %>
48
+ <%= render 'application/menus/offers_list_link ' %>
49
49
<%= render 'application/menus/inquiries_list_link' %>
50
50
<%= render 'application/menus/offers_by_tag_link' %>
51
51
<% if current_user . manages? ( @organization ) %>
File renamed without changes.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments