Class: Workarea::Admin::BookmarksController
- Inherits:
-
ApplicationController
- Object
- Workarea::ApplicationController
- ApplicationController
- Workarea::Admin::BookmarksController
- Defined in:
- app/controllers/workarea/admin/bookmarks_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
#current_user, #find_sort, #wrap_in_view_model, wrap_in_view_model
Methods included from Publishing
#allow_publishing!, #allow_publishing?, #set_publishing_options
Methods included from Visiting
Instance Method Details
#create ⇒ Object
4 5 6 7 8 |
# File 'app/controllers/workarea/admin/bookmarks_controller.rb', line 4 def create User::AdminBookmark.create!(params[:bookmark].merge(user: current_user)) flash[:success] = t('workarea.admin.bookmarks.flash_messages.created') redirect_back fallback_location: root_path end |
#destroy ⇒ Object
10 11 12 13 14 |
# File 'app/controllers/workarea/admin/bookmarks_controller.rb', line 10 def destroy User::AdminBookmark.find(params[:id]).destroy flash[:success] = t('workarea.admin.bookmarks.flash_messages.destroyed') redirect_back fallback_location: root_path end |