Skip to content

Commit

Permalink
Merge branch '211-error-when-calling-show-for-notices' into 'master'
Browse files Browse the repository at this point in the history
Remove unused show action for notices

Closes #211

See merge request riseuplabs/crabgrass!195
  • Loading branch information
dgt committed Oct 25, 2018
2 parents 93aab40 + eccd924 commit 8a7a3de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 1 addition & 9 deletions app/controllers/me/notices_controller.rb
@@ -1,5 +1,5 @@
class Me::NoticesController < Me::BaseController
before_filter :fetch_notice, only: %i[show destroy]
before_filter :fetch_notice, only: %i[destroy]

def index
@notices = Notice.for_user(current_user)
Expand All @@ -11,14 +11,6 @@ def index
@pages = Page.paginate_by_path '', options_for_me, pagination_params
end

def show
url = send(@notice.redirect_path, @notice.redirect_object)
respond_to do |format|
format.html { redirect_to url }
format.js { render(:update) { |page| page.redirect_to url } }
end
end

#
# don't actually destroy, just mark dismissed
#
Expand Down
2 changes: 1 addition & 1 deletion config/routes.rb
Expand Up @@ -58,7 +58,7 @@
delete 'notices/destroy_all',
to: 'notices#destroy_all',
as: 'notices_destroy_all'
resources :notices, only: %i[index show destroy]
resources :notices, only: %i[index destroy]
get '', to: 'notices#index', as: 'home'
# resource :page, only: [:new, :create]
resources :recent_pages, only: [:index]
Expand Down

0 comments on commit 8a7a3de

Please sign in to comment.