move rails app into src/, add Vagrantfile & puppet/ assets and add src/.gitignore file

This commit is contained in:
noi narisak
2014-09-02 21:02:38 -05:00
parent 2a9d5f782f
commit 30a48aca8d
226 changed files with 4510 additions and 51 deletions
@@ -1,5 +0,0 @@
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
end
-61
View File
@@ -1,61 +0,0 @@
class BikesController < ApplicationController
before_action :set_bike, only: [:show, :edit, :update, :destroy]
before_action :authenticate_user!
def index
@bikes = Bike.all
end
def show
end
def new
@bike = Bike.new
end
def edit
end
def create
@bike = Bike.new(bike_params)
respond_to do |format|
if @bike.save
format.html { redirect_to @bike, notice: 'Bike was successfully created.' }
else
format.html { render action: 'new' }
end
end
end
def update
respond_to do |format|
if @bike.update(bike_params)
format.html { redirect_to @bike, notice: 'Bike was successfully updated.' }
else
format.html { render action: 'edit' }
end
end
end
def destroy
@bike.destroy
respond_to do |format|
format.html { redirect_to bikes_url }
end
end
private
def set_bike
@bike = Bike.find(params[:id])
end
def bike_params
params.require(:bike).permit(:entry_date, :brand, :model,
:type, :color, :frame_size,
:log_number, :purpose, :serial_number,
:notes, :tag_info, :mechanic,
:completion_date, :price,
:top_tube_size, :seat_tube_size,
:created_at, :updated_at)
end
end
View File
@@ -1,3 +0,0 @@
class StaticPagesController < ApplicationController
def home; end
end
-49
View File
@@ -1,49 +0,0 @@
class VolunteersController < ApplicationController
before_action :set_volunteer, only: [:show, :edit, :update, :destroy]
before_action :authenticate_user!
def index
@volunteers = Volunteer.all
end
def show; end
def new
@volunteer = Volunteer.new
end
def edit; end
def create
@volunteer = Volunteer.new(volunteer_params)
if @volunteer.save
redirect_to @volunteer, notice: 'Volunteer was successfully created.'
else
render action: 'new'
end
end
def update
if @volunteer.update(volunteer_params)
redirect_to @volunteer, notice: 'Volunteer was successfully updated.'
else
render action: 'edit'
end
end
def destroy
@volunteer.destroy
redirect_to volunteers_url
end
private
def set_volunteer
@volunteer = Volunteer.find(params[:id])
end
def volunteer_params
params.require(:volunteer).permit(:name, :email, :phone)
end
end