Show More
Commit Description:
associate logins with users
Commit Description:
associate logins with users
References:
File last commit:
Show/Diff file:
Action:
app/controllers/configurations_controller.rb
| 28 lines
| 664 B
| text/x-ruby
| RubyLexer
|
|
r76 | class ConfigurationsController < ApplicationController | ||
before_filter :authenticate | ||||
before_filter { |controller| controller.authorization_by_roles(['admin'])} | ||||
def index | ||||
|
r320 | @configurations = GraderConfiguration.find(:all, | ||
|
r76 | :order => '`key`') | ||
end | ||||
def reload | ||||
|
r320 | GraderConfiguration.reload | ||
|
r76 | redirect_to :action => 'index' | ||
end | ||||
r474 | def update | |||
@config = GraderConfiguration.find(params[:id]) | ||||
respond_to do |format| | ||||
if @config.update_attributes(params[:grader_configuration]) | ||||
format.json { head :ok } | ||||
else | ||||
format.json { respond_with_bip(@config) } | ||||
end | ||||
end | ||||
end | ||||
|
r76 | end | ||