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- #
31class OffersController < PostsController
42 def model
53 Offer
64 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
215end
Original file line number Diff line number Diff line change 4545 < div class ="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
4646 < ul class ="nav nav-pills actions-menu ">
4747 <%= render 'application/menus/user_list_link' %>
48- <%= render 'application/menus/offers_dashboard_link ' %>
48+ <%= render 'application/menus/offers_list_link ' %>
4949 <%= render 'application/menus/inquiries_list_link' %>
5050 <%= render 'application/menus/offers_by_tag_link' %>
5151 <% 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