More contract tweaks

This commit is contained in:
2014-03-02 21:48:49 -07:00
parent d8311fa7cc
commit 3cd6c59df0
14 changed files with 53 additions and 20 deletions

View File

@@ -20,7 +20,7 @@ class ContractsController < ApplicationController
Rails.logger.info @contract.inspect
respond_to do |format|
if @contract.save
format.html { redirect_to Contract, :notice => 'Contract was successfully created.' }
format.html { redirect_to @contract, :notice => 'Contract was successfully created.' }
format.json { render :json => @contract, :status => :created, :location => @contract }
else
format.html { render :action => "new" }
@@ -32,7 +32,7 @@ class ContractsController < ApplicationController
def update
respond_to do |format|
if @contract.update_attributes(params[:contract])
format.html { redirect_to Contract, :notice => 'Contract was successfully updated.' }
format.html { redirect_to @contract, :notice => 'Contract was successfully updated.' }
format.json { head :no_content }
else
format.html { render :action => "edit" }

View File

@@ -35,7 +35,7 @@ class UsersController < ApplicationController
when "orientation"
@users = @users.sort_by{ |u| [-u.orientation.to_i,u.name] }
when "waiver"
@users = @users.sort_by{ |u| [-u.waiver.to_i,u.name] }
@users = @users.sort_by{ |u| [-u.contract_date.to_i,u.name] }
when "member"
@users = @users.sort_by{ |u| [-u.member_status.to_i,u.name] }
when "card"