Class: FamilyGallery::UserTaggingsController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseController
- FamilyGallery::UserTaggingsController
show all
- Defined in:
- app/controllers/family_gallery/user_taggings_controller.rb
Instance Method Summary
collapse
#current_ability, #current_user
Instance Method Details
#create ⇒ Object
7
8
9
10
11
12
13
14
15
|
# File 'app/controllers/family_gallery/user_taggings_controller.rb', line 7
def create
if @user_tagging.save
flash[:notice] = t(".tagging_was_saved")
redirect_to @picture
else
flash[:error] = @user_tagging.errors.full_messages.join(". ")
render :new
end
end
|
#destroy ⇒ Object
17
18
19
20
21
22
23
|
# File 'app/controllers/family_gallery/user_taggings_controller.rb', line 17
def destroy
unless @user_tagging.destroy
flash[:error] = @user_tagging.errors.full_messages.join(". ")
end
redirect_to @picture
end
|