fixes #143: Janitor trials issues

This commit is contained in:
albert
2011-10-17 00:29:22 -04:00
parent 509c619a04
commit b9ace89e53
7 changed files with 27 additions and 7 deletions

View File

@@ -19,18 +19,22 @@ class JanitorTrialsController < ApplicationController
def create
@janitor_trial = JanitorTrial.create(params[:janitor_trial])
respond_with(@janitor_trial)
respond_with(@janitor_trial, :location => janitor_trials_path)
end
def promote
@janitor_trial = JanitorTrial.find(params[:id])
@janitor_trial.promote!
respond_with(@janitor_trial)
respond_with(@janitor_trial) do |format|
format.js
end
end
def demote
@janitor_trial = JanitorTrial.find(params[:id])
@janitor_trial.demote!
respond_with(@janitor_trial)
respond_with(@janitor_trial) do |format|
format.js
end
end
end