Class: Quadro::AssetsController
Instance Method Summary
collapse
#after_sign_in_path_for, #after_sign_out_path_for
Instance Method Details
#create ⇒ Object
9
10
11
12
13
14
15
|
# File 'app/controllers/quadro/assets_controller.rb', line 9
def create
if asset.save
flash[:notice] = t('quadro.flash.created')
else
flash[:alert] = t('quadro.flash.not_created')
end
end
|
#destroy ⇒ Object
25
26
27
28
29
30
31
|
# File 'app/controllers/quadro/assets_controller.rb', line 25
def destroy
if asset.destroy
flash[:notice] = t('quadro.flash.deleted')
else
flash[:alert] = t('quadro.flash.not_deleted')
end
end
|
#update ⇒ Object
17
18
19
20
21
22
23
|
# File 'app/controllers/quadro/assets_controller.rb', line 17
def update
if asset.update_attributes(asset_params)
flash[:notice] = t('quadro.flash.updated')
else
flash[:alert] = t('quadro.flash.not_updated')
end
end
|