Skip to content

Commit

Permalink
Merge pull request #966 from gamecat2d/806-menu-bar-not-displaying-co…
Browse files Browse the repository at this point in the history
…rrectly

806 : the navbar is not displayed correctly
  • Loading branch information
solebared authored May 27, 2021
2 parents 63f6c4c + 1b84c07 commit c5b0ae1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/controllers/asks_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

class AsksController < PublicController
layout 'without_navbar', only: %i[new create]
layout :determine_layout, only: %i[new create]

def index
redirect_to contributions_path
Expand Down Expand Up @@ -47,4 +47,8 @@ def render_form(submission)

render :new
end

def determine_layout
'without_navbar' unless context.system_settings.display_navbar?
end
end
6 changes: 5 additions & 1 deletion app/controllers/offers_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

class OffersController < PublicController
layout 'without_navbar', only: %i[new create]
layout :determine_layout, only: %i[new create]

def index
redirect_to contributions_path
Expand Down Expand Up @@ -47,4 +47,8 @@ def render_form(submission)

render :new
end

def determine_layout
'without_navbar' unless context.system_settings.display_navbar?
end
end

0 comments on commit c5b0ae1

Please sign in to comment.