Class: Manage::BallotBox::VotesController

Inherits:
Manage::BaseController
  • Object
show all
Defined in:
app/controllers/manage/ballot_box/votes_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



17
18
19
# File 'app/controllers/manage/ballot_box/votes_controller.rb', line 17

def destroy
  destroy!{ manage_ballot_box_votes_path( voteable_scope(@voteable) ) }
end

#showObject



21
22
23
24
25
26
27
28
29
# File 'app/controllers/manage/ballot_box/votes_controller.rb', line 21

def show
  respond_with(@voteable) do |format|
    format.html do
      @max_created_at = @voteable.votes.maximum(:created_at)
      @min_created_at = @voteable.votes.minimum(:created_at)
    end
    format.json { render :json => @voteable.votes.chart(params[:id]) }
  end
end