Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions app/controllers/events_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ class EventsController < ApplicationController
before_action :check_if_admin, only: [ :history ]
before_action :authorize_event_access, only: [ :show, :publish, :destroy, :edit, :update ]
before_action :check_event_status, only: [ :update ]
before_action :check_if_event_manager, only: [ :new, :create ]
before_action :check_if_event_manager, only: [ :index, :new, :create ]
add_breadcrumb "Home", :dashboard_path
add_breadcrumb "Meus Eventos", :events_path

def index
@events = current_user.events
add_breadcrumb "Meus Eventos", :events_path
end

def new
@event = Event.new
add_breadcrumb "Meus Eventos", :events_path
add_breadcrumb "Cadastro de Evento"
end

Expand All @@ -31,10 +32,12 @@ def create
end

def show
add_breadcrumb "Meus Eventos", :events_path
add_breadcrumb "#{@event.name}", :event_path
end

def edit
add_breadcrumb "Meus Eventos", :events_path
add_breadcrumb "#{@event.name}", :event_path
add_breadcrumb "Editar Evento"
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
expect(current_path).to eq history_events_path
within "#breadcrumbs" do
expect(page).to have_link "Home"
expect(page).to have_link "Meus Eventos"
expect(page).to have_content "Histórico de eventos"
end
end
Expand Down