Class: Dashboard::MilestonesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/dashboard/milestones_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject


7
8
9
10
11
12
13
14
15
16
17
# File 'app/controllers/dashboard/milestones_controller.rb', line 7

def index
  respond_to do |format|
    format.html do
      @milestone_states = Milestone.states_count(@projects.select(:id), groups.select(:id))
      @milestones = milestones.page(params[:page])
    end
    format.json do
      render json: milestones.to_json(only: [:id, :title], methods: :name)
    end
  end
end