Class: IshManager::WcoLeadsetsController
Instance Method Summary
collapse
#basic_auth, #home, #tinymce
Instance Method Details
#create ⇒ Object
4
5
|
# File 'app/controllers/ish_manager/wco_leadsets_controller.rb', line 4
def create
end
|
#edit ⇒ Object
7
8
9
10
|
# File 'app/controllers/ish_manager/wco_leadsets_controller.rb', line 7
def edit
@wco_leadset = Wco::Leadset.find params[:id]
authorize! :edit, @wco_leadset
end
|
#index ⇒ Object
12
13
14
15
|
# File 'app/controllers/ish_manager/wco_leadsets_controller.rb', line 12
def index
authorize! :index, Wco::Leadset
@wco_leadsets = Wco::Leadset.all
end
|
#show ⇒ Object
17
18
19
20
|
# File 'app/controllers/ish_manager/wco_leadsets_controller.rb', line 17
def show
@wco_leadset = Wco::Leadset.find params[:id]
authorize! :show, @wco_leadset
end
|
#update ⇒ Object
22
23
24
25
26
27
28
29
30
31
32
|
# File 'app/controllers/ish_manager/wco_leadsets_controller.rb', line 22
def update
@wco_leadset = Wco::Leadset.find params[:id]
authorize! :update, @wco_leadset
flag = @wco_leadset.update params[:wco_leadset].permit!
if flag
flash_notice "ok"
else
flash_alert "sorry"
end
redirect_to action: :index
end
|