Finishing contracts, changing from s3.yml to .env

This commit is contained in:
2014-03-02 19:06:39 -07:00
parent c74da562bc
commit cac59e9de5
19 changed files with 118 additions and 41 deletions

View File

@@ -1,6 +1,6 @@
class ContractsController < ApplicationController
load_and_authorize_resource :contract
before_filter :authenticate_user!
before_filter :authenticate_user!, :load_users
layout 'resources'
def index
@@ -16,6 +16,8 @@ class ContractsController < ApplicationController
end
def create
Rails.logger.info "CONTRACT"
Rails.logger.info @contract.inspect
respond_to do |format|
if @contract.save
format.html { redirect_to Contract, :notice => 'Contract was successfully created.' }
@@ -47,4 +49,8 @@ class ContractsController < ApplicationController
format.json { head :no_content }
end
end
def load_users
@users = @users = User.accessible_by(current_ability).sort_by(&:name)
end
end