diff --git a/app/controllers/advertisements_controller.rb b/app/controllers/advertisements_controller.rb index d3eb398..850e230 100644 --- a/app/controllers/advertisements_controller.rb +++ b/app/controllers/advertisements_controller.rb @@ -13,11 +13,7 @@ def new def create @advertisement = current_user.advertisements.build(ads_params) - if @advertisement.save - redirect_to advertisement_path(@advertisement), notice: t('.success') - else - render 'new', status: :unprocessable_entity - end + redirect_to advertisement_path(@advertisement), notice: t('.success') if @advertisement.save end def show diff --git a/app/views/shared/_navbar.html.erb b/app/views/shared/_navbar.html.erb index 242a2cf..46462fe 100644 --- a/app/views/shared/_navbar.html.erb +++ b/app/views/shared/_navbar.html.erb @@ -69,6 +69,11 @@ + <% if current_user.admin? %> + + <% end %> - <% if current_user.admin? %> - - <% end %>