Class: Admin::ProjectSuggestionsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/admin/project_suggestions_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



6
7
8
9
10
# File 'app/controllers/admin/project_suggestions_controller.rb', line 6

def destroy
  @project_suggestion = ProjectSuggestion.find(params[:id])
  @project_suggestion.destroy
  redirect_to admin_project_suggestions_path
end

#indexObject



2
3
4
# File 'app/controllers/admin/project_suggestions_controller.rb', line 2

def index
  @project_suggestions = ProjectSuggestion.all.order('created_at DESC').joins(:project).paginate(page: params[:page], per_page: 100)
end