Skip to content

Commit

Permalink
Remove unused show action for notices
Browse files Browse the repository at this point in the history
  • Loading branch information
dgt committed Oct 18, 2018
1 parent e1f2657 commit eccd924
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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 eccd924

Please sign in to comment.