Commit 8d67f434 authored by Norence Ilicito's avatar Norence Ilicito

design

parent 79e21b8e
source 'http://rubygems.org'
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
......
GEM
remote: http://rubygems.org/
remote: https://rubygems.org/
specs:
actionmailer (4.2.6)
actionpack (= 4.2.6)
......
#body{
font-family: sans-serif;
}
#td1{
font-family: fantasy;
text-align: center;
margin-left: 50px;
}
#td2{
font-family: monospace;
text-align: center;
margin-left: 50px;
}
\ No newline at end of file
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any styles
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope.
*
*= require_tree .
*= require_self
*/
......@@ -6,7 +6,7 @@ class CarsController < ApplicationController
end
render "cars/index.html.erb"
end
def create
car = CarLog.new
car.plate_number = params[:plate_number]
......@@ -18,12 +18,12 @@ class CarsController < ApplicationController
redirect_to("/cars")
end
def edit
id = params[:id]
@cars = CarLog.find(id.to_i)
@cars.destroy
redirect_to("/add")
id = params[:id]
@cars = CarLog.find(id.to_i)
@cars.destroy
redirect_to("/add")
end
......
......@@ -34,7 +34,6 @@
<% @cars.each do |car| %>
<tr>
<td id="td2"><%= "#{car.plate_number}"%></td>
<td id="td2"><%= "#{car.time_in}"%></td>
<td> </td>
<td id="td2"><%= "#{car.time_out}"%></td>
......
<link rel="stylesheet" type="text/css" href="/app/assets/stylesheets/bootstrap.css">
<link rel="stylesheet" type="text/css" href="/app/assets/stylesheets/bootstrap.css, http://fonts.googleapis.com/css?family=Oleo+Script">
<body class="homecontainer">
<div class="row">
<div class="col-md-12 wellhome">
......
......@@ -5,6 +5,6 @@ Rails.application.routes.draw do
get("/cars", to: "cars#index")
post("/cars/create", to: "cars#create")
get("/add", to: "cars#add")
get("/cars/edit/:id", to: "cars#edit")
get("/cars/edit/:id", to: "cars#edit")
get("/cars/delete/:id", to: "cars#delete")
end
......@@ -11,10 +11,10 @@
# if you're sharing your code publicly.
development:
secret_key_base: c15b4ad53109a0dace0bcf1dd6e3823d357957ec45777e391468a6804b47a00431bdc16d9fe0bc6c97d48ce6d400346592d8155a999ab7ef525352d7b481466b
secret_key_base: c4aa8dccda9a1c3186d9ca98401e1624524fcdde87ec31abb95c62bed694af582557a3d5e94f7dd98c9cd05a385020af244fbcd2acc456286419760bd4963c0a
test:
secret_key_base: 18c6e573573765a46f0c1afc832bd1845d0cc7bdb62b5a9a92d0bb4e8ee93020419e3681dc0b3620d62ea269f93edfeccaa51445ab763045aeee3ff06ffc0bf7
secret_key_base: e4612d34345988daa30ef70f51302dcde61e99e228a11ad127f79e347b7ec73cd655458d6d204a513a0edca721b343e3ec4a6a27fde1ffe113e99904cac1cb00
# Do not keep production secrets in the repository,
# instead read values from the environment.
......
class CreateCarLogs < ActiveRecord::Migration
def change
create_table :car_logs do |t|
t.string :plate_number
t.datetime :time_in
t.datetime :time_out
t.string :color
t.string :brand
t.timestamps null: false
end
end
end
......@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160705124032) do
ActiveRecord::Schema.define(version: 20160705152935) do
create_table "car_logs", force: :cascade do |t|
t.string "plate_number"
......
......@@ -2,14 +2,14 @@
one:
plate_number: MyString
time_in: 2016-07-04 21:20:03
time_out: 2016-07-04 21:20:03
time_in: 2016-07-05 23:29:35
time_out: 2016-07-05 23:29:35
color: MyString
brand: MyString
two:
plate_number: MyString
time_in: 2016-07-04 21:20:03
time_out: 2016-07-04 21:20:03
time_in: 2016-07-05 23:29:35
time_out: 2016-07-05 23:29:35
color: MyString
brand: MyString
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment